@openreplay/tracker 17.1.3 → 17.1.5

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.
@@ -28,9 +28,6 @@ export declare function Metadata(key: string, value: string): Messages.Metadata;
28
28
  export declare function StringDictGlobal(key: number, value: string): Messages.StringDictGlobal;
29
29
  export declare function SetNodeAttributeDictGlobal(id: number, name: number, value: number): Messages.SetNodeAttributeDictGlobal;
30
30
  export declare function NodeAnimationResult(id: number, styles: string): Messages.NodeAnimationResult;
31
- export declare function CSSInsertRule(id: number, rule: string, index: number): Messages.CSSInsertRule;
32
- export declare function CSSDeleteRule(id: number, index: number): Messages.CSSDeleteRule;
33
- export declare function Fetch(method: string, url: string, request: string, response: string, status: number, timestamp: number, duration: number): Messages.Fetch;
34
31
  export declare function Profiler(name: string, duration: number, args: string, result: string): Messages.Profiler;
35
32
  export declare function OTable(key: string, value: string): Messages.OTable;
36
33
  export declare function StateAction(type: string): Messages.StateAction;
@@ -49,13 +46,11 @@ export declare function ConnectionInformation(downlink: number, type: string): M
49
46
  export declare function SetPageVisibility(hidden: boolean): Messages.SetPageVisibility;
50
47
  export declare function LoadFontFace(parentID: number, family: string, source: string, descriptors: string): Messages.LoadFontFace;
51
48
  export declare function SetNodeFocus(id: number): Messages.SetNodeFocus;
52
- export declare function LongTask(timestamp: number, duration: number, context: number, containerType: number, containerSrc: string, containerId: string, containerName: string): Messages.LongTask;
53
49
  export declare function SetNodeAttributeURLBased(id: number, name: string, value: string, baseURL: string): Messages.SetNodeAttributeURLBased;
54
50
  export declare function SetCSSDataURLBased(id: number, data: string, baseURL: string): Messages.SetCSSDataURLBased;
55
51
  export declare function TechnicalInfo(type: string, value: string): Messages.TechnicalInfo;
56
52
  export declare function CustomIssue(name: string, payload: string): Messages.CustomIssue;
57
53
  export declare function SetNodeSlot(id: number, slotID: number): Messages.SetNodeSlot;
58
- export declare function CSSInsertRuleURLBased(id: number, rule: string, index: number, baseURL: string): Messages.CSSInsertRuleURLBased;
59
54
  export declare function MouseClick(id: number, hesitationTime: number, label: string, selector: string, normalizedX: number, normalizedY: number): Messages.MouseClick;
60
55
  export declare function MouseClickDeprecated(id: number, hesitationTime: number, label: string, selector: string): Messages.MouseClickDeprecated;
61
56
  export declare function CreateIFrameDocument(frameID: number, id: number): Messages.CreateIFrameDocument;
@@ -101,6 +101,10 @@ export default class API {
101
101
  withCurrentTime?: boolean;
102
102
  }) => string | undefined;
103
103
  setUserID: (id: string) => void;
104
+ identify: (id: string) => void;
105
+ track: ((eventName: string, properties?: Record<string, any>, options?: {
106
+ send_immediately: boolean;
107
+ }) => void) | undefined;
104
108
  userID: (id: string) => void;
105
109
  setUserAnonymousID(id: string): void;
106
110
  userAnonymousID(id: string): void;
@@ -17,6 +17,11 @@ declare class TrackerSingleton {
17
17
  * */
18
18
  stop(): string | undefined;
19
19
  setUserID(id: string): void;
20
+ get analytics(): import("./entry.js").Analytics | null;
21
+ identify: (id: string) => void;
22
+ track: (eventName: string, properties?: Record<string, any>, options?: {
23
+ send_immediately: boolean;
24
+ }) => void;
20
25
  /**
21
26
  * Set metadata for the current session
22
27
  *
@@ -27,9 +27,6 @@ export declare const enum Type {
27
27
  StringDictGlobal = 34,
28
28
  SetNodeAttributeDictGlobal = 35,
29
29
  NodeAnimationResult = 36,
30
- CSSInsertRule = 37,
31
- CSSDeleteRule = 38,
32
- Fetch = 39,
33
30
  Profiler = 40,
34
31
  OTable = 41,
35
32
  StateAction = 42,
@@ -48,13 +45,11 @@ export declare const enum Type {
48
45
  SetPageVisibility = 55,
49
46
  LoadFontFace = 57,
50
47
  SetNodeFocus = 58,
51
- LongTask = 59,
52
48
  SetNodeAttributeURLBased = 60,
53
49
  SetCSSDataURLBased = 61,
54
50
  TechnicalInfo = 63,
55
51
  CustomIssue = 64,
56
52
  SetNodeSlot = 65,
57
- CSSInsertRuleURLBased = 67,
58
53
  MouseClick = 68,
59
54
  MouseClickDeprecated = 69,
60
55
  CreateIFrameDocument = 70,
@@ -244,27 +239,6 @@ export type NodeAnimationResult = [
244
239
  number,
245
240
  string
246
241
  ];
247
- export type CSSInsertRule = [
248
- Type.CSSInsertRule,
249
- number,
250
- string,
251
- number
252
- ];
253
- export type CSSDeleteRule = [
254
- Type.CSSDeleteRule,
255
- number,
256
- number
257
- ];
258
- export type Fetch = [
259
- Type.Fetch,
260
- string,
261
- string,
262
- string,
263
- string,
264
- number,
265
- number,
266
- number
267
- ];
268
242
  export type Profiler = [
269
243
  Type.Profiler,
270
244
  string,
@@ -371,16 +345,6 @@ export type SetNodeFocus = [
371
345
  Type.SetNodeFocus,
372
346
  number
373
347
  ];
374
- export type LongTask = [
375
- Type.LongTask,
376
- number,
377
- number,
378
- number,
379
- number,
380
- string,
381
- string,
382
- string
383
- ];
384
348
  export type SetNodeAttributeURLBased = [
385
349
  Type.SetNodeAttributeURLBased,
386
350
  number,
@@ -409,13 +373,6 @@ export type SetNodeSlot = [
409
373
  number,
410
374
  number
411
375
  ];
412
- export type CSSInsertRuleURLBased = [
413
- Type.CSSInsertRuleURLBased,
414
- number,
415
- string,
416
- number,
417
- string
418
- ];
419
376
  export type MouseClick = [
420
377
  Type.MouseClick,
421
378
  number,
@@ -626,5 +583,5 @@ export type WebVitals = [
626
583
  string,
627
584
  string
628
585
  ];
629
- type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | StringDictGlobal | SetNodeAttributeDictGlobal | NodeAnimationResult | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecatedDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | SetNodeSlot | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | ResourceTiming | Incident | LongAnimationTask | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTimingDeprecated | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals;
586
+ type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | StringDictGlobal | SetNodeAttributeDictGlobal | NodeAnimationResult | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecatedDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | SetNodeSlot | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | ResourceTiming | Incident | LongAnimationTask | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTimingDeprecated | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals;
630
587
  export default Message;
@@ -28,9 +28,6 @@ export declare function Metadata(key: string, value: string): Messages.Metadata;
28
28
  export declare function StringDictGlobal(key: number, value: string): Messages.StringDictGlobal;
29
29
  export declare function SetNodeAttributeDictGlobal(id: number, name: number, value: number): Messages.SetNodeAttributeDictGlobal;
30
30
  export declare function NodeAnimationResult(id: number, styles: string): Messages.NodeAnimationResult;
31
- export declare function CSSInsertRule(id: number, rule: string, index: number): Messages.CSSInsertRule;
32
- export declare function CSSDeleteRule(id: number, index: number): Messages.CSSDeleteRule;
33
- export declare function Fetch(method: string, url: string, request: string, response: string, status: number, timestamp: number, duration: number): Messages.Fetch;
34
31
  export declare function Profiler(name: string, duration: number, args: string, result: string): Messages.Profiler;
35
32
  export declare function OTable(key: string, value: string): Messages.OTable;
36
33
  export declare function StateAction(type: string): Messages.StateAction;
@@ -49,13 +46,11 @@ export declare function ConnectionInformation(downlink: number, type: string): M
49
46
  export declare function SetPageVisibility(hidden: boolean): Messages.SetPageVisibility;
50
47
  export declare function LoadFontFace(parentID: number, family: string, source: string, descriptors: string): Messages.LoadFontFace;
51
48
  export declare function SetNodeFocus(id: number): Messages.SetNodeFocus;
52
- export declare function LongTask(timestamp: number, duration: number, context: number, containerType: number, containerSrc: string, containerId: string, containerName: string): Messages.LongTask;
53
49
  export declare function SetNodeAttributeURLBased(id: number, name: string, value: string, baseURL: string): Messages.SetNodeAttributeURLBased;
54
50
  export declare function SetCSSDataURLBased(id: number, data: string, baseURL: string): Messages.SetCSSDataURLBased;
55
51
  export declare function TechnicalInfo(type: string, value: string): Messages.TechnicalInfo;
56
52
  export declare function CustomIssue(name: string, payload: string): Messages.CustomIssue;
57
53
  export declare function SetNodeSlot(id: number, slotID: number): Messages.SetNodeSlot;
58
- export declare function CSSInsertRuleURLBased(id: number, rule: string, index: number, baseURL: string): Messages.CSSInsertRuleURLBased;
59
54
  export declare function MouseClick(id: number, hesitationTime: number, label: string, selector: string, normalizedX: number, normalizedY: number): Messages.MouseClick;
60
55
  export declare function MouseClickDeprecated(id: number, hesitationTime: number, label: string, selector: string): Messages.MouseClickDeprecated;
61
56
  export declare function CreateIFrameDocument(frameID: number, id: number): Messages.CreateIFrameDocument;
@@ -101,6 +101,10 @@ export default class API {
101
101
  withCurrentTime?: boolean;
102
102
  }) => string | undefined;
103
103
  setUserID: (id: string) => void;
104
+ identify: (id: string) => void;
105
+ track: ((eventName: string, properties?: Record<string, any>, options?: {
106
+ send_immediately: boolean;
107
+ }) => void) | undefined;
104
108
  userID: (id: string) => void;
105
109
  setUserAnonymousID(id: string): void;
106
110
  userAnonymousID(id: string): void;
@@ -17,6 +17,11 @@ declare class TrackerSingleton {
17
17
  * */
18
18
  stop(): string | undefined;
19
19
  setUserID(id: string): void;
20
+ get analytics(): import("./entry.js").Analytics | null;
21
+ identify: (id: string) => void;
22
+ track: (eventName: string, properties?: Record<string, any>, options?: {
23
+ send_immediately: boolean;
24
+ }) => void;
20
25
  /**
21
26
  * Set metadata for the current session
22
27
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreplay/tracker",
3
3
  "description": "The OpenReplay tracker main package",
4
- "version": "17.1.3",
4
+ "version": "17.1.5",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"
@@ -50,14 +50,14 @@
50
50
  "prepublishOnly": "bun run test && bun run build"
51
51
  },
52
52
  "devDependencies": {
53
- "@babel/core": "^7.28.4",
53
+ "@babel/core": "^7.28.5",
54
54
  "@jest/globals": "^29.7.0",
55
- "@rollup/plugin-babel": "^6.0.4",
55
+ "@rollup/plugin-babel": "^6.1.0",
56
56
  "@rollup/plugin-commonjs": "^28.0.3",
57
57
  "@rollup/plugin-node-resolve": "^15.3.0",
58
58
  "@rollup/plugin-replace": "^6.0.2",
59
59
  "@rollup/plugin-terser": "0.4.4",
60
- "@rollup/plugin-typescript": "^12.1.4",
60
+ "@rollup/plugin-typescript": "^12.3.0",
61
61
  "@typescript-eslint/eslint-plugin": "^8.45.0",
62
62
  "@typescript-eslint/parser": "^8.45.0",
63
63
  "eslint": "^9.37.0",
@@ -65,11 +65,11 @@
65
65
  "eslint-plugin-prettier": "^5.5.4",
66
66
  "jest": "^30.2.0",
67
67
  "jest-environment-jsdom": "^30.2.0",
68
- "prettier": "^3.6.2",
68
+ "prettier": "^3.7.4",
69
69
  "replace-in-files": "^2.0.3",
70
- "rollup": "^4.52.4",
70
+ "rollup": "^4.55.1",
71
71
  "semver": "^6.3.0",
72
- "ts-jest": "^29.4.4",
72
+ "ts-jest": "^29.4.6",
73
73
  "tslib": "^2.8.1",
74
74
  "typescript": "^5.9.3"
75
75
  },