@commercetools-frontend/fullstory 4.0.4 → 4.1.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.
@@ -100,14 +100,17 @@ function useTrackingEffect() {
100
100
 
101
101
  // NOTE: This type is not exported from the @fullstory/browser package.
102
102
 
103
- function sendEvent(eventName, eventProperties) {
103
+ function sendEvent(eventName, eventProperties, eventSchema) {
104
104
  // Don't send events if FullStory is not initialized.
105
105
  if (!browser.isInitialized()) {
106
106
  return;
107
107
  }
108
108
  browser.FullStory('trackEvent', {
109
109
  name: eventName,
110
- properties: eventProperties
110
+ properties: eventProperties,
111
+ schema: {
112
+ properties: eventSchema
113
+ }
111
114
  });
112
115
  }
113
116
 
@@ -100,14 +100,17 @@ function useTrackingEffect() {
100
100
 
101
101
  // NOTE: This type is not exported from the @fullstory/browser package.
102
102
 
103
- function sendEvent(eventName, eventProperties) {
103
+ function sendEvent(eventName, eventProperties, eventSchema) {
104
104
  // Don't send events if FullStory is not initialized.
105
105
  if (!browser.isInitialized()) {
106
106
  return;
107
107
  }
108
108
  browser.FullStory('trackEvent', {
109
109
  name: eventName,
110
- properties: eventProperties
110
+ properties: eventProperties,
111
+ schema: {
112
+ properties: eventSchema
113
+ }
111
114
  });
112
115
  }
113
116
 
@@ -85,14 +85,17 @@ function useTrackingEffect() {
85
85
 
86
86
  // NOTE: This type is not exported from the @fullstory/browser package.
87
87
 
88
- function sendEvent(eventName, eventProperties) {
88
+ function sendEvent(eventName, eventProperties, eventSchema) {
89
89
  // Don't send events if FullStory is not initialized.
90
90
  if (!isInitialized()) {
91
91
  return;
92
92
  }
93
93
  FullStory('trackEvent', {
94
94
  name: eventName,
95
- properties: eventProperties
95
+ properties: eventProperties,
96
+ schema: {
97
+ properties: eventSchema
98
+ }
96
99
  });
97
100
  }
98
101
 
@@ -1,3 +1,5 @@
1
1
  type TFullStoryEventProperties = Record<string, unknown>;
2
- declare function sendEvent(eventName: string, eventProperties: TFullStoryEventProperties): void;
2
+ type TFullStoryEventPropertyTypes = 'bool' | 'int' | 'date' | 'real' | 'str' | 'bools' | 'ints' | 'dates' | 'reals' | 'strs';
3
+ type TFullStoryEventSchema = Record<string, TFullStoryEventPropertyTypes | Record<string, TFullStoryEventPropertyTypes>>;
4
+ declare function sendEvent(eventName: string, eventProperties: TFullStoryEventProperties, eventSchema?: TFullStoryEventSchema): void;
3
5
  export { sendEvent };
@@ -1,5 +1,4 @@
1
- /// <reference types="node" />
2
- import { KeyObject } from 'crypto';
1
+ import { type KeyObject } from 'crypto';
3
2
  type TTrackingArgs = {
4
3
  properties: TFullStoryProperties;
5
4
  disable?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/fullstory",
3
- "version": "4.0.4",
3
+ "version": "4.1.0",
4
4
  "description": "A package integrating with the FullStory SDK",
5
5
  "license": "MIT",
6
6
  "main": "dist/commercetools-frontend-fullstory.cjs.js",
@@ -21,18 +21,17 @@
21
21
  "@apollo/client": "3.12.4",
22
22
  "@emotion/react": "11.14.0",
23
23
  "@testing-library/react": "16.3.1",
24
- "@types/jest": "^29.5.2",
25
- "@types/node": "24.1.0",
24
+ "@types/jest": "^30.0.0",
25
+ "@types/node": "24.10.6",
26
26
  "@types/react": "19.2.7",
27
- "@types/testing-library__jest-dom": "^5.14.6",
28
27
  "graphql": "16.11.0",
29
28
  "react": "19.2.3",
30
29
  "react-dom": "19.2.3",
31
30
  "react-intl": "7.1.14",
32
- "react-redux": "7.2.9",
31
+ "react-redux": "9.2.0",
33
32
  "react-router-dom": "5.3.4",
34
- "redux": "4.2.1",
35
- "typescript": "5.2.2"
33
+ "redux": "5.0.1",
34
+ "typescript": "5.7.2"
36
35
  },
37
36
  "peerDependencies": {
38
37
  "@emotion/react": "11.x",