@workleap/logrocket 1.2.6 → 1.2.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @workleap/logrocket
2
2
 
3
+ ## 1.2.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#83](https://github.com/workleap/wl-telemetry/pull/83) [`a7f57fd`](https://github.com/workleap/wl-telemetry/commit/a7f57fd389584438d61456e3ff62c6fc43edabeb) Thanks [@victortrinh2](https://github.com/victortrinh2)! - Add Compensation to LogRocketIdentification and adapt createDefaultUserTraits
8
+
3
9
  ## 1.2.6
4
10
 
5
11
  ### Patch Changes
@@ -15,6 +15,7 @@ export interface LogRocketIdentification {
15
15
  sks?: boolean;
16
16
  wpm?: boolean;
17
17
  pbd?: boolean;
18
+ cmp?: boolean;
18
19
  };
19
20
  isCollaborator?: {
20
21
  wov?: boolean;
@@ -23,6 +24,7 @@ export interface LogRocketIdentification {
23
24
  sks?: boolean;
24
25
  wpm?: boolean;
25
26
  pbd?: boolean;
27
+ cmp?: boolean;
26
28
  };
27
29
  isReportingManager?: boolean;
28
30
  isTeamManager?: boolean;
@@ -33,6 +35,7 @@ export interface LogRocketIdentification {
33
35
  sks?: string;
34
36
  wpm?: string;
35
37
  pbd?: string;
38
+ cmp?: string;
36
39
  };
37
40
  }
38
41
  /**
@@ -77,6 +80,7 @@ export declare const TelemetryIdTrait = "Telemetry Id";
77
80
  * @see {@link https://workleap.github.io/wl-telemetry}
78
81
  */
79
82
  export declare function createDefaultUserTraits(identification: LogRocketIdentification): {
83
+ "Plan Code - Compensation"?: string | undefined;
80
84
  "Plan Code - Pingboard"?: string | undefined;
81
85
  "Plan Code - Performance"?: string | undefined;
82
86
  "Plan Code - Skills"?: string | undefined;
@@ -85,6 +89,7 @@ export declare function createDefaultUserTraits(identification: LogRocketIdentif
85
89
  "Plan Code - Officevibe"?: string | undefined;
86
90
  "Is Team Manager"?: boolean | undefined;
87
91
  "Is Reporting Manager"?: boolean | undefined;
92
+ "Is Collaborator - Compensation"?: boolean | undefined;
88
93
  "Is Collaborator - Pingboard"?: boolean | undefined;
89
94
  "Is Collaborator - Performance"?: boolean | undefined;
90
95
  "Is Collaborator - Skills"?: boolean | undefined;
@@ -92,6 +97,7 @@ export declare function createDefaultUserTraits(identification: LogRocketIdentif
92
97
  "Is Collaborator - LMS"?: boolean | undefined;
93
98
  "Is Collaborator - Officevibe"?: boolean | undefined;
94
99
  "Is Collaborator"?: true | undefined;
100
+ "Is Executive - Compensation"?: boolean | undefined;
95
101
  "Is Executive - Pingboard"?: boolean | undefined;
96
102
  "Is Executive - Performance"?: boolean | undefined;
97
103
  "Is Executive - Skills"?: boolean | undefined;
@@ -15,8 +15,8 @@ const TelemetryIdTrait = "Telemetry Id";
15
15
  * @see {@link https://workleap.github.io/wl-telemetry}
16
16
  */ function createDefaultUserTraits(identification) {
17
17
  const { userId, organizationId, organizationName, isMigratedToWorkleap, isOrganizationCreator, isAdmin, isExecutive, isCollaborator, isReportingManager, isTeamManager, planCode } = identification;
18
- const isExecutiveInAnyProduct = Boolean(isExecutive?.wov || isExecutive?.lms || isExecutive?.onb || isExecutive?.sks || isExecutive?.wpm || isExecutive?.pbd);
19
- const isCollaboratorInAnyProduct = Boolean(isCollaborator?.wov || isCollaborator?.lms || isCollaborator?.onb || isCollaborator?.sks || isCollaborator?.wpm || isCollaborator?.pbd);
18
+ const isExecutiveInAnyProduct = Boolean(isExecutive?.wov || isExecutive?.lms || isExecutive?.onb || isExecutive?.sks || isExecutive?.wpm || isExecutive?.pbd || isExecutive?.cmp);
19
+ const isCollaboratorInAnyProduct = Boolean(isCollaborator?.wov || isCollaborator?.lms || isCollaborator?.onb || isCollaborator?.sks || isCollaborator?.wpm || isCollaborator?.pbd || isCollaborator?.cmp);
20
20
  const telemetryContext = getTelemetryContext();
21
21
  return {
22
22
  "User Id": userId,
@@ -50,6 +50,9 @@ const TelemetryIdTrait = "Telemetry Id";
50
50
  ...isDefined(isExecutive?.pbd) && {
51
51
  "Is Executive - Pingboard": isExecutive.pbd
52
52
  },
53
+ ...isDefined(isExecutive?.cmp) && {
54
+ "Is Executive - Compensation": isExecutive.cmp
55
+ },
53
56
  ...isCollaboratorInAnyProduct && {
54
57
  "Is Collaborator": isCollaboratorInAnyProduct
55
58
  },
@@ -71,6 +74,9 @@ const TelemetryIdTrait = "Telemetry Id";
71
74
  ...isDefined(isCollaborator?.pbd) && {
72
75
  "Is Collaborator - Pingboard": isCollaborator.pbd
73
76
  },
77
+ ...isDefined(isCollaborator?.cmp) && {
78
+ "Is Collaborator - Compensation": isCollaborator.cmp
79
+ },
74
80
  ...isDefined(isReportingManager) && {
75
81
  "Is Reporting Manager": isReportingManager
76
82
  },
@@ -94,6 +100,9 @@ const TelemetryIdTrait = "Telemetry Id";
94
100
  },
95
101
  ...isDefined(planCode?.pbd) && {
96
102
  "Plan Code - Pingboard": planCode.pbd
103
+ },
104
+ ...isDefined(planCode?.cmp) && {
105
+ "Plan Code - Compensation": planCode.cmp
97
106
  }
98
107
  };
99
108
  }
@@ -1 +1 @@
1
- {"version":3,"file":"createDefaultUserTraits.js","sources":["webpack://@workleap/logrocket/./src/createDefaultUserTraits.ts"],"sourcesContent":["import { getTelemetryContext } from \"@workleap/telemetry\";\nimport { isDefined } from \"./assertions.ts\";\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface LogRocketIdentification {\n userId: string;\n organizationId: string;\n organizationName: string;\n isMigratedToWorkleap: boolean;\n isAdmin: boolean;\n isOrganizationCreator?: boolean;\n isExecutive?: {\n wov?: boolean;\n lms?: boolean;\n onb?: boolean;\n sks?: boolean;\n wpm?: boolean;\n pbd?: boolean;\n };\n isCollaborator?: {\n wov?: boolean;\n lms?: boolean;\n onb?: boolean;\n sks?: boolean;\n wpm?: boolean;\n pbd?: boolean;\n };\n isReportingManager?: boolean;\n isTeamManager?: boolean;\n planCode?: {\n wov?: string;\n lms?: string;\n onb?: string;\n sks?: string;\n wpm?: string;\n pbd?: string;\n };\n}\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface LogRocketUserTraits extends Record<string, unknown> {\n \"User Id\": string;\n \"Organization Id\": string;\n \"Organization Name\": string;\n \"Is Migrated To Workleap\": boolean;\n \"Is Admin\": boolean;\n \"Device Id\": string;\n \"Telemetry Id\": string;\n \"Is Organization Creator\"?: boolean;\n \"Is Executive\"?: boolean;\n \"Is Executive - Officevibe\"?: boolean;\n \"Is Executive - LMS\"?: boolean;\n \"Is Executive - Onboarding\"?: boolean;\n \"Is Executive - Skills\"?: boolean;\n \"Is Executive - Performance\"?: boolean;\n \"Is Executive - Pingboard\"?: boolean;\n \"Is Collaborator\"?: boolean;\n \"Is Collaborator - Officevibe\"?: boolean;\n \"Is Collaborator - LMS\"?: boolean;\n \"Is Collaborator - Onboarding\"?: boolean;\n \"Is Collaborator - Skills\"?: boolean;\n \"Is Collaborator - Performance\"?: boolean;\n \"Is Collaborator - Pingboard\"?: boolean;\n \"Is Reporting Manager\"?: boolean;\n \"Is Team Manager\"?: boolean;\n \"Plan Code - Officevibe\"?: string;\n \"Plan Code - LMS\"?: string;\n \"Plan Code - Onboarding\"?: string;\n \"Plan Code - Skills\"?: string;\n \"Plan Code - Performance\"?: string;\n \"Plan Code - Pingboard\"?: string;\n}\n\nexport const DeviceIdTrait = \"Device Id\";\nexport const TelemetryIdTrait = \"Telemetry Id\";\n\n/**\n * Create the default user traits for a WLP user.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function createDefaultUserTraits(identification: LogRocketIdentification) {\n const {\n userId,\n organizationId,\n organizationName,\n isMigratedToWorkleap,\n isOrganizationCreator,\n isAdmin,\n isExecutive,\n isCollaborator,\n isReportingManager,\n isTeamManager,\n planCode\n } = identification;\n\n const isExecutiveInAnyProduct = Boolean(\n isExecutive?.wov ||\n isExecutive?.lms ||\n isExecutive?.onb ||\n isExecutive?.sks ||\n isExecutive?.wpm ||\n isExecutive?.pbd\n );\n\n const isCollaboratorInAnyProduct = Boolean(\n isCollaborator?.wov ||\n isCollaborator?.lms ||\n isCollaborator?.onb ||\n isCollaborator?.sks ||\n isCollaborator?.wpm ||\n isCollaborator?.pbd\n );\n\n const telemetryContext = getTelemetryContext();\n\n return {\n \"User Id\": userId,\n \"Organization Id\": organizationId,\n \"Organization Name\": organizationName,\n \"Is Migrated To Workleap\": isMigratedToWorkleap,\n \"Is Admin\": isAdmin,\n [DeviceIdTrait]: telemetryContext ? telemetryContext.deviceId : \"N/A\",\n [TelemetryIdTrait]: telemetryContext ? telemetryContext.telemetryId : \"N/A\",\n ...(isDefined(isOrganizationCreator) && { \"Is Organization Creator\": isOrganizationCreator }),\n ...(isExecutiveInAnyProduct && { \"Is Executive\": true }),\n ...(isDefined(isExecutive?.wov) && { \"Is Executive - Officevibe\": isExecutive.wov }),\n ...(isDefined(isExecutive?.lms) && { \"Is Executive - LMS\": isExecutive.lms }),\n ...(isDefined(isExecutive?.onb) && { \"Is Executive - Onboarding\": isExecutive.onb }),\n ...(isDefined(isExecutive?.sks) && { \"Is Executive - Skills\": isExecutive.sks }),\n ...(isDefined(isExecutive?.wpm) && { \"Is Executive - Performance\": isExecutive.wpm }),\n ...(isDefined(isExecutive?.pbd) && { \"Is Executive - Pingboard\": isExecutive.pbd }),\n ...(isCollaboratorInAnyProduct && { \"Is Collaborator\": isCollaboratorInAnyProduct }),\n ...(isDefined(isCollaborator?.wov) && { \"Is Collaborator - Officevibe\": isCollaborator.wov }),\n ...(isDefined(isCollaborator?.lms) && { \"Is Collaborator - LMS\": isCollaborator.lms }),\n ...(isDefined(isCollaborator?.onb) && { \"Is Collaborator - Onboarding\": isCollaborator.onb }),\n ...(isDefined(isCollaborator?.sks) && { \"Is Collaborator - Skills\": isCollaborator.sks }),\n ...(isDefined(isCollaborator?.wpm) && { \"Is Collaborator - Performance\": isCollaborator.wpm }),\n ...(isDefined(isCollaborator?.pbd) && { \"Is Collaborator - Pingboard\": isCollaborator.pbd }),\n ...(isDefined(isReportingManager) && { \"Is Reporting Manager\": isReportingManager }),\n ...(isDefined(isTeamManager) && { \"Is Team Manager\": isTeamManager }),\n ...(isDefined(planCode?.wov) && { \"Plan Code - Officevibe\": planCode.wov }),\n ...(isDefined(planCode?.lms) && { \"Plan Code - LMS\": planCode.lms }),\n ...(isDefined(planCode?.onb) && { \"Plan Code - Onboarding\": planCode.onb }),\n ...(isDefined(planCode?.sks) && { \"Plan Code - Skills\": planCode.sks }),\n ...(isDefined(planCode?.wpm) && { \"Plan Code - Performance\": planCode.wpm }),\n ...(isDefined(planCode?.pbd) && { \"Plan Code - Pingboard\": planCode.pbd })\n } satisfies LogRocketUserTraits;\n}\n"],"names":["getTelemetryContext","isDefined","DeviceIdTrait","TelemetryIdTrait","createDefaultUserTraits","identification","userId","organizationId","organizationName","isMigratedToWorkleap","isOrganizationCreator","isAdmin","isExecutive","isCollaborator","isReportingManager","isTeamManager","planCode","isExecutiveInAnyProduct","Boolean","isCollaboratorInAnyProduct","telemetryContext"],"mappings":";;;;;;;;AAA0D;AACd;AA4ErC,MAAME,gBAAgB,YAAY;AAClC,MAAMC,mBAAmB,eAAe;AAE/C;;;CAGC,GACM,SAASC,wBAAwBC,cAAuC;IAC3E,MAAM,EACFC,MAAM,EACNC,cAAc,EACdC,gBAAgB,EAChBC,oBAAoB,EACpBC,qBAAqB,EACrBC,OAAO,EACPC,WAAW,EACXC,cAAc,EACdC,kBAAkB,EAClBC,aAAa,EACbC,QAAQ,EACX,GAAGX;IAEJ,MAAMY,0BAA0BC,QAC5BN,aAAa,OACbA,aAAa,OACbA,aAAa,OACbA,aAAa,OACbA,aAAa,OACbA,aAAa;IAGjB,MAAMO,6BAA6BD,QAC/BL,gBAAgB,OAChBA,gBAAgB,OAChBA,gBAAgB,OAChBA,gBAAgB,OAChBA,gBAAgB,OAChBA,gBAAgB;IAGpB,MAAMO,mBAAmBpB,mBAAmBA;IAE5C,OAAO;QACH,W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AC7F,GAAIZ,SAASA,CAACY,gBAAgB,QAAQ;YAAE,+BAA+BA,eAAe,GAAG;QAAC,CAAC;QAC3F,GAAIZ,SAASA,CAACa,uBAAuB;YAAE,wBAAwBA;QAAmB,CAAC;QACnF,GAAIb,SAASA,CAACc,kBAAkB;YAAE,mBAAmBA;QAAc,CAAC;QACpE,GAAId,SAASA,CAACe,UAAU,QAAQ;YAAE,0BAA0BA,SAAS,GAAG;QAAC,CAAC;QAC1E,GAAIf,SAASA,CAACe,UAAU,QAAQ;YAAE,mBAAmBA,SAAS,GAAG;QAAC,CAAC;QACnE,GAAIf,SAASA,CAACe,UAAU,QAAQ;YAAE,0BAA0BA,SAAS,GAAG;QAAC,CAAC;QAC1E,GAAIf,SAASA,CAACe,UAAU,QAAQ;YAAE,sBAAsBA,SAAS,GAAG;QAAC,CAAC;QACtE,GAAIf,SAASA,CAACe,UAAU,QAAQ;YAAE,2BAA2BA,SAAS,GAAG;QAAC,CAAC;QAC3E,GAAIf,SAASA,CAACe,UAAU,QAAQ;YAAE,yBAAyBA,SAAS,GAAG;QAAC,CAAC;IAC7E;AACJ"}
1
+ {"version":3,"file":"createDefaultUserTraits.js","sources":["webpack://@workleap/logrocket/./src/createDefaultUserTraits.ts"],"sourcesContent":["import { getTelemetryContext } from \"@workleap/telemetry\";\nimport { isDefined } from \"./assertions.ts\";\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface LogRocketIdentification {\n userId: string;\n organizationId: string;\n organizationName: string;\n isMigratedToWorkleap: boolean;\n isAdmin: boolean;\n isOrganizationCreator?: boolean;\n isExecutive?: {\n wov?: boolean;\n lms?: boolean;\n onb?: boolean;\n sks?: boolean;\n wpm?: boolean;\n pbd?: boolean;\n cmp?: boolean;\n };\n isCollaborator?: {\n wov?: boolean;\n lms?: boolean;\n onb?: boolean;\n sks?: boolean;\n wpm?: boolean;\n pbd?: boolean;\n cmp?: boolean;\n };\n isReportingManager?: boolean;\n isTeamManager?: boolean;\n planCode?: {\n wov?: string;\n lms?: string;\n onb?: string;\n sks?: string;\n wpm?: string;\n pbd?: string;\n cmp?: string;\n };\n}\n\n/**\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport interface LogRocketUserTraits extends Record<string, unknown> {\n \"User Id\": string;\n \"Organization Id\": string;\n \"Organization Name\": string;\n \"Is Migrated To Workleap\": boolean;\n \"Is Admin\": boolean;\n \"Device Id\": string;\n \"Telemetry Id\": string;\n \"Is Organization Creator\"?: boolean;\n \"Is Executive\"?: boolean;\n \"Is Executive - Officevibe\"?: boolean;\n \"Is Executive - LMS\"?: boolean;\n \"Is Executive - Onboarding\"?: boolean;\n \"Is Executive - Skills\"?: boolean;\n \"Is Executive - Performance\"?: boolean;\n \"Is Executive - Pingboard\"?: boolean;\n \"Is Collaborator\"?: boolean;\n \"Is Collaborator - Officevibe\"?: boolean;\n \"Is Collaborator - LMS\"?: boolean;\n \"Is Collaborator - Onboarding\"?: boolean;\n \"Is Collaborator - Skills\"?: boolean;\n \"Is Collaborator - Performance\"?: boolean;\n \"Is Collaborator - Pingboard\"?: boolean;\n \"Is Reporting Manager\"?: boolean;\n \"Is Team Manager\"?: boolean;\n \"Plan Code - Officevibe\"?: string;\n \"Plan Code - LMS\"?: string;\n \"Plan Code - Onboarding\"?: string;\n \"Plan Code - Skills\"?: string;\n \"Plan Code - Performance\"?: string;\n \"Plan Code - Pingboard\"?: string;\n}\n\nexport const DeviceIdTrait = \"Device Id\";\nexport const TelemetryIdTrait = \"Telemetry Id\";\n\n/**\n * Create the default user traits for a WLP user.\n * @see {@link https://workleap.github.io/wl-telemetry}\n */\nexport function createDefaultUserTraits(identification: LogRocketIdentification) {\n const {\n userId,\n organizationId,\n organizationName,\n isMigratedToWorkleap,\n isOrganizationCreator,\n isAdmin,\n isExecutive,\n isCollaborator,\n isReportingManager,\n isTeamManager,\n planCode\n } = identification;\n\n const isExecutiveInAnyProduct = Boolean(\n isExecutive?.wov ||\n isExecutive?.lms ||\n isExecutive?.onb ||\n isExecutive?.sks ||\n isExecutive?.wpm ||\n isExecutive?.pbd ||\n isExecutive?.cmp\n );\n\n const isCollaboratorInAnyProduct = Boolean(\n isCollaborator?.wov ||\n isCollaborator?.lms ||\n isCollaborator?.onb ||\n isCollaborator?.sks ||\n isCollaborator?.wpm ||\n isCollaborator?.pbd ||\n isCollaborator?.cmp\n );\n\n const telemetryContext = getTelemetryContext();\n\n return {\n \"User Id\": userId,\n \"Organization Id\": organizationId,\n \"Organization Name\": organizationName,\n \"Is Migrated To Workleap\": isMigratedToWorkleap,\n \"Is Admin\": isAdmin,\n [DeviceIdTrait]: telemetryContext ? telemetryContext.deviceId : \"N/A\",\n [TelemetryIdTrait]: telemetryContext ? telemetryContext.telemetryId : \"N/A\",\n ...(isDefined(isOrganizationCreator) && { \"Is Organization Creator\": isOrganizationCreator }),\n ...(isExecutiveInAnyProduct && { \"Is Executive\": true }),\n ...(isDefined(isExecutive?.wov) && { \"Is Executive - Officevibe\": isExecutive.wov }),\n ...(isDefined(isExecutive?.lms) && { \"Is Executive - LMS\": isExecutive.lms }),\n ...(isDefined(isExecutive?.onb) && { \"Is Executive - Onboarding\": isExecutive.onb }),\n ...(isDefined(isExecutive?.sks) && { \"Is Executive - Skills\": isExecutive.sks }),\n ...(isDefined(isExecutive?.wpm) && { \"Is Executive - Performance\": isExecutive.wpm }),\n ...(isDefined(isExecutive?.pbd) && { \"Is Executive - Pingboard\": isExecutive.pbd }),\n ...(isDefined(isExecutive?.cmp) && { \"Is Executive - Compensation\": isExecutive.cmp }),\n ...(isCollaboratorInAnyProduct && { \"Is Collaborator\": isCollaboratorInAnyProduct }),\n ...(isDefined(isCollaborator?.wov) && { \"Is Collaborator - Officevibe\": isCollaborator.wov }),\n ...(isDefined(isCollaborator?.lms) && { \"Is Collaborator - LMS\": isCollaborator.lms }),\n ...(isDefined(isCollaborator?.onb) && { \"Is Collaborator - Onboarding\": isCollaborator.onb }),\n ...(isDefined(isCollaborator?.sks) && { \"Is Collaborator - Skills\": isCollaborator.sks }),\n ...(isDefined(isCollaborator?.wpm) && { \"Is Collaborator - Performance\": isCollaborator.wpm }),\n ...(isDefined(isCollaborator?.pbd) && { \"Is Collaborator - Pingboard\": isCollaborator.pbd }),\n ...(isDefined(isCollaborator?.cmp) && { \"Is Collaborator - Compensation\": isCollaborator.cmp }),\n ...(isDefined(isReportingManager) && { \"Is Reporting Manager\": isReportingManager }),\n ...(isDefined(isTeamManager) && { \"Is Team Manager\": isTeamManager }),\n ...(isDefined(planCode?.wov) && { \"Plan Code - Officevibe\": planCode.wov }),\n ...(isDefined(planCode?.lms) && { \"Plan Code - LMS\": planCode.lms }),\n ...(isDefined(planCode?.onb) && { \"Plan Code - Onboarding\": planCode.onb }),\n ...(isDefined(planCode?.sks) && { \"Plan Code - Skills\": planCode.sks }),\n ...(isDefined(planCode?.wpm) && { \"Plan Code - Performance\": planCode.wpm }),\n ...(isDefined(planCode?.pbd) && { \"Plan Code - Pingboard\": planCode.pbd }),\n ...(isDefined(planCode?.cmp) && { \"Plan Code - Compensation\": planCode.cmp })\n } satisfies LogRocketUserTraits;\n}\n"],"names":["getTelemetryContext","isDefined","DeviceIdTrait","TelemetryIdTrait","createDefaultUserTraits","identification","userId","organizationId","organizationName","isMigratedToWorkleap","isOrganizationCreator","isAdmin","isExecutive","isCollaborator","isReportingManager","isTeamManager","planCode","isExecutiveInAnyProduct","Boolean","isCollaboratorInAnyProduct","telemetryContext"],"mappings":";;;;;;;;AAA0D;AACd;AA+ErC,MAAME,gBAAgB,YAAY;AAClC,MAAMC,mBAAmB,eAAe;AAE/C;;;CAGC,GACM,SAASC,wBAAwBC,cAAuC;IAC3E,MAAM,EACFC,MAAM,EACNC,cAAc,EACdC,gBAAgB,EAChBC,oBAAoB,EACpBC,qBAAqB,EACrBC,OAAO,EACPC,WAAW,EACXC,cAAc,EACdC,kBAAkB,EAClBC,aAAa,EACbC,QAAQ,EACX,GAAGX;IAEJ,MAAMY,0BAA0BC,QAC5BN,aAAa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
  {
2
2
  "name": "@workleap/logrocket",
3
3
  "author": "Workleap",
4
- "version": "1.2.6",
4
+ "version": "1.2.7",
5
5
  "description": "A package containing utilities for LogRocket.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -18,6 +18,7 @@ export interface LogRocketIdentification {
18
18
  sks?: boolean;
19
19
  wpm?: boolean;
20
20
  pbd?: boolean;
21
+ cmp?: boolean;
21
22
  };
22
23
  isCollaborator?: {
23
24
  wov?: boolean;
@@ -26,6 +27,7 @@ export interface LogRocketIdentification {
26
27
  sks?: boolean;
27
28
  wpm?: boolean;
28
29
  pbd?: boolean;
30
+ cmp?: boolean;
29
31
  };
30
32
  isReportingManager?: boolean;
31
33
  isTeamManager?: boolean;
@@ -36,6 +38,7 @@ export interface LogRocketIdentification {
36
38
  sks?: string;
37
39
  wpm?: string;
38
40
  pbd?: string;
41
+ cmp?: string;
39
42
  };
40
43
  }
41
44
 
@@ -103,7 +106,8 @@ export function createDefaultUserTraits(identification: LogRocketIdentification)
103
106
  isExecutive?.onb ||
104
107
  isExecutive?.sks ||
105
108
  isExecutive?.wpm ||
106
- isExecutive?.pbd
109
+ isExecutive?.pbd ||
110
+ isExecutive?.cmp
107
111
  );
108
112
 
109
113
  const isCollaboratorInAnyProduct = Boolean(
@@ -112,7 +116,8 @@ export function createDefaultUserTraits(identification: LogRocketIdentification)
112
116
  isCollaborator?.onb ||
113
117
  isCollaborator?.sks ||
114
118
  isCollaborator?.wpm ||
115
- isCollaborator?.pbd
119
+ isCollaborator?.pbd ||
120
+ isCollaborator?.cmp
116
121
  );
117
122
 
118
123
  const telemetryContext = getTelemetryContext();
@@ -133,6 +138,7 @@ export function createDefaultUserTraits(identification: LogRocketIdentification)
133
138
  ...(isDefined(isExecutive?.sks) && { "Is Executive - Skills": isExecutive.sks }),
134
139
  ...(isDefined(isExecutive?.wpm) && { "Is Executive - Performance": isExecutive.wpm }),
135
140
  ...(isDefined(isExecutive?.pbd) && { "Is Executive - Pingboard": isExecutive.pbd }),
141
+ ...(isDefined(isExecutive?.cmp) && { "Is Executive - Compensation": isExecutive.cmp }),
136
142
  ...(isCollaboratorInAnyProduct && { "Is Collaborator": isCollaboratorInAnyProduct }),
137
143
  ...(isDefined(isCollaborator?.wov) && { "Is Collaborator - Officevibe": isCollaborator.wov }),
138
144
  ...(isDefined(isCollaborator?.lms) && { "Is Collaborator - LMS": isCollaborator.lms }),
@@ -140,6 +146,7 @@ export function createDefaultUserTraits(identification: LogRocketIdentification)
140
146
  ...(isDefined(isCollaborator?.sks) && { "Is Collaborator - Skills": isCollaborator.sks }),
141
147
  ...(isDefined(isCollaborator?.wpm) && { "Is Collaborator - Performance": isCollaborator.wpm }),
142
148
  ...(isDefined(isCollaborator?.pbd) && { "Is Collaborator - Pingboard": isCollaborator.pbd }),
149
+ ...(isDefined(isCollaborator?.cmp) && { "Is Collaborator - Compensation": isCollaborator.cmp }),
143
150
  ...(isDefined(isReportingManager) && { "Is Reporting Manager": isReportingManager }),
144
151
  ...(isDefined(isTeamManager) && { "Is Team Manager": isTeamManager }),
145
152
  ...(isDefined(planCode?.wov) && { "Plan Code - Officevibe": planCode.wov }),
@@ -147,6 +154,7 @@ export function createDefaultUserTraits(identification: LogRocketIdentification)
147
154
  ...(isDefined(planCode?.onb) && { "Plan Code - Onboarding": planCode.onb }),
148
155
  ...(isDefined(planCode?.sks) && { "Plan Code - Skills": planCode.sks }),
149
156
  ...(isDefined(planCode?.wpm) && { "Plan Code - Performance": planCode.wpm }),
150
- ...(isDefined(planCode?.pbd) && { "Plan Code - Pingboard": planCode.pbd })
157
+ ...(isDefined(planCode?.pbd) && { "Plan Code - Pingboard": planCode.pbd }),
158
+ ...(isDefined(planCode?.cmp) && { "Plan Code - Compensation": planCode.cmp })
151
159
  } satisfies LogRocketUserTraits;
152
160
  }