@dynatrace/react-native-plugin 2.301.1 → 2.301.2

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 (30) hide show
  1. package/README.md +35 -12
  2. package/ios/DynatraceRNBridge.mm +1 -1
  3. package/lib/CreateElement.js +2 -1
  4. package/lib/community/gesture-handler/Touchables.InstrInfo.js +16 -4
  5. package/lib/community/gesture-handler/Touchables.js +4 -2
  6. package/lib/instrumentor/base/Dynatrace.js +10 -3
  7. package/lib/instrumentor/base/DynatraceBridge.js +6 -2
  8. package/lib/instrumentor/base/DynatraceRootAction.js +4 -1
  9. package/lib/instrumentor/base/DynatraceWebRequestTiming.js +6 -3
  10. package/lib/instrumentor/base/ElementHelper.js +11 -5
  11. package/lib/instrumentor/base/ErrorHandler.js +1 -1
  12. package/lib/instrumentor/base/Logger.js +2 -1
  13. package/lib/instrumentor/base/Picker.js +7 -6
  14. package/lib/instrumentor/base/RefreshControl.js +3 -1
  15. package/lib/instrumentor/base/Switch.js +3 -3
  16. package/lib/instrumentor/base/Touchable.js +9 -8
  17. package/lib/instrumentor/base/configuration/Configuration.js +11 -10
  18. package/lib/instrumentor/base/configuration/ConfigurationPreset.js +0 -1
  19. package/lib/instrumentor/base/configuration/IConfiguration.js +0 -1
  20. package/lib/instrumentor/base/configuration/ManualStartupConfiguration.js +3 -3
  21. package/lib/instrumentor/base/interface/IDynatraceProperties.js +3 -3
  22. package/lib/instrumentor/model/Types.js +10 -11
  23. package/lib/jsx-dev-runtime.js +16 -6
  24. package/lib/jsx-runtime.js +21 -7
  25. package/lib/metro/getSourceMapInfo.js +2 -1
  26. package/lib/react/Component.js +7 -3
  27. package/lib/react-native/Touchables.js +6 -4
  28. package/lib/react-navigation/ReactNavigation.js +6 -2
  29. package/package.json +175 -171
  30. package/src/lib/instrumentor/base/interface/NativeDynatraceBridge.ts +150 -78
@@ -5,7 +5,7 @@ exports.Pressable = exports.Text = exports.TouchableWithoutFeedback = exports.To
5
5
  const ReactNative = require("react-native");
6
6
  const React = require("react");
7
7
  const Types_1 = require("../instrumentor/model/Types");
8
- exports.Button = React.forwardRef((props, ref) => React.createElement(ReactNative.Button, Object.assign({}, props, { ref: ref })));
8
+ exports.Button = React.forwardRef((props, ref) => (React.createElement(ReactNative.Button, Object.assign({}, props, { ref: ref }))));
9
9
  exports.Button._dtInfo = { type: Types_1.Types.Button };
10
10
  if (typeof ReactNative.TouchableOpacity === 'object') {
11
11
  exports.TouchableOpacity = Object.assign({ _dtInfo: { type: Types_1.Types.TouchableOpacity } }, ReactNative.TouchableOpacity);
@@ -34,8 +34,10 @@ else {
34
34
  _c._dtInfo = { type: Types_1.Types.TouchableNativeFeedback },
35
35
  _c);
36
36
  }
37
- exports.TouchableWithoutFeedback = React.forwardRef((props, ref) => React.createElement(ReactNative.TouchableWithoutFeedback, Object.assign({}, props, { ref: ref })));
38
- exports.TouchableWithoutFeedback._dtInfo = { type: Types_1.Types.TouchableWithoutFeedback };
37
+ exports.TouchableWithoutFeedback = React.forwardRef((props, ref) => (React.createElement(ReactNative.TouchableWithoutFeedback, Object.assign({}, props, { ref: ref }))));
38
+ exports.TouchableWithoutFeedback._dtInfo = {
39
+ type: Types_1.Types.TouchableWithoutFeedback,
40
+ };
39
41
  if (typeof ReactNative.Text === 'object') {
40
42
  exports.Text = Object.assign({ _dtInfo: { type: Types_1.Types.Text } }, ReactNative.Text);
41
43
  }
@@ -45,5 +47,5 @@ else {
45
47
  _d._dtInfo = { type: Types_1.Types.Text },
46
48
  _d);
47
49
  }
48
- exports.Pressable = React.forwardRef((props, ref) => React.createElement(ReactNative.Pressable, Object.assign({}, props, { ref: ref })));
50
+ exports.Pressable = React.forwardRef((props, ref) => (React.createElement(ReactNative.Pressable, Object.assign({}, props, { ref: ref }))));
49
51
  exports.Pressable._dtInfo = { type: Types_1.Types.Pressable };
@@ -6,10 +6,14 @@ const Logger_1 = require("../instrumentor/base/Logger");
6
6
  let isRegistered = false;
7
7
  const registerListener = (navContainer) => {
8
8
  React.useEffect(() => {
9
- if (isRegistered && navContainer.current != null && navContainer.current.addListener != null) {
9
+ if (isRegistered &&
10
+ navContainer.current != null &&
11
+ navContainer.current.addListener != null) {
10
12
  isRegistered = true;
11
13
  navContainer.current.addListener('__unsafe_action__', (data) => {
12
- if (data != null && data.data != null && data.data.action != null) {
14
+ if (data != null &&
15
+ data.data != null &&
16
+ data.data.action != null) {
13
17
  Logger_1.Logger.logDebug(`ReactNavigation Listener Dispatch: ${JSON.stringify(data.data.action)}`);
14
18
  }
15
19
  });
package/package.json CHANGED
@@ -1,177 +1,181 @@
1
1
  {
2
- "name": "@dynatrace/react-native-plugin",
3
- "version": "2.301.1",
4
- "description": "This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.",
5
- "main": "index.js",
6
- "types": "typings/react-native-dynatrace.d.ts",
7
- "bin": {
8
- "instrumentDynatrace": "scripts/Instrument.js",
9
- "configDynatrace": "scripts/CheckConfig.js"
10
- },
11
- "keywords": [
12
- "react-native",
13
- "dynatrace",
14
- "mobile",
15
- "android",
16
- "ios",
17
- "performance",
18
- "monitoring"
2
+ "name": "@dynatrace/react-native-plugin",
3
+ "version": "2.301.2",
4
+ "description": "This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.",
5
+ "main": "index.js",
6
+ "types": "typings/react-native-dynatrace.d.ts",
7
+ "bin": {
8
+ "instrumentDynatrace": "scripts/Instrument.js",
9
+ "configDynatrace": "scripts/CheckConfig.js"
10
+ },
11
+ "keywords": [
12
+ "react-native",
13
+ "dynatrace",
14
+ "mobile",
15
+ "android",
16
+ "ios",
17
+ "performance",
18
+ "monitoring"
19
+ ],
20
+ "rnpm": {
21
+ "plugin": "./command/command.js"
22
+ },
23
+ "scripts": {
24
+ "uninstall": "node ./scripts/Uninstall.js",
25
+ "test": "jest --runInBand",
26
+ "test:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand",
27
+ "tsc": "tsc",
28
+ "tsc:prod": "tsc -p tsconfig.release.json",
29
+ "lint": "eslint --cache src/**/*.ts --ignore-pattern .gitignore",
30
+ "lint:spec": "eslint --cache tests/**/*.ts --cache-file tests/.eslintcache --ignore-pattern .gitignore --fix",
31
+ "prettier:check": "prettier --check ./src",
32
+ "prettier:write": "prettier --write ./src",
33
+ "prepare": "husky"
34
+ },
35
+ "jest": {
36
+ "preset": "react-native",
37
+ "moduleDirectories": [
38
+ "node_modules"
19
39
  ],
20
- "rnpm": {
21
- "plugin": "./command/command.js"
22
- },
23
- "scripts": {
24
- "uninstall": "node ./scripts/Uninstall.js",
25
- "test": "jest --runInBand",
26
- "test:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand",
27
- "tsc": "tsc",
28
- "tsc:prod": "tsc -p tsconfig.release.json",
29
- "lint": "eslint --cache src/**/*.ts --ignore-pattern .gitignore",
30
- "lint:spec": "eslint --cache tests/**/*.ts --cache-file tests/.eslintcache --ignore-pattern .gitignore --fix"
31
- },
32
- "jest": {
33
- "preset": "react-native",
34
- "moduleDirectories": [
35
- "node_modules"
36
- ],
37
- "unmockedModulePathPatterns": [
38
- "node_modules"
39
- ],
40
- "modulePathIgnorePatterns": [
41
- "<rootDir>/src",
42
- "<rootDir>/tests/commandTestTmp",
43
- "node_modules/react-native/local-cli"
44
- ],
45
- "transform": {
46
- "^.+\\.(ts|tsx)$": "ts-jest"
47
- },
48
- "testPathIgnorePatterns": [
49
- "<rootDir>/src",
50
- "<rootDir>/tests/commandTestTmp"
51
- ],
52
- "transformIgnorePatterns": [
53
- "node_modules/(?!(@react-native|react-native)/)"
54
- ],
55
- "setupFiles": [
56
- "<rootDir>/tests/setup/setup.js"
57
- ],
58
- "testResultsProcessor": "jest-junit",
59
- "testRegex": [
60
- "(/__tests__/.*|(\\.|/)(Test|spec))\\.[jt]sx?$"
61
- ]
62
- },
63
- "jest-junit": {
64
- "suiteName": "jest tests",
65
- "outputDirectory": ".",
66
- "outputName": "junit.xml",
67
- "uniqueOutputName": "true",
68
- "ancestorSeparator": " › ",
69
- "usePathForSuiteName": "true"
70
- },
71
- "author": "Dynatrace",
72
- "license": "SEE LICENSE IN LICENSE.md",
73
- "dependencies": {
74
- "@babel/runtime": "^7.25.7",
75
- "jscodeshift": "^17.0.0",
76
- "plist": "^3.1.0",
77
- "proxy-polyfill": "^0.3.2",
78
- "semver": "^7.6.3"
79
- },
80
- "homepage": "https://www.dynatrace.com/",
81
- "peerDependencies": {
82
- "@babel/parser": ">=7.4.4",
83
- "@react-native-picker/picker": ">=1.0.0",
84
- "react": ">=16.11.0",
85
- "react-native": ">=0.62.0"
86
- },
87
- "devDependencies": {
88
- "@babel/cli": "^7.25.7",
89
- "@babel/plugin-proposal-class-properties": "^7.8.3",
90
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
91
- "@babel/plugin-proposal-optional-chaining": "^7.8.3",
92
- "@babel/plugin-transform-flow-strip-types": "^7.8.3",
93
- "@babel/plugin-transform-runtime": "^7.12.1",
94
- "@babel/preset-env": "^7.4.4",
95
- "@babel/preset-react": "^7.8.3",
96
- "@testing-library/react-native": "^7.0.2",
97
- "@types/jest": "^29.5.1",
98
- "@types/jscodeshift": "^0.11.6",
99
- "@types/libxmljs": "^0.18.3",
100
- "@types/node": "^18.17.12",
101
- "@types/plist": "^3.0.2",
102
- "@types/react-native": "^0.63.32",
103
- "@types/semver": "^7.5.0",
104
- "@types/shelljs": "^0.8.8",
105
- "@types/uglify-js": "^3.17.1",
106
- "@typescript-eslint/eslint-plugin": "^5.16.0",
107
- "@typescript-eslint/parser": "^5.16.0",
108
- "compressing": "^1.5.1",
109
- "eslint": "^8.45.0",
110
- "eslint-config-prettier": "^8.5.0",
111
- "eslint-plugin-import": "^2.26.0",
112
- "eslint-plugin-jsdoc": "^39.1.0",
113
- "eslint-plugin-prefer-arrow": "^1.2.3",
114
- "eslint-plugin-unicorn": "^42.0.0",
115
- "jest": "^28.1.3",
116
- "jest-each": "^28.1.3",
117
- "jest-junit": "^14.0.0",
118
- "jest-mock": "^28.1.3",
119
- "npm-check-updates": "^16.10.12",
120
- "prettier": "^2.6.1",
121
- "shelljs": "^0.8.5",
122
- "ts-jest": "^28.0.7",
123
- "ts-mockito": "^2.6.1",
124
- "typescript": "^4.7.4",
125
- "uglify-js": "^3.17.4"
40
+ "unmockedModulePathPatterns": [
41
+ "node_modules"
42
+ ],
43
+ "modulePathIgnorePatterns": [
44
+ "<rootDir>/src",
45
+ "<rootDir>/tests/commandTestTmp",
46
+ "node_modules/react-native/local-cli"
47
+ ],
48
+ "transform": {
49
+ "^.+\\.(ts|tsx)$": "ts-jest"
126
50
  },
127
- "files": [
128
- "command/command.js",
129
- "command/util/*",
130
- "command/interface/*",
131
- "android/build.gradle",
132
- "android/src/**/*",
133
- "ios/**/*",
134
- "files/*",
135
- "lib/instrumentor/base/*.js",
136
- "lib/instrumentor/base/model/*.js",
137
- "lib/instrumentor/base/configuration/*.js",
138
- "lib/instrumentor/base/configuration/interface/*.js",
139
- "lib/instrumentor/base/interface/*.js",
140
- "lib/instrumentor/base/util/*.js",
141
- "lib/instrumentor/model/*.js",
142
- "lib/instrumentor/parser/*.js",
143
- "lib/instrumentor/DynatraceInstrumentation.js",
144
- "lib/*.js",
145
- "lib/community/*.js",
146
- "lib/community/gesture-handler/*.js",
147
- "lib/react-navigation/*.js",
148
- "lib/react-native/*.js",
149
- "lib/react-native/Touchables.jsx",
150
- "lib/react/*.js",
151
- "lib/metro/*.js",
152
- "lib/util/*.js",
153
- "react-native.config.js",
154
- "react-native-dynatrace.js",
155
- "react-native-dynatrace.podspec",
156
- "README.md",
157
- "LICENSE.md",
158
- "scripts/*",
159
- "scripts/api/*",
160
- "scripts/core/*",
161
- "scripts/api/model/*",
162
- "scripts/util/*",
163
- "typings/*",
164
- "package.json",
165
- "jsx-runtime.js",
166
- "jsx-dev-runtime.js",
167
- "src/lib/instrumentor/base/interface/NativeDynatraceBridge.ts"
51
+ "testPathIgnorePatterns": [
52
+ "<rootDir>/src",
53
+ "<rootDir>/tests/commandTestTmp"
54
+ ],
55
+ "transformIgnorePatterns": [
56
+ "node_modules/(?!(@react-native|react-native)/)"
57
+ ],
58
+ "setupFiles": [
59
+ "<rootDir>/tests/setup/setup.js"
168
60
  ],
169
- "codegenConfig": {
170
- "name": "DynatraceBridgeSpec",
171
- "type": "modules",
172
- "jsSrcsDir": "src",
173
- "android": {
174
- "javaPackageName": "com.dynatrace.android.agent"
175
- }
61
+ "testResultsProcessor": "jest-junit",
62
+ "testRegex": [
63
+ "(/__tests__/.*|(\\.|/)(Test|spec))\\.[jt]sx?$"
64
+ ]
65
+ },
66
+ "jest-junit": {
67
+ "suiteName": "jest tests",
68
+ "outputDirectory": ".",
69
+ "outputName": "junit.xml",
70
+ "uniqueOutputName": "true",
71
+ "ancestorSeparator": " › ",
72
+ "usePathForSuiteName": "true"
73
+ },
74
+ "author": "Dynatrace",
75
+ "license": "SEE LICENSE IN LICENSE.md",
76
+ "dependencies": {
77
+ "@babel/runtime": "^7.26.0",
78
+ "jscodeshift": "^17.1.1",
79
+ "plist": "^3.1.0",
80
+ "proxy-polyfill": "^0.3.2",
81
+ "semver": "^7.6.3"
82
+ },
83
+ "homepage": "https://www.dynatrace.com/",
84
+ "peerDependencies": {
85
+ "@babel/parser": ">=7.4.4",
86
+ "@react-native-picker/picker": ">=1.0.0",
87
+ "react": ">=16.11.0",
88
+ "react-native": ">=0.62.0"
89
+ },
90
+ "devDependencies": {
91
+ "@babel/cli": "^7.25.7",
92
+ "@babel/plugin-proposal-class-properties": "^7.8.3",
93
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
94
+ "@babel/plugin-proposal-optional-chaining": "^7.8.3",
95
+ "@babel/plugin-transform-flow-strip-types": "^7.8.3",
96
+ "@babel/plugin-transform-runtime": "^7.12.1",
97
+ "@babel/preset-env": "^7.4.4",
98
+ "@babel/preset-react": "^7.8.3",
99
+ "@testing-library/react-native": "^7.0.2",
100
+ "@types/jest": "^29.5.1",
101
+ "@types/jscodeshift": "^0.11.6",
102
+ "@types/libxmljs": "^0.18.3",
103
+ "@types/node": "^18.17.12",
104
+ "@types/plist": "^3.0.2",
105
+ "@types/react-native": "^0.63.32",
106
+ "@types/semver": "^7.5.0",
107
+ "@types/shelljs": "^0.8.8",
108
+ "@types/uglify-js": "^3.17.1",
109
+ "@typescript-eslint/eslint-plugin": "^5.16.0",
110
+ "@typescript-eslint/parser": "^5.16.0",
111
+ "compressing": "^1.5.1",
112
+ "eslint": "^8.45.0",
113
+ "eslint-config-prettier": "^8.5.0",
114
+ "eslint-plugin-import": "^2.26.0",
115
+ "eslint-plugin-jsdoc": "^39.1.0",
116
+ "eslint-plugin-prefer-arrow": "^1.2.3",
117
+ "eslint-plugin-unicorn": "^42.0.0",
118
+ "husky": "^9.1.6",
119
+ "jest": "^28.1.3",
120
+ "jest-each": "^28.1.3",
121
+ "jest-junit": "^14.0.0",
122
+ "jest-mock": "^28.1.3",
123
+ "npm-check-updates": "^16.10.12",
124
+ "prettier": "^2.6.1",
125
+ "shelljs": "^0.8.5",
126
+ "ts-jest": "^28.0.7",
127
+ "ts-mockito": "^2.6.1",
128
+ "typescript": "^4.7.4",
129
+ "uglify-js": "^3.17.4"
130
+ },
131
+ "files": [
132
+ "command/command.js",
133
+ "command/util/*",
134
+ "command/interface/*",
135
+ "android/build.gradle",
136
+ "android/src/**/*",
137
+ "ios/**/*",
138
+ "files/*",
139
+ "lib/instrumentor/base/*.js",
140
+ "lib/instrumentor/base/model/*.js",
141
+ "lib/instrumentor/base/configuration/*.js",
142
+ "lib/instrumentor/base/configuration/interface/*.js",
143
+ "lib/instrumentor/base/interface/*.js",
144
+ "lib/instrumentor/base/util/*.js",
145
+ "lib/instrumentor/model/*.js",
146
+ "lib/instrumentor/parser/*.js",
147
+ "lib/instrumentor/DynatraceInstrumentation.js",
148
+ "lib/*.js",
149
+ "lib/community/*.js",
150
+ "lib/community/gesture-handler/*.js",
151
+ "lib/react-navigation/*.js",
152
+ "lib/react-native/*.js",
153
+ "lib/react-native/Touchables.jsx",
154
+ "lib/react/*.js",
155
+ "lib/metro/*.js",
156
+ "lib/util/*.js",
157
+ "react-native.config.js",
158
+ "react-native-dynatrace.js",
159
+ "react-native-dynatrace.podspec",
160
+ "README.md",
161
+ "LICENSE.md",
162
+ "scripts/*",
163
+ "scripts/api/*",
164
+ "scripts/core/*",
165
+ "scripts/api/model/*",
166
+ "scripts/util/*",
167
+ "typings/*",
168
+ "package.json",
169
+ "jsx-runtime.js",
170
+ "jsx-dev-runtime.js",
171
+ "src/lib/instrumentor/base/interface/NativeDynatraceBridge.ts"
172
+ ],
173
+ "codegenConfig": {
174
+ "name": "DynatraceBridgeSpec",
175
+ "type": "modules",
176
+ "jsSrcsDir": "src",
177
+ "android": {
178
+ "javaPackageName": "com.dynatrace.android.agent"
176
179
  }
180
+ }
177
181
  }
@@ -6,88 +6,160 @@ import { TurboModuleRegistry } from 'react-native';
6
6
  import { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
7
7
 
8
8
  export interface Spec extends TurboModule {
9
- getConstants: () => {
10
- DATA_COLLECTION_OFF: string;
11
- DATA_COLLECTION_PERFORMANCE: string;
12
- DATA_COLLECTION_USERBEHAVIOR: string;
13
- PLATFORM_ANDROID: string;
14
- PLATFORM_IOS: string;
15
- };
16
-
17
- start(configuration: UnsafeObject): Promise<boolean>;
18
-
19
- enterAction(name: string, key: string, platform?: string): void;
20
-
21
- enterManualAction(name: string, key: string, platform?: string): void;
22
-
23
- enterManualActionWithParent(name: string, key: string, parentKey: string, platform?: string): void;
24
-
25
- leaveAction(key: string, leave: boolean, platform?: string): void;
26
-
27
- cancelAction(key: string, platfrom?: string): void;
28
-
29
- endVisit(platform?: string): void;
30
-
31
- reportErrorWithoutStacktrace(errorName: string, errorCode: number, platform?: string): void;
32
-
33
- reportError(errorName: string, errorValue: string, reason: string, stacktrace: string, platform?: string): void;
34
-
35
- // eslint-disable-next-line max-len
36
- reportCrash(errorName: string, reason: string, stacktrace: string, isRealError: boolean, platform?: string): void;
37
-
38
- storeCrash(errorName: string, reason: string, stacktrace: string): void;
39
-
40
- reportErrorInAction(key: string, errorName: string, errorCode: number, platform?: string): void;
41
-
42
- reportValue(key: string, valueName: string, value: string, platform?: string): void;
43
-
44
- getRequestTag(key: string, url: string): Promise<string>;
45
-
46
- identifyUser(user: string, plaform?: string): void;
47
-
48
- reportEventInAction(actionKey: string, name: string, platform?: string): void;
49
-
50
- reportStringValueInAction(actionKey: string, name: string, value: string, platform?: string): void;
51
-
52
- reportIntValueInAction(actionKey: string, name: string, value: number, platform?: string): void;
53
-
54
- reportDoubleValueInAction(actionKey: string, name: string, value: number, platform?: string): void;
55
-
56
- sendEvent(name: string, attributes: UnsafeObject, plaform?: string): void;
57
-
58
- sendBizEvent(type: string, attributes: UnsafeObject, plaform?: string): void;
59
-
60
- setGPSLocation(latitude: number, longitude: number, platform?: string): void;
61
-
62
- flushEvents(platform?: string): void;
63
-
64
- isCrashReportingOptedIn(platform?: string): Promise<boolean>;
65
-
66
- setCrashReportingOptedIn(crashReporting: boolean, platform?: string): void;
67
-
68
- setDataCollectionLevel(collectionLevel: string, platform?: string): void;
69
-
70
- getDataCollectionLevel(platform?: string): Promise<string>;
71
-
72
- // eslint-disable-next-line @typescript-eslint/ban-types
73
- setBeaconHeaders(headers?: Object | null, platform?: string): void;
74
-
75
- getUserPrivacyOptions(platform?: string): Promise<NativeUserPrivacyOptions>;
76
-
77
- applyUserPrivacyOptions(userPrivacyOptions: UnsafeObject, platform?: string): void;
78
-
79
- startWebRequestTiming(requestTag: string, url: string): void;
80
-
81
- stopWebRequestTiming(requestTag: string, url: string, responseCode: number, responseMessage: string): void;
82
-
83
- stopWebRequestTimingWithSize(requestTag: string, url: string, responseCode: number, responseMessage: string,
84
- requestSize: number, responseSize: number): void;
9
+ getConstants: () => {
10
+ DATA_COLLECTION_OFF: string;
11
+ DATA_COLLECTION_PERFORMANCE: string;
12
+ DATA_COLLECTION_USERBEHAVIOR: string;
13
+ PLATFORM_ANDROID: string;
14
+ PLATFORM_IOS: string;
15
+ };
16
+
17
+ start(configuration: UnsafeObject): Promise<boolean>;
18
+
19
+ enterAction(name: string, key: string, platform?: string): void;
20
+
21
+ enterManualAction(name: string, key: string, platform?: string): void;
22
+
23
+ enterManualActionWithParent(
24
+ name: string,
25
+ key: string,
26
+ parentKey: string,
27
+ platform?: string,
28
+ ): void;
29
+
30
+ leaveAction(key: string, leave: boolean, platform?: string): void;
31
+
32
+ cancelAction(key: string, platfrom?: string): void;
33
+
34
+ endVisit(platform?: string): void;
35
+
36
+ reportErrorWithoutStacktrace(
37
+ errorName: string,
38
+ errorCode: number,
39
+ platform?: string,
40
+ ): void;
41
+
42
+ reportError(
43
+ errorName: string,
44
+ errorValue: string,
45
+ reason: string,
46
+ stacktrace: string,
47
+ platform?: string,
48
+ ): void;
49
+
50
+ // eslint-disable-next-line max-len
51
+ reportCrash(
52
+ errorName: string,
53
+ reason: string,
54
+ stacktrace: string,
55
+ isRealError: boolean,
56
+ platform?: string,
57
+ ): void;
58
+
59
+ storeCrash(errorName: string, reason: string, stacktrace: string): void;
60
+
61
+ reportErrorInAction(
62
+ key: string,
63
+ errorName: string,
64
+ errorCode: number,
65
+ platform?: string,
66
+ ): void;
67
+
68
+ reportValue(
69
+ key: string,
70
+ valueName: string,
71
+ value: string,
72
+ platform?: string,
73
+ ): void;
74
+
75
+ getRequestTag(key: string, url: string): Promise<string>;
76
+
77
+ identifyUser(user: string, plaform?: string): void;
78
+
79
+ reportEventInAction(
80
+ actionKey: string,
81
+ name: string,
82
+ platform?: string,
83
+ ): void;
84
+
85
+ reportStringValueInAction(
86
+ actionKey: string,
87
+ name: string,
88
+ value: string,
89
+ platform?: string,
90
+ ): void;
91
+
92
+ reportIntValueInAction(
93
+ actionKey: string,
94
+ name: string,
95
+ value: number,
96
+ platform?: string,
97
+ ): void;
98
+
99
+ reportDoubleValueInAction(
100
+ actionKey: string,
101
+ name: string,
102
+ value: number,
103
+ platform?: string,
104
+ ): void;
105
+
106
+ sendEvent(name: string, attributes: UnsafeObject, plaform?: string): void;
107
+
108
+ sendBizEvent(
109
+ type: string,
110
+ attributes: UnsafeObject,
111
+ plaform?: string,
112
+ ): void;
113
+
114
+ setGPSLocation(
115
+ latitude: number,
116
+ longitude: number,
117
+ platform?: string,
118
+ ): void;
119
+
120
+ flushEvents(platform?: string): void;
121
+
122
+ isCrashReportingOptedIn(platform?: string): Promise<boolean>;
123
+
124
+ setCrashReportingOptedIn(crashReporting: boolean, platform?: string): void;
125
+
126
+ setDataCollectionLevel(collectionLevel: string, platform?: string): void;
127
+
128
+ getDataCollectionLevel(platform?: string): Promise<string>;
129
+
130
+ // eslint-disable-next-line @typescript-eslint/ban-types
131
+ setBeaconHeaders(headers?: Object | null, platform?: string): void;
132
+
133
+ getUserPrivacyOptions(platform?: string): Promise<NativeUserPrivacyOptions>;
134
+
135
+ applyUserPrivacyOptions(
136
+ userPrivacyOptions: UnsafeObject,
137
+ platform?: string,
138
+ ): void;
139
+
140
+ startWebRequestTiming(requestTag: string, url: string): void;
141
+
142
+ stopWebRequestTiming(
143
+ requestTag: string,
144
+ url: string,
145
+ responseCode: number,
146
+ responseMessage: string,
147
+ ): void;
148
+
149
+ stopWebRequestTimingWithSize(
150
+ requestTag: string,
151
+ url: string,
152
+ responseCode: number,
153
+ responseMessage: string,
154
+ requestSize: number,
155
+ responseSize: number,
156
+ ): void;
85
157
  }
86
158
 
87
159
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
88
160
  export type NativeUserPrivacyOptions = {
89
- dataCollectionLevel: string;
90
- crashReportingOptedIn: boolean;
161
+ dataCollectionLevel: string;
162
+ crashReportingOptedIn: boolean;
91
163
  };
92
164
 
93
165
  export default TurboModuleRegistry.getEnforcing<Spec>('DynatraceBridge');