dce-reactkit 4.1.7 → 4.1.8

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.
@@ -15,6 +15,9 @@ type LogFunction = (opts: ({
15
15
  [k: string]: any;
16
16
  };
17
17
  level?: LogLevel;
18
+ userId?: number;
19
+ userFirstName?: string;
20
+ userLastName?: string;
18
21
  } & ({
19
22
  error: any;
20
23
  } | {
package/dist/index.d.ts CHANGED
@@ -1227,6 +1227,9 @@ type LogFunction = (opts: ({
1227
1227
  [k: string]: any;
1228
1228
  };
1229
1229
  level?: LogLevel;
1230
+ userId?: number;
1231
+ userFirstName?: string;
1232
+ userLastName?: string;
1230
1233
  } & ({
1231
1234
  error: any;
1232
1235
  } | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "4.1.7",
3
+ "version": "4.1.8",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -115,6 +115,11 @@ const logClientEvent: LogFunction = async (opts) => {
115
115
  ? (opts as any).action
116
116
  : undefined
117
117
  ),
118
+ overriddenUserInfo: {
119
+ userId: opts.userId,
120
+ userFirstName: opts.userFirstName,
121
+ userLastName: opts.userLastName,
122
+ },
118
123
  },
119
124
  });
120
125
  };
@@ -23,6 +23,12 @@ type LogFunction = (
23
23
  },
24
24
  // Log level (default is info)
25
25
  level?: LogLevel,
26
+ // Optional Canvas userId that overrides the current userId from the session (if there is one)
27
+ userId?: number,
28
+ // Optional Canvas user first name that overrides the current user first name from the session (if there is one)
29
+ userFirstName?: string,
30
+ // Optional Canvas user last name that overrides the current user last name from the session (if there is one)
31
+ userLastName?: string,
26
32
  } & (
27
33
  // Error
28
34
  | {