@openreplay/tracker 3.6.3 → 4.0.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 (128) hide show
  1. package/.eslintignore +8 -0
  2. package/.prettierignore +1 -0
  3. package/LICENSE +1 -1
  4. package/cjs/app/guards.d.ts +2 -1
  5. package/cjs/app/guards.js +6 -3
  6. package/cjs/app/index.d.ts +28 -23
  7. package/cjs/app/index.js +101 -83
  8. package/cjs/app/logger.js +6 -3
  9. package/cjs/app/messages.d.ts +52 -0
  10. package/cjs/app/messages.gen.d.ts +57 -0
  11. package/cjs/app/messages.gen.js +493 -0
  12. package/cjs/app/messages.js +234 -0
  13. package/cjs/app/nodes.d.ts +1 -1
  14. package/cjs/app/nodes.js +2 -0
  15. package/cjs/app/observer/iframe_observer.d.ts +1 -1
  16. package/cjs/app/observer/iframe_observer.js +3 -3
  17. package/cjs/app/observer/observer.d.ts +2 -3
  18. package/cjs/app/observer/observer.js +50 -52
  19. package/cjs/app/observer/shadow_root_observer.d.ts +1 -1
  20. package/cjs/app/observer/shadow_root_observer.js +3 -3
  21. package/cjs/app/observer/top_observer.d.ts +13 -2
  22. package/cjs/app/observer/top_observer.js +58 -23
  23. package/cjs/app/sanitizer.d.ts +1 -1
  24. package/cjs/app/sanitizer.js +5 -5
  25. package/cjs/app/session.d.ts +20 -2
  26. package/cjs/app/session.js +65 -6
  27. package/cjs/app/ticker.d.ts +1 -1
  28. package/cjs/common/{webworker.d.ts → interaction.d.ts} +5 -5
  29. package/cjs/common/{types.js → interaction.js} +0 -0
  30. package/cjs/common/messages.gen.d.ts +382 -0
  31. package/cjs/common/{webworker.js → messages.gen.js} +1 -0
  32. package/cjs/index.d.ts +10 -9
  33. package/cjs/index.js +47 -36
  34. package/cjs/modules/adoptedStyleSheets.d.ts +2 -0
  35. package/cjs/modules/adoptedStyleSheets.js +127 -0
  36. package/cjs/modules/connection.d.ts +1 -1
  37. package/cjs/modules/connection.js +2 -2
  38. package/cjs/modules/console.d.ts +1 -1
  39. package/cjs/modules/console.js +7 -21
  40. package/cjs/modules/cssrules.d.ts +1 -1
  41. package/cjs/modules/cssrules.js +18 -14
  42. package/cjs/modules/exception.d.ts +3 -3
  43. package/cjs/modules/exception.js +23 -18
  44. package/cjs/modules/img.d.ts +1 -1
  45. package/cjs/modules/img.js +39 -26
  46. package/cjs/modules/input.d.ts +1 -1
  47. package/cjs/modules/input.js +21 -21
  48. package/cjs/modules/mouse.d.ts +1 -1
  49. package/cjs/modules/mouse.js +50 -43
  50. package/cjs/modules/performance.d.ts +1 -1
  51. package/cjs/modules/performance.js +2 -2
  52. package/cjs/modules/scroll.d.ts +1 -1
  53. package/cjs/modules/scroll.js +16 -7
  54. package/cjs/modules/timing.d.ts +1 -1
  55. package/cjs/modules/timing.js +14 -26
  56. package/cjs/modules/viewport.d.ts +1 -1
  57. package/cjs/modules/viewport.js +4 -4
  58. package/cjs/utils.js +7 -7
  59. package/cjs/vendors/finder/finder.js +53 -48
  60. package/lib/app/guards.d.ts +2 -1
  61. package/lib/app/guards.js +4 -2
  62. package/lib/app/index.d.ts +28 -23
  63. package/lib/app/index.js +109 -91
  64. package/lib/app/logger.js +6 -3
  65. package/lib/app/messages.d.ts +52 -0
  66. package/lib/app/messages.gen.d.ts +57 -0
  67. package/lib/app/messages.gen.js +434 -0
  68. package/lib/app/messages.js +181 -0
  69. package/lib/app/nodes.d.ts +1 -1
  70. package/lib/app/nodes.js +2 -0
  71. package/lib/app/observer/iframe_observer.d.ts +1 -1
  72. package/lib/app/observer/iframe_observer.js +3 -3
  73. package/lib/app/observer/observer.d.ts +2 -3
  74. package/lib/app/observer/observer.js +51 -53
  75. package/lib/app/observer/shadow_root_observer.d.ts +1 -1
  76. package/lib/app/observer/shadow_root_observer.js +3 -3
  77. package/lib/app/observer/top_observer.d.ts +13 -2
  78. package/lib/app/observer/top_observer.js +62 -27
  79. package/lib/app/sanitizer.d.ts +1 -1
  80. package/lib/app/sanitizer.js +7 -7
  81. package/lib/app/session.d.ts +20 -2
  82. package/lib/app/session.js +65 -6
  83. package/lib/app/ticker.d.ts +1 -1
  84. package/lib/common/{webworker.d.ts → interaction.d.ts} +5 -5
  85. package/lib/common/{types.js → interaction.js} +0 -0
  86. package/lib/common/messages.gen.d.ts +382 -0
  87. package/lib/common/messages.gen.js +2 -0
  88. package/lib/common/tsconfig.tsbuildinfo +1 -1
  89. package/lib/index.d.ts +10 -9
  90. package/lib/index.js +60 -49
  91. package/lib/modules/adoptedStyleSheets.d.ts +2 -0
  92. package/lib/modules/adoptedStyleSheets.js +124 -0
  93. package/lib/modules/connection.d.ts +1 -1
  94. package/lib/modules/connection.js +2 -2
  95. package/lib/modules/console.d.ts +1 -1
  96. package/lib/modules/console.js +8 -22
  97. package/lib/modules/cssrules.d.ts +1 -1
  98. package/lib/modules/cssrules.js +19 -15
  99. package/lib/modules/exception.d.ts +3 -3
  100. package/lib/modules/exception.js +23 -18
  101. package/lib/modules/img.d.ts +1 -1
  102. package/lib/modules/img.js +41 -28
  103. package/lib/modules/input.d.ts +1 -1
  104. package/lib/modules/input.js +23 -23
  105. package/lib/modules/mouse.d.ts +1 -1
  106. package/lib/modules/mouse.js +53 -46
  107. package/lib/modules/performance.d.ts +1 -1
  108. package/lib/modules/performance.js +3 -3
  109. package/lib/modules/scroll.d.ts +1 -1
  110. package/lib/modules/scroll.js +17 -8
  111. package/lib/modules/timing.d.ts +1 -1
  112. package/lib/modules/timing.js +16 -28
  113. package/lib/modules/viewport.d.ts +1 -1
  114. package/lib/modules/viewport.js +4 -4
  115. package/lib/utils.js +7 -7
  116. package/lib/vendors/finder/finder.js +53 -48
  117. package/package.json +27 -10
  118. package/cjs/common/messages.d.ts +0 -444
  119. package/cjs/common/messages.js +0 -794
  120. package/cjs/common/types.d.ts +0 -9
  121. package/cjs/modules/longtasks.d.ts +0 -2
  122. package/cjs/modules/longtasks.js +0 -26
  123. package/lib/common/messages.d.ts +0 -444
  124. package/lib/common/messages.js +0 -790
  125. package/lib/common/types.d.ts +0 -9
  126. package/lib/common/webworker.js +0 -1
  127. package/lib/modules/longtasks.d.ts +0 -2
  128. package/lib/modules/longtasks.js +0 -23
@@ -11,10 +11,10 @@ let config;
11
11
  let rootDocument;
12
12
  function finder(input, options) {
13
13
  if (input.nodeType !== Node.ELEMENT_NODE) {
14
- throw new Error(`Can't generate CSS selector for non-element node type.`);
14
+ throw new Error("Can't generate CSS selector for non-element node type.");
15
15
  }
16
- if ("html" === input.tagName.toLowerCase()) {
17
- return "html";
16
+ if ('html' === input.tagName.toLowerCase()) {
17
+ return 'html';
18
18
  }
19
19
  const defaults = {
20
20
  root: document.body,
@@ -38,7 +38,7 @@ function finder(input, options) {
38
38
  return selector(path);
39
39
  }
40
40
  else {
41
- throw new Error(`Selector was not found.`);
41
+ throw new Error('Selector was not found.');
42
42
  }
43
43
  }
44
44
  exports.finder = finder;
@@ -53,30 +53,33 @@ function findRootDocument(rootNode, defaults) {
53
53
  }
54
54
  function bottomUpSearch(input, limit, fallback) {
55
55
  let path = null;
56
- let stack = [];
56
+ const stack = [];
57
57
  let current = input;
58
58
  let i = 0;
59
59
  while (current && current !== config.root.parentElement) {
60
- let level = maybe(id(current)) || maybe(...attr(current)) || maybe(...classNames(current)) || maybe(tagName(current)) || [any()];
60
+ let level = maybe(id(current)) ||
61
+ maybe(...attr(current)) ||
62
+ maybe(...classNames(current)) ||
63
+ maybe(tagName(current)) || [any()];
61
64
  const nth = index(current);
62
65
  if (limit === Limit.All) {
63
66
  if (nth) {
64
- level = level.concat(level.filter(dispensableNth).map(node => nthChild(node, nth)));
67
+ level = level.concat(level.filter(dispensableNth).map((node) => nthChild(node, nth)));
65
68
  }
66
69
  }
67
70
  else if (limit === Limit.Two) {
68
71
  level = level.slice(0, 1);
69
72
  if (nth) {
70
- level = level.concat(level.filter(dispensableNth).map(node => nthChild(node, nth)));
73
+ level = level.concat(level.filter(dispensableNth).map((node) => nthChild(node, nth)));
71
74
  }
72
75
  }
73
76
  else if (limit === Limit.One) {
74
- const [node] = level = level.slice(0, 1);
77
+ const [node] = (level = level.slice(0, 1));
75
78
  if (nth && dispensableNth(node)) {
76
79
  level = [nthChild(node, nth)];
77
80
  }
78
81
  }
79
- for (let node of level) {
82
+ for (const node of level) {
80
83
  node.level = i;
81
84
  }
82
85
  stack.push(level);
@@ -99,7 +102,7 @@ function findUniquePath(stack, fallback) {
99
102
  if (paths.length > config.threshold) {
100
103
  return fallback ? fallback() : null;
101
104
  }
102
- for (let candidate of paths) {
105
+ for (const candidate of paths) {
103
106
  if (unique(candidate)) {
104
107
  return candidate;
105
108
  }
@@ -122,7 +125,7 @@ function selector(path) {
122
125
  return query;
123
126
  }
124
127
  function penalty(path) {
125
- return path.map(node => node.penalty).reduce((acc, i) => acc + i, 0);
128
+ return path.map((node) => node.penalty).reduce((acc, i) => acc + i, 0);
126
129
  }
127
130
  function unique(path) {
128
131
  switch (rootDocument.querySelectorAll(selector(path)).length) {
@@ -135,10 +138,10 @@ function unique(path) {
135
138
  }
136
139
  }
137
140
  function id(input) {
138
- const elementId = input.getAttribute("id");
141
+ const elementId = input.getAttribute('id');
139
142
  if (elementId && config.idName(elementId)) {
140
143
  return {
141
- name: "#" + cssesc(elementId, { isIdentifier: true }),
144
+ name: '#' + cssesc(elementId, { isIdentifier: true }),
142
145
  penalty: 0,
143
146
  };
144
147
  }
@@ -147,16 +150,15 @@ function id(input) {
147
150
  function attr(input) {
148
151
  const attrs = Array.from(input.attributes).filter((attr) => config.attr(attr.name, attr.value));
149
152
  return attrs.map((attr) => ({
150
- name: "[" + cssesc(attr.name, { isIdentifier: true }) + "=\"" + cssesc(attr.value) + "\"]",
151
- penalty: 0.5
153
+ name: '[' + cssesc(attr.name, { isIdentifier: true }) + '="' + cssesc(attr.value) + '"]',
154
+ penalty: 0.5,
152
155
  }));
153
156
  }
154
157
  function classNames(input) {
155
- const names = Array.from(input.classList)
156
- .filter(config.className);
158
+ const names = Array.from(input.classList).filter(config.className);
157
159
  return names.map((name) => ({
158
- name: "." + cssesc(name, { isIdentifier: true }),
159
- penalty: 1
160
+ name: '.' + cssesc(name, { isIdentifier: true }),
161
+ penalty: 1,
160
162
  }));
161
163
  }
162
164
  function tagName(input) {
@@ -164,15 +166,15 @@ function tagName(input) {
164
166
  if (config.tagName(name)) {
165
167
  return {
166
168
  name,
167
- penalty: 2
169
+ penalty: 2,
168
170
  };
169
171
  }
170
172
  return null;
171
173
  }
172
174
  function any() {
173
175
  return {
174
- name: "*",
175
- penalty: 3
176
+ name: '*',
177
+ penalty: 3,
176
178
  };
177
179
  }
178
180
  function index(input) {
@@ -199,11 +201,11 @@ function index(input) {
199
201
  function nthChild(node, i) {
200
202
  return {
201
203
  name: node.name + `:nth-child(${i})`,
202
- penalty: node.penalty + 1
204
+ penalty: node.penalty + 1,
203
205
  };
204
206
  }
205
207
  function dispensableNth(node) {
206
- return node.name !== "html" && !node.name.startsWith("#");
208
+ return node.name !== 'html' && !node.name.startsWith('#');
207
209
  }
208
210
  function maybe(...level) {
209
211
  const list = level.filter(notEmpty);
@@ -218,7 +220,7 @@ function notEmpty(value) {
218
220
  function combinations(stack, path = []) {
219
221
  const paths = [];
220
222
  if (stack.length > 0) {
221
- for (let node of stack[0]) {
223
+ for (const node of stack[0]) {
222
224
  paths.push(...combinations(stack.slice(1, stack.length), path.concat(node)));
223
225
  }
224
226
  }
@@ -232,7 +234,7 @@ function sort(paths) {
232
234
  }
233
235
  function optimize(path, input, scope = {
234
236
  counter: 0,
235
- visited: new Map()
237
+ visited: new Map(),
236
238
  }) {
237
239
  const paths = [];
238
240
  if (path.length > 2 && path.length > config.optimizedMinLength) {
@@ -263,20 +265,20 @@ const regexAnySingleEscape = /[ -,\.\/:-@\[-\^`\{-~]/;
263
265
  const regexSingleEscape = /[ -,\.\/:-@\[\]\^`\{-~]/;
264
266
  const regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
265
267
  const defaultOptions = {
266
- "escapeEverything": false,
267
- "isIdentifier": false,
268
- "quotes": "single",
269
- "wrap": false
268
+ escapeEverything: false,
269
+ isIdentifier: false,
270
+ quotes: 'single',
271
+ wrap: false,
270
272
  };
271
273
  function cssesc(string, opt = {}) {
272
274
  const options = Object.assign(Object.assign({}, defaultOptions), opt);
273
- if (options.quotes != "single" && options.quotes != "double") {
274
- options.quotes = "single";
275
+ if (options.quotes != 'single' && options.quotes != 'double') {
276
+ options.quotes = 'single';
275
277
  }
276
- const quote = options.quotes == "double" ? "\"" : "'";
278
+ const quote = options.quotes == 'double' ? '"' : "'";
277
279
  const isIdentifier = options.isIdentifier;
278
280
  const firstChar = string.charAt(0);
279
- let output = "";
281
+ let output = '';
280
282
  let counter = 0;
281
283
  const length = string.length;
282
284
  while (counter < length) {
@@ -284,13 +286,13 @@ function cssesc(string, opt = {}) {
284
286
  let codePoint = character.charCodeAt(0);
285
287
  let value = void 0;
286
288
  // If it’s not a printable ASCII character…
287
- if (codePoint < 0x20 || codePoint > 0x7E) {
288
- if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) {
289
+ if (codePoint < 0x20 || codePoint > 0x7e) {
290
+ if (codePoint >= 0xd800 && codePoint <= 0xdbff && counter < length) {
289
291
  // It’s a high surrogate, and there is a next character.
290
292
  const extra = string.charCodeAt(counter++);
291
- if ((extra & 0xFC00) == 0xDC00) {
293
+ if ((extra & 0xfc00) == 0xdc00) {
292
294
  // next character is low surrogate
293
- codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000;
295
+ codePoint = ((codePoint & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;
294
296
  }
295
297
  else {
296
298
  // It’s an unmatched surrogate; only append this code unit, in case
@@ -298,22 +300,25 @@ function cssesc(string, opt = {}) {
298
300
  counter--;
299
301
  }
300
302
  }
301
- value = "\\" + codePoint.toString(16).toUpperCase() + " ";
303
+ value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
302
304
  }
303
305
  else {
304
306
  if (options.escapeEverything) {
305
307
  if (regexAnySingleEscape.test(character)) {
306
- value = "\\" + character;
308
+ value = '\\' + character;
307
309
  }
308
310
  else {
309
- value = "\\" + codePoint.toString(16).toUpperCase() + " ";
311
+ value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
310
312
  }
311
313
  }
312
314
  else if (/[\t\n\f\r\x0B]/.test(character)) {
313
- value = "\\" + codePoint.toString(16).toUpperCase() + " ";
315
+ value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
314
316
  }
315
- else if (character == "\\" || !isIdentifier && (character == "\"" && quote == character || character == "'" && quote == character) || isIdentifier && regexSingleEscape.test(character)) {
316
- value = "\\" + character;
317
+ else if (character == '\\' ||
318
+ (!isIdentifier &&
319
+ ((character == '"' && quote == character) || (character == "'" && quote == character))) ||
320
+ (isIdentifier && regexSingleEscape.test(character))) {
321
+ value = '\\' + character;
317
322
  }
318
323
  else {
319
324
  value = character;
@@ -323,10 +328,10 @@ function cssesc(string, opt = {}) {
323
328
  }
324
329
  if (isIdentifier) {
325
330
  if (/^-[-\d]/.test(output)) {
326
- output = "\\-" + output.slice(1);
331
+ output = '\\-' + output.slice(1);
327
332
  }
328
333
  else if (/\d/.test(firstChar)) {
329
- output = "\\3" + firstChar + " " + output.slice(1);
334
+ output = '\\3' + firstChar + ' ' + output.slice(1);
330
335
  }
331
336
  }
332
337
  // Remove spaces after `\HEX` escapes that are not followed by a hex digit,
@@ -338,7 +343,7 @@ function cssesc(string, opt = {}) {
338
343
  return $0;
339
344
  }
340
345
  // Strip the space.
341
- return ($1 || "") + $2;
346
+ return ($1 || '') + $2;
342
347
  });
343
348
  if (!isIdentifier && options.wrap) {
344
349
  return quote + output + quote;
@@ -1,7 +1,8 @@
1
1
  export declare function isSVGElement(node: Element): node is SVGElement;
2
2
  export declare function isElementNode(node: Node): node is Element;
3
3
  export declare function isTextNode(node: Node): node is Text;
4
- export declare function isRootNode(node: Node): boolean;
4
+ export declare function isDocument(node: Node): node is Document;
5
+ export declare function isRootNode(node: Node): node is Document | DocumentFragment;
5
6
  declare type TagTypeMap = {
6
7
  HTML: HTMLHtmlElement;
7
8
  IMG: HTMLImageElement;
package/lib/app/guards.js CHANGED
@@ -7,9 +7,11 @@ export function isElementNode(node) {
7
7
  export function isTextNode(node) {
8
8
  return node.nodeType === Node.TEXT_NODE;
9
9
  }
10
+ export function isDocument(node) {
11
+ return node.nodeType === Node.DOCUMENT_NODE;
12
+ }
10
13
  export function isRootNode(node) {
11
- return node.nodeType === Node.DOCUMENT_NODE ||
12
- node.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
14
+ return node.nodeType === Node.DOCUMENT_NODE || node.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
13
15
  }
14
16
  export function hasTag(el, tagName) {
15
17
  return el.nodeName === tagName;
@@ -1,17 +1,20 @@
1
- import type Message from "../common/messages.js";
2
- import Nodes from "./nodes.js";
3
- import Sanitizer from "./sanitizer.js";
4
- import Ticker from "./ticker.js";
5
- import Logger from "./logger.js";
6
- import Session from "./session.js";
7
- import type { Options as ObserverOptions } from "./observer/top_observer.js";
8
- import type { Options as SanitizerOptions } from "./sanitizer.js";
9
- import type { Options as LoggerOptions } from "./logger.js";
10
- import type { Options as WebworkerOptions } from "../common/webworker.js";
1
+ import type Message from './messages.gen.js';
2
+ import Nodes from './nodes.js';
3
+ import Observer from './observer/top_observer.js';
4
+ import Sanitizer from './sanitizer.js';
5
+ import Ticker from './ticker.js';
6
+ import Logger from './logger.js';
7
+ import Session from './session.js';
8
+ import type { Options as ObserverOptions } from './observer/top_observer.js';
9
+ import type { Options as SanitizerOptions } from './sanitizer.js';
10
+ import type { Options as LoggerOptions } from './logger.js';
11
+ import type { Options as SessOptions } from './session.js';
12
+ import type { Options as WebworkerOptions } from '../common/interaction.js';
11
13
  export interface StartOptions {
12
14
  userID?: string;
13
15
  metadata?: Record<string, string>;
14
16
  forceNew?: boolean;
17
+ sessionHash?: string;
15
18
  }
16
19
  interface OnStartInfo {
17
20
  sessionID: string;
@@ -34,9 +37,9 @@ declare type CommitCallback = (messages: Array<Message>) => void;
34
37
  declare type AppOptions = {
35
38
  revID: string;
36
39
  node_id: string;
40
+ session_reset_key: string;
37
41
  session_token_key: string;
38
42
  session_pageno_key: string;
39
- session_reset_key: string;
40
43
  local_uuid_key: string;
41
44
  ingestPoint: string;
42
45
  resourceBaseHref: string | null;
@@ -44,10 +47,10 @@ declare type AppOptions = {
44
47
  __is_snippet: boolean;
45
48
  __debug_report_edp: string | null;
46
49
  __debug__?: LoggerOptions;
47
- localStorage: Storage;
48
- sessionStorage: Storage;
50
+ localStorage: Storage | null;
51
+ sessionStorage: Storage | null;
49
52
  onStart?: StartCallback;
50
- } & WebworkerOptions;
53
+ } & WebworkerOptions & SessOptions;
51
54
  export declare type Options = AppOptions & ObserverOptions & SanitizerOptions;
52
55
  export declare const DEFAULT_INGEST_POINT = "https://api.openreplay.com/ingest";
53
56
  export default class App {
@@ -61,39 +64,41 @@ export default class App {
61
64
  readonly localStorage: Storage;
62
65
  readonly sessionStorage: Storage;
63
66
  private readonly messages;
64
- private readonly observer;
67
+ readonly observer: Observer;
65
68
  private readonly startCallbacks;
66
69
  private readonly stopCallbacks;
67
70
  private readonly commitCallbacks;
68
71
  private readonly options;
69
72
  private readonly revID;
70
73
  private activityState;
71
- private version;
74
+ private readonly version;
72
75
  private readonly worker?;
73
- constructor(projectKey: string, sessionToken: string | null | undefined, options: Partial<Options>);
76
+ constructor(projectKey: string, sessionToken: string | undefined, options: Partial<Options>);
74
77
  private _debug;
75
78
  send(message: Message, urgent?: boolean): void;
76
79
  private commit;
77
80
  safe<T extends (...args: any[]) => void>(fn: T): T;
78
81
  attachCommitCallback(cb: CommitCallback): void;
79
- attachStartCallback(cb: StartCallback): void;
80
- attachStopCallback(cb: Function): void;
82
+ attachStartCallback(cb: StartCallback, useSafe?: boolean): void;
83
+ attachStopCallback(cb: () => any, useSafe?: boolean): void;
81
84
  attachEventListener(target: EventTarget, type: string, listener: EventListener, useSafe?: boolean, useCapture?: boolean): void;
82
85
  checkRequiredVersion(version: string): boolean;
83
- private getStartInfo;
86
+ private getTrackerInfo;
84
87
  getSessionInfo(): {
85
88
  userUUID: string | null;
86
89
  projectKey: string;
87
90
  revID: string;
88
- timestamp: number;
89
91
  trackerVersion: string;
90
92
  isSnippet: boolean;
91
- sessionID: string | null;
93
+ sessionID: string | undefined;
92
94
  metadata: Record<string, string>;
93
95
  userID: string | null;
96
+ timestamp: number;
97
+ projectID?: string | undefined;
94
98
  };
95
99
  getSessionToken(): string | undefined;
96
100
  getSessionID(): string | undefined;
101
+ getSessionURL(): string | undefined;
97
102
  getHost(): string;
98
103
  getProjectKey(): string;
99
104
  getBaseHref(): string;
@@ -103,7 +108,7 @@ export default class App {
103
108
  resetNextPageSession(flag: boolean): void;
104
109
  private _start;
105
110
  start(options?: StartOptions): Promise<StartPromiseReturn>;
106
- stop(calledFromAPI?: boolean, restarting?: boolean): void;
111
+ stop(stopWorker?: boolean): void;
107
112
  restart(): void;
108
113
  }
109
114
  export {};