@tinkrapp/widget 1.1.2 → 1.2.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.
@@ -25,6 +25,24 @@ interface WidgetConfig {
25
25
  * Enable debug logging in the console.
26
26
  */
27
27
  debug?: boolean;
28
+ /**
29
+ * User context from the integration platform (e.g., Thinkific).
30
+ * Used to store user information in the database.
31
+ */
32
+ userContext?: {
33
+ firstName?: string;
34
+ lastName?: string;
35
+ email?: string;
36
+ };
37
+ /**
38
+ * Lesson context from the integration platform.
39
+ * Used to display context pills for the current lesson.
40
+ */
41
+ lessonContext?: {
42
+ lessonId: string;
43
+ lessonTitle: string;
44
+ chapterTitle?: string;
45
+ };
28
46
  }
29
47
  interface Message {
30
48
  id: string;
@@ -78,7 +96,7 @@ type WidgetEvents = {
78
96
  'message:received': {
79
97
  message: Message;
80
98
  };
81
- 'error': {
99
+ error: {
82
100
  error: WidgetError;
83
101
  };
84
102
  'session:created': {
@@ -25,6 +25,24 @@ interface WidgetConfig {
25
25
  * Enable debug logging in the console.
26
26
  */
27
27
  debug?: boolean;
28
+ /**
29
+ * User context from the integration platform (e.g., Thinkific).
30
+ * Used to store user information in the database.
31
+ */
32
+ userContext?: {
33
+ firstName?: string;
34
+ lastName?: string;
35
+ email?: string;
36
+ };
37
+ /**
38
+ * Lesson context from the integration platform.
39
+ * Used to display context pills for the current lesson.
40
+ */
41
+ lessonContext?: {
42
+ lessonId: string;
43
+ lessonTitle: string;
44
+ chapterTitle?: string;
45
+ };
28
46
  }
29
47
  interface Message {
30
48
  id: string;
@@ -78,7 +96,7 @@ type WidgetEvents = {
78
96
  'message:received': {
79
97
  message: Message;
80
98
  };
81
- 'error': {
99
+ error: {
82
100
  error: WidgetError;
83
101
  };
84
102
  'session:created': {