noibu-react-native 0.2.2 → 0.2.3
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.
- package/README.md +1 -1
- package/dist/api/clientConfig.js +225 -217
- package/dist/api/metroplexSocket.js +406 -416
- package/dist/constants.js +14 -2
- package/dist/entry/init.js +58 -56
- package/dist/monitors/appNavigationMonitor.js +2 -3
- package/dist/monitors/clickMonitor.js +16 -9
- package/dist/monitors/errorMonitor.js +30 -8
- package/dist/monitors/gqlErrorValidator.js +4 -4
- package/dist/monitors/httpDataBundler.js +525 -713
- package/dist/monitors/integrations/react-native-navigation-integration.js +4 -2
- package/dist/monitors/requestMonitor.js +350 -365
- package/dist/pageVisit/eventDebouncer.js +110 -0
- package/dist/pageVisit/pageVisitEventError.js +1 -1
- package/dist/pageVisit/pageVisitEventHTTP.js +78 -93
- package/dist/react/ErrorBoundary.js +18 -15
- package/dist/sessionRecorder/nativeSessionRecorderSubscription.js +3 -2
- package/dist/sessionRecorder/sessionRecorder.js +151 -150
- package/dist/{api → src/api}/clientConfig.d.ts +1 -1
- package/dist/{api → src/api}/metroplexSocket.d.ts +25 -25
- package/dist/{constants.d.ts → src/constants.d.ts} +44 -0
- package/dist/{entry → src/entry}/init.d.ts +1 -1
- package/dist/{monitors → src/monitors}/clickMonitor.d.ts +1 -1
- package/dist/{monitors → src/monitors}/gqlErrorValidator.d.ts +6 -6
- package/dist/src/monitors/httpDataBundler.d.ts +127 -0
- package/dist/src/monitors/requestMonitor.d.ts +10 -0
- package/dist/src/pageVisit/eventDebouncer.d.ts +31 -0
- package/dist/src/pageVisit/pageVisitEventHTTP.d.ts +25 -0
- package/dist/{sessionRecorder → src/sessionRecorder}/types.d.ts +1 -1
- package/dist/{storage → src/storage}/storage.d.ts +1 -1
- package/dist/{storage → src/storage}/storageProvider.d.ts +1 -1
- package/dist/{utils → src/utils}/function.d.ts +25 -4
- package/dist/{utils → src/utils}/object.d.ts +9 -4
- package/dist/src/utils/piiRedactor.d.ts +11 -0
- package/dist/src/utils/polyfills.d.ts +7 -0
- package/dist/storage/rnStorageProvider.js +7 -4
- package/dist/storage/storage.js +43 -35
- package/dist/storage/storageProvider.js +23 -19
- package/dist/types/Config.d.ts +24 -20
- package/dist/types/PageVisit.types.d.ts +151 -0
- package/dist/types/PageVisitMetrics.types.d.ts +27 -0
- package/dist/types/RRWeb.d.ts +48 -0
- package/dist/types/StoredPageVisit.types.d.ts +2 -4
- package/dist/types/WrappedObjects.d.ts +6 -0
- package/dist/utils/function.js +110 -76
- package/dist/utils/object.js +58 -6
- package/dist/utils/piiRedactor.js +98 -0
- package/dist/utils/polyfills.js +24 -0
- package/package.json +5 -6
- package/dist/monitors/httpDataBundler.d.ts +0 -161
- package/dist/monitors/requestMonitor.d.ts +0 -10
- package/dist/pageVisit/pageVisitEventHTTP.d.ts +0 -18
- package/dist/types/PageVisit.d.ts +0 -22
- package/dist/types/globals.d.ts +0 -45
- /package/dist/{api → src/api}/helpCode.d.ts +0 -0
- /package/dist/{api → src/api}/inputManager.d.ts +0 -0
- /package/dist/{api → src/api}/storedMetrics.d.ts +0 -0
- /package/dist/{api → src/api}/storedPageVisit.d.ts +0 -0
- /package/dist/{const_matchers.d.ts → src/const_matchers.d.ts} +0 -0
- /package/dist/{entry → src/entry}/index.d.ts +0 -0
- /package/dist/{monitors → src/monitors}/appNavigationMonitor.d.ts +0 -0
- /package/dist/{monitors → src/monitors}/errorMonitor.d.ts +0 -0
- /package/dist/{monitors → src/monitors}/inputMonitor.d.ts +0 -0
- /package/dist/{monitors → src/monitors}/integrations/react-native-navigation-integration.d.ts +0 -0
- /package/dist/{monitors → src/monitors}/keyboardInputMonitor.d.ts +0 -0
- /package/dist/{monitors → src/monitors}/pageMonitor.d.ts +0 -0
- /package/dist/{pageVisit → src/pageVisit}/pageVisit.d.ts +0 -0
- /package/dist/{pageVisit → src/pageVisit}/pageVisitEventError.d.ts +0 -0
- /package/dist/{pageVisit → src/pageVisit}/userStep.d.ts +0 -0
- /package/dist/{react → src/react}/ErrorBoundary.d.ts +0 -0
- /package/dist/{sessionRecorder → src/sessionRecorder}/nativeSessionRecorderSubscription.d.ts +0 -0
- /package/dist/{sessionRecorder → src/sessionRecorder}/sessionRecorder.d.ts +0 -0
- /package/dist/{storage → src/storage}/rnStorageProvider.d.ts +0 -0
- /package/dist/{utils → src/utils}/date.d.ts +0 -0
- /package/dist/{utils → src/utils}/eventlistener.d.ts +0 -0
- /package/dist/{utils → src/utils}/log.d.ts +0 -0
- /package/dist/{utils → src/utils}/performance.d.ts +0 -0
- /package/dist/{utils → src/utils}/stacktrace-parser.d.ts +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __awaiter } from 'tslib';
|
|
1
2
|
import { strToU8, zlibSync, strFromU8 } from 'fflate';
|
|
2
3
|
import { LogLevel, initialize, subscribeToNativeEvent } from './nativeSessionRecorderSubscription.js';
|
|
3
4
|
import StoredMetrics from '../api/storedMetrics.js';
|
|
@@ -10,21 +11,11 @@ import { noibuLog } from '../utils/log.js';
|
|
|
10
11
|
|
|
11
12
|
/** Singleton class to record user sessions */
|
|
12
13
|
class SessionRecorder {
|
|
13
|
-
static instance;
|
|
14
|
-
eventBuffer;
|
|
15
|
-
vfCounter;
|
|
16
|
-
didSetupRecorder;
|
|
17
|
-
isVideoLengthNegativeInvalid;
|
|
18
|
-
lastFragPostTimestamp;
|
|
19
|
-
pauseTimeout;
|
|
20
|
-
lastRecordedTimestamp;
|
|
21
|
-
firstRecordedTimestamp;
|
|
22
|
-
recordStopper;
|
|
23
|
-
freezingEvents = false;
|
|
24
14
|
/**
|
|
25
15
|
* Creates an instance of the session recorder
|
|
26
16
|
*/
|
|
27
17
|
constructor() {
|
|
18
|
+
this.freezingEvents = false;
|
|
28
19
|
this.eventBuffer = [];
|
|
29
20
|
this.vfCounter = 0;
|
|
30
21
|
this.didSetupRecorder = false;
|
|
@@ -94,21 +85,23 @@ class SessionRecorder {
|
|
|
94
85
|
/**
|
|
95
86
|
* Starts recording the user session
|
|
96
87
|
*/
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
88
|
+
recordUserSession() {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
// check if inactive before starting any recording
|
|
91
|
+
noibuLog('recordUserSession');
|
|
92
|
+
if ((yield MetroplexSocket.getInstance().closeIfInactive()) ||
|
|
93
|
+
StoredMetrics.getInstance().didCutVideo) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
// making sure we are not attempting to call this method
|
|
97
|
+
// multiple times.
|
|
98
|
+
if (this.didSetupRecorder) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
StoredMetrics.getInstance().setDidStartVideo();
|
|
102
|
+
this.recordStopper = subscribeToNativeEvent(this.handleRecorderEvent.bind(this));
|
|
103
|
+
this.didSetupRecorder = true;
|
|
104
|
+
});
|
|
112
105
|
}
|
|
113
106
|
/**
|
|
114
107
|
* handleNewRRwebEvent will process each upcoming.
|
|
@@ -116,71 +109,75 @@ class SessionRecorder {
|
|
|
116
109
|
* is updated with the latest events and post the contents
|
|
117
110
|
* of the buffer if it exceeds max size
|
|
118
111
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
this.firstRecordedTimestamp
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this.lastRecordedTimestamp
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
112
|
+
handleRecorderEvent(recorderEvent) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
const timestamp = Date.now();
|
|
115
|
+
// check if inactive before any processing
|
|
116
|
+
if ((yield MetroplexSocket.getInstance().closeIfInactive()) ||
|
|
117
|
+
StoredMetrics.getInstance().didCutVideo) {
|
|
118
|
+
this.freeze();
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
// determine if timeout should be extended based on event/source type
|
|
122
|
+
// event type 3 is an incremental snapshot
|
|
123
|
+
// event data source 0 is a mutation (all other data sources are user events)
|
|
124
|
+
if (this.pauseTimeout) {
|
|
125
|
+
// received a user event, extend the timeout
|
|
126
|
+
clearTimeout(this.pauseTimeout);
|
|
127
|
+
this.freezingEvents = false;
|
|
128
|
+
}
|
|
129
|
+
this.pauseTimeout = setTimeout(() => {
|
|
130
|
+
// stop recording page mutations after 2s of inactivity
|
|
131
|
+
// otherwise sites with many mutations will hit max video size
|
|
132
|
+
// in a short amount of time without any user events
|
|
133
|
+
this.freezingEvents = true;
|
|
134
|
+
// freezePage stops emitting events until the next user event is received
|
|
135
|
+
this.freeze();
|
|
136
|
+
}, MAX_TIME_FOR_RECORDER_USER_EVENTS);
|
|
137
|
+
// Set the first recorded timestamp if it hasn't been set yet.
|
|
138
|
+
// We usually only want this to be set once as the first recorded timestamp
|
|
139
|
+
// should not change.
|
|
140
|
+
if (!this.firstRecordedTimestamp) {
|
|
141
|
+
this.firstRecordedTimestamp = timestamp;
|
|
142
|
+
}
|
|
143
|
+
// Set the last recorded timestamp if it hasn't been set yet or a newly received rrweb
|
|
144
|
+
// event has a more recent timestamp than the last recorded timestamp.
|
|
145
|
+
if (!this.lastRecordedTimestamp || timestamp > this.lastRecordedTimestamp) {
|
|
146
|
+
this.lastRecordedTimestamp = timestamp;
|
|
147
|
+
}
|
|
148
|
+
// Checks if we've gone back in time for some reason.
|
|
149
|
+
// If we have, adjust our data accordingly to ensure we don't mess up
|
|
150
|
+
// the metrics 'exp_vid_len' data.
|
|
151
|
+
// If we don't adjust for time, we assume that the expected video length is
|
|
152
|
+
// the difference between the first recorded timestamp and the last recorded timestamp.
|
|
153
|
+
if (this.firstRecordedTimestamp &&
|
|
154
|
+
timestamp < this.firstRecordedTimestamp) {
|
|
155
|
+
ClientConfig.getInstance().postNoibuErrorAndOptionallyDisableClient(`Detected time rewind. Client has been disabled.`, true, SEVERITY.error, true);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const packedEvent = yield this.pack(recorderEvent.message);
|
|
159
|
+
// Buffer the event for sending to metroplex
|
|
160
|
+
this.eventBuffer.push(packedEvent);
|
|
161
|
+
// Check if the event was a click or a double click. This is true if the root type is
|
|
162
|
+
// incremental snapshot (3) and the data source is mouse interaction data (2).
|
|
163
|
+
// Finally, we capture a click (2) or double click (4) event.
|
|
164
|
+
// todo if there are clicks, call StoredMetrics.getInstance().addVideoClick(); for each click
|
|
165
|
+
const now = Date.now();
|
|
166
|
+
const delta = now - this.lastFragPostTimestamp;
|
|
167
|
+
if (this.eventBuffer.length >= MAX_RECORDER_EVENT_BUFFER ||
|
|
168
|
+
delta > MAX_TIME_FOR_UNSENT_DATA_MILLIS) {
|
|
169
|
+
this.handleFragPost();
|
|
170
|
+
}
|
|
171
|
+
});
|
|
177
172
|
}
|
|
178
173
|
/**
|
|
179
174
|
* Compress event
|
|
180
175
|
*/
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
176
|
+
pack(recorderEvent) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
// return JSON.stringify(recorderEvent);
|
|
179
|
+
return SessionRecorder.compress(recorderEvent);
|
|
180
|
+
});
|
|
184
181
|
}
|
|
185
182
|
static compress(snapshot) {
|
|
186
183
|
const uncompressedString = stringifyJSON(snapshot);
|
|
@@ -200,76 +197,80 @@ class SessionRecorder {
|
|
|
200
197
|
* necessary management of the buffer and it's related
|
|
201
198
|
* variables
|
|
202
199
|
*/
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
if (!this.didSetupRecorder) {
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
if (this.eventBuffer.length === 0) {
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
try {
|
|
215
|
-
let totalVideoTime = 0;
|
|
216
|
-
// checking if we have those values set in the first place
|
|
217
|
-
if (this.firstRecordedTimestamp &&
|
|
218
|
-
this.lastRecordedTimestamp &&
|
|
219
|
-
!this.isVideoLengthNegativeInvalid) {
|
|
220
|
-
totalVideoTime =
|
|
221
|
-
this.lastRecordedTimestamp - this.firstRecordedTimestamp;
|
|
200
|
+
handleFragPost() {
|
|
201
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
+
// check if inactive before any processing
|
|
203
|
+
if (yield MetroplexSocket.getInstance().closeIfInactive()) {
|
|
204
|
+
return;
|
|
222
205
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
// safe integer limit of js.
|
|
226
|
-
if (!this.isVideoLengthNegativeInvalid &&
|
|
227
|
-
(totalVideoTime < 0 || totalVideoTime >= Number.MAX_SAFE_INTEGER)) {
|
|
228
|
-
// we log an error to know if this is still happening
|
|
229
|
-
ClientConfig.getInstance().postNoibuErrorAndOptionallyDisableClient(`video lengthMS is invalid: ${totalVideoTime}, ` +
|
|
230
|
-
`start time: ${this.firstRecordedTimestamp}, ` +
|
|
231
|
-
`end time: ${this.lastRecordedTimestamp}`, false, SEVERITY.error);
|
|
232
|
-
this.isVideoLengthNegativeInvalid = true;
|
|
233
|
-
totalVideoTime = 0;
|
|
206
|
+
if (!this.didSetupRecorder) {
|
|
207
|
+
return;
|
|
234
208
|
}
|
|
235
|
-
this.
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
//
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
209
|
+
if (this.eventBuffer.length === 0) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
try {
|
|
213
|
+
let totalVideoTime = 0;
|
|
214
|
+
// checking if we have those values set in the first place
|
|
215
|
+
if (this.firstRecordedTimestamp &&
|
|
216
|
+
this.lastRecordedTimestamp &&
|
|
217
|
+
!this.isVideoLengthNegativeInvalid) {
|
|
218
|
+
totalVideoTime =
|
|
219
|
+
this.lastRecordedTimestamp - this.firstRecordedTimestamp;
|
|
220
|
+
}
|
|
221
|
+
// In the past we have seen the video LengthMS field to be negative
|
|
222
|
+
// and bigger than the long limit of scala. Which is less than the
|
|
223
|
+
// safe integer limit of js.
|
|
224
|
+
if (!this.isVideoLengthNegativeInvalid &&
|
|
225
|
+
(totalVideoTime < 0 || totalVideoTime >= Number.MAX_SAFE_INTEGER)) {
|
|
226
|
+
// we log an error to know if this is still happening
|
|
227
|
+
ClientConfig.getInstance().postNoibuErrorAndOptionallyDisableClient(`video lengthMS is invalid: ${totalVideoTime}, ` +
|
|
228
|
+
`start time: ${this.firstRecordedTimestamp}, ` +
|
|
229
|
+
`end time: ${this.lastRecordedTimestamp}`, false, SEVERITY.error);
|
|
230
|
+
this.isVideoLengthNegativeInvalid = true;
|
|
231
|
+
totalVideoTime = 0;
|
|
232
|
+
}
|
|
233
|
+
this.vfCounter += 1;
|
|
234
|
+
const videoFragment = MetroplexSocket.getInstance().addEndTimeToPayload({
|
|
235
|
+
// single string for the video content. This gets converted to bytes
|
|
236
|
+
// when being sent to metroplex which we will then unmarshall into
|
|
237
|
+
// a struct to parse it's inner urls
|
|
238
|
+
// If stringifying this event buffer takes too long consider using a service worker
|
|
239
|
+
[VIDEO_FRAG_ATT_NAME]: stringifyJSON(this.eventBuffer),
|
|
240
|
+
// Send the sequence number but don't send the expected length since that is sent as
|
|
241
|
+
// part of the last stored metrics data
|
|
242
|
+
[PV_SEQ_ATT_NAME]: this.vfCounter,
|
|
243
|
+
[LENGTH_ATT_NAME]: totalVideoTime,
|
|
244
|
+
[CSS_URLS_ATT_NAME]: [],
|
|
245
|
+
}, false);
|
|
246
|
+
StoredMetrics.getInstance().addVideoFragData(this.vfCounter, totalVideoTime);
|
|
247
|
+
// constructing a client message that metroplex knows how to handle.
|
|
248
|
+
yield MetroplexSocket.getInstance().sendMessage(VIDEO_METROPLEX_TYPE, {
|
|
249
|
+
[PAGE_VISIT_VID_FRAG_ATT_NAME]: videoFragment,
|
|
250
|
+
});
|
|
251
|
+
this.lastFragPostTimestamp = Date.now();
|
|
252
|
+
}
|
|
253
|
+
catch (err) {
|
|
254
|
+
// letting collect know we are closing the rrweb listener
|
|
255
|
+
ClientConfig.getInstance().postNoibuErrorAndOptionallyDisableClient(`video frag socket closed with err: ${err.message}`, false, SEVERITY.error);
|
|
256
|
+
// if we detect an error in the frag posting, we stop recording
|
|
257
|
+
// the video
|
|
258
|
+
this.freeze();
|
|
259
|
+
}
|
|
260
|
+
this.eventBuffer = [];
|
|
261
|
+
});
|
|
263
262
|
}
|
|
264
263
|
/**
|
|
265
264
|
* unfreeze forcefully resumes recording events in case it was frozen
|
|
266
265
|
* waiting for user events
|
|
267
266
|
*/
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
this.
|
|
271
|
-
|
|
272
|
-
|
|
267
|
+
unfreeze() {
|
|
268
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
269
|
+
if (this.freezingEvents) {
|
|
270
|
+
this.didSetupRecorder = false;
|
|
271
|
+
yield this.recordUserSession();
|
|
272
|
+
}
|
|
273
|
+
});
|
|
273
274
|
}
|
|
274
275
|
/** stops recording */
|
|
275
276
|
freeze() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SEVERITY } from '../constants';
|
|
2
|
-
import { CustomerConfig, StoredConfig } from '
|
|
2
|
+
import { CustomerConfig, StoredConfig } from '../../types/Config';
|
|
3
3
|
/**
|
|
4
4
|
* Singleton class to manage the client configuration
|
|
5
5
|
* this class will be responsible for controlling the disabled
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { END_AT_ATT_NAME } from '../constants';
|
|
2
2
|
/** Manages the socket to Metroplex */
|
|
3
3
|
export default class MetroplexSocket {
|
|
4
|
-
_initialURL:
|
|
5
|
-
ackedOnce:
|
|
6
|
-
connectionCount:
|
|
4
|
+
_initialURL: any;
|
|
5
|
+
ackedOnce: any;
|
|
6
|
+
connectionCount: any;
|
|
7
7
|
connectionPromise: Promise<any>;
|
|
8
|
-
connectionURL:
|
|
9
|
-
currentConnectionAttempts:
|
|
10
|
-
forceClosed:
|
|
8
|
+
connectionURL: any;
|
|
9
|
+
currentConnectionAttempts: any;
|
|
10
|
+
forceClosed: any;
|
|
11
11
|
helpCodeCb: null | ((...args: any[]) => any);
|
|
12
|
-
initialReferingURL:
|
|
12
|
+
initialReferingURL: any;
|
|
13
13
|
static instance: MetroplexSocket;
|
|
14
|
-
instanceId:
|
|
15
|
-
isRetryLoopDisabled:
|
|
16
|
-
latestReceivedSeqNumStoredTime:
|
|
17
|
-
latestReceivedSeqNumber:
|
|
18
|
-
messageSequenceNum:
|
|
19
|
-
metroRetryFrequencyMS:
|
|
14
|
+
instanceId: any;
|
|
15
|
+
isRetryLoopDisabled: any;
|
|
16
|
+
latestReceivedSeqNumStoredTime: any;
|
|
17
|
+
latestReceivedSeqNumber: any;
|
|
18
|
+
messageSequenceNum: any;
|
|
19
|
+
metroRetryFrequencyMS: any;
|
|
20
20
|
metroplexTypeLock: Record<any, any>;
|
|
21
|
-
pageVisitInfoSent:
|
|
22
|
-
postURL:
|
|
23
|
-
previousMessageType:
|
|
21
|
+
pageVisitInfoSent: any;
|
|
22
|
+
postURL: any;
|
|
23
|
+
previousMessageType: any;
|
|
24
24
|
retryMessageQueue: any[];
|
|
25
25
|
retryMetroplexInterval: null | number;
|
|
26
|
-
scriptInstanceId:
|
|
27
|
-
sessionLength:
|
|
26
|
+
scriptInstanceId: any;
|
|
27
|
+
sessionLength: any;
|
|
28
28
|
sessionStartTime: any;
|
|
29
|
-
sessionTimestamp:
|
|
29
|
+
sessionTimestamp: any;
|
|
30
30
|
socket: WebSocket | null;
|
|
31
31
|
socketInstanceId: string | number[] | null;
|
|
32
32
|
socketCloseCodes: string[];
|
|
@@ -136,15 +136,15 @@ export default class MetroplexSocket {
|
|
|
136
136
|
pv_id: string;
|
|
137
137
|
v: 5;
|
|
138
138
|
seq: number | null;
|
|
139
|
-
on_url:
|
|
140
|
-
ref_url:
|
|
141
|
-
start_at:
|
|
142
|
-
conc:
|
|
139
|
+
on_url: any;
|
|
140
|
+
ref_url: any;
|
|
141
|
+
start_at: any;
|
|
142
|
+
conc: any;
|
|
143
143
|
cv: 2;
|
|
144
144
|
last: boolean;
|
|
145
145
|
script_id: string;
|
|
146
|
-
script_inst_id:
|
|
147
|
-
mp_sock_inst_id:
|
|
146
|
+
script_inst_id: any;
|
|
147
|
+
mp_sock_inst_id: any;
|
|
148
148
|
sock_inst_id: string | number[] | null;
|
|
149
149
|
video_recorder: string;
|
|
150
150
|
}>;
|
|
@@ -243,3 +243,47 @@ export declare const BLOCKLISTED_DOMAINS: {
|
|
|
243
243
|
export declare const MAX_RECORDER_EVENT_BUFFER = 10;
|
|
244
244
|
export declare const MAX_TIME_FOR_RECORDER_USER_EVENTS = 2000;
|
|
245
245
|
export declare const POST_METRICS_EVENT_NAME = "noibuPostMetrics";
|
|
246
|
+
export declare const PAGE_CHECK_ERROR_ATT_NAME = "pagecheck_err";
|
|
247
|
+
export declare const RESOURCE_ERROR_ATT_NAME = "res_err";
|
|
248
|
+
export declare const GQL_EXTENSIONS_ATT_NAME = "extensions";
|
|
249
|
+
export declare const GQL_LOCATIONS_ATT_NAME = "locations";
|
|
250
|
+
export declare const GQL_SRC_ATT_NAME = "src";
|
|
251
|
+
export declare const GQL_PATH_ATT_NAME = "path";
|
|
252
|
+
export declare const GQL_LINE_ATT_NAME = "line";
|
|
253
|
+
export declare const GQL_COLUMN_ATT_NAME = "column";
|
|
254
|
+
export declare const GQL_MESSAGE_ATT_NAME = "message";
|
|
255
|
+
export declare const GLOBAL_REASSIGN_ERROR_TYPE = "GlobalReassignError";
|
|
256
|
+
export declare const PAGE_CHECK_ERROR_TYPE = "PageCheckError";
|
|
257
|
+
export declare const IMAGE_ERROR_TYPE = "ImageError";
|
|
258
|
+
export declare const JS_STACK_CAUSE_ATT_NAME = "cause";
|
|
259
|
+
export declare const CUSTOM_ATTRIBUTE_TOTAL_COUNT_ATT_NAME = "cust_attr_total";
|
|
260
|
+
export declare const CUSTOM_ATTRIBUTE_FAIL_COUNT_ATT_NAME = "cust_attr_fail";
|
|
261
|
+
export declare const CUSTOM_ATTRIBUTE_KEY_COUNT_ATT_NAME = "cust_attr_key";
|
|
262
|
+
export declare const OTHER_METRICS_ATT_NAME = "omm";
|
|
263
|
+
export declare const OTHER_METRICS_KEYS: {
|
|
264
|
+
readonly STORAGE_FULL: "sf";
|
|
265
|
+
readonly STORAGE_UNAVAILABLE: "su";
|
|
266
|
+
readonly STORAGE_UNAVAILABLE_SECURITY_ERROR: "suse";
|
|
267
|
+
};
|
|
268
|
+
export declare const BODY_USED_ERROR = "Response data unavailable due to an improperly wrapped fetch call";
|
|
269
|
+
export declare const MAX_HTTP_DATA_IF_ERROR_EVENT_COUNT = 120;
|
|
270
|
+
export declare const MAX_SUCCESS_HTTP_DATA_PAYLOAD_LENGTH = 65536;
|
|
271
|
+
export declare const LOCATION_EVENT_TYPE = "loc";
|
|
272
|
+
export declare const ECOMMERCE_EVENT_TYPE = "ecommerce";
|
|
273
|
+
export declare const NETWORK_STATS_EVENT_TYPE = "network";
|
|
274
|
+
export declare const TITLE_EVENT_TYPE = "title";
|
|
275
|
+
export declare const PAGE_TYPE_EVENT_TYPE = "page_type";
|
|
276
|
+
export declare const HTTP_DATA_COLLECTION_FLAG_NAME = "http_data_collection";
|
|
277
|
+
export declare const HTTP_DATA_PAYLOAD_URL_REGEXES_FLAG_NAME = "http_re";
|
|
278
|
+
export declare const HELP_CODE_EVENT_NAME = "noibuHelpCode";
|
|
279
|
+
export declare const ATTRIBUTE_SELECTORS_ATT_NAME = "att_sel";
|
|
280
|
+
export declare const WIN_NJS_VERSION_ATT_NAME = "njs_version";
|
|
281
|
+
export declare const WIN_SCRIPT_ID_ATT_NAME = "scriptID";
|
|
282
|
+
export declare const WIN_BLOCKED_SELECTOR_ATT_NAME = "sel";
|
|
283
|
+
export declare const DISABLED_STATUS_KEY = "DisabledStatus";
|
|
284
|
+
export declare const CLIENT_UNLOCK_TIME_KEY = "ClientUnlockTime";
|
|
285
|
+
export declare const BROWSER_ID_KEY = "BrowserId";
|
|
286
|
+
export declare const CURRENT_PAGE_VISIT_COUNT_KEY = "CurrentPageVisitCount";
|
|
287
|
+
export declare const PAGE_VISIT_ID_KEY = "pvId";
|
|
288
|
+
export declare const LAST_ACTIVE_TIME_KEY = "LastActive";
|
|
289
|
+
export declare const HELP_CODE_HASH_PARAM_NAME = "#helpcode";
|
|
@@ -34,7 +34,7 @@ export class ClickMonitor {
|
|
|
34
34
|
* @param {Number} textLimit
|
|
35
35
|
* @param {Object} counter
|
|
36
36
|
*/
|
|
37
|
-
_parseInnerContent(element: NReactNative.Node, text: string, textLimit: number, counter:
|
|
37
|
+
_parseInnerContent(element: NReactNative.Node, text: string, textLimit: number, counter: any): string;
|
|
38
38
|
/**
|
|
39
39
|
* normalize value and append to the resulting text if not empty
|
|
40
40
|
* @param {String} text
|
|
@@ -5,11 +5,11 @@ export default class GqlErrorValidator {
|
|
|
5
5
|
/**
|
|
6
6
|
* Retrieves GQL error object based on fetch request/response
|
|
7
7
|
* @param {String} url
|
|
8
|
-
* @param {{}} options
|
|
9
|
-
* @param {Request} request
|
|
10
|
-
* @param {Response} response - cloned() from original response
|
|
8
|
+
* @param {{}} [options]
|
|
9
|
+
* @param {Request} [request]
|
|
10
|
+
* @param {Response} [response] - cloned() from original response
|
|
11
11
|
*/
|
|
12
|
-
static fromFetch(url: string, options
|
|
12
|
+
static fromFetch(url: string, options?: {} | undefined, request?: Request | undefined, response?: Response | undefined): Promise<any>;
|
|
13
13
|
/**
|
|
14
14
|
* Retrieves GQL error object based on XHR object
|
|
15
15
|
* @param {String} url
|
|
@@ -24,9 +24,9 @@ export default class GqlErrorValidator {
|
|
|
24
24
|
/**
|
|
25
25
|
* Try to get content type for fetch arguments
|
|
26
26
|
* @param {{}} options
|
|
27
|
-
* @param {Request} request
|
|
27
|
+
* @param {Request} [request]
|
|
28
28
|
*/
|
|
29
|
-
static _getContentTypeFromFetchArguments(options: {}, request
|
|
29
|
+
static _getContentTypeFromFetchArguments(options: {}, request?: Request | undefined): string | null;
|
|
30
30
|
/**
|
|
31
31
|
* Checks if request is aborted
|
|
32
32
|
* If it has been aborder we are not able to consume the response
|