@botonic/core 0.41.1-alpha.0 → 0.42.0-alpha.1

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,7 +28,6 @@ interface CarouselElement {
28
28
  export interface CarouselMessage extends BaseMessage {
29
29
  type: 'carousel';
30
30
  content: {
31
- text?: string;
32
31
  elements: CarouselElement[];
33
32
  };
34
33
  }
@@ -1,5 +1,5 @@
1
1
  import { ToolExecution } from './ai-agents';
2
- export declare const EVENT_FORMAT_VERSION = 4;
2
+ export declare const EVENT_FORMAT_VERSION = 5;
3
3
  export declare enum EventAction {
4
4
  AiAgent = "ai_agent",
5
5
  FeedbackCase = "feedback_case",
@@ -8,6 +8,12 @@ export declare enum EventAction {
8
8
  FeedbackKnowledgebase = "feedback_knowledgebase",
9
9
  FeedbackWebview = "feedback_webview",
10
10
  FlowNode = "flow_node",
11
+ ConditionalCountry = "conditional_country",
12
+ ConditionalQueueStatus = "conditional_queue_status",
13
+ ConditionalCustom = "conditional_custom",
14
+ ConditionalChannel = "conditional_channel",
15
+ BotAction = "bot_action",
16
+ WebviewActionTriggered = "webview_action_triggered",
11
17
  HandoffOption = "handoff_option",
12
18
  HandoffSuccess = "handoff_success",
13
19
  HandoffFail = "handoff_fail",
@@ -17,11 +23,20 @@ export declare enum EventAction {
17
23
  Fallback = "fallback",
18
24
  WebviewStep = "webview_step",
19
25
  WebviewEnd = "webview_end",
20
- Custom = "custom"
26
+ Custom = "custom",
27
+ RedirectFlow = "redirect_flow"
21
28
  }
22
29
  export interface HtBaseEventProps {
23
30
  action: EventAction;
24
31
  }
32
+ export interface HtBaseEventAllFlowProps extends HtBaseEventProps {
33
+ flowThreadId: string;
34
+ flowId: string;
35
+ flowName: string;
36
+ flowNodeId: string;
37
+ flowNodeContentId: string;
38
+ flowNodeIsMeaningful: boolean;
39
+ }
25
40
  export interface EventFeedback extends HtBaseEventProps {
26
41
  action: EventAction.FeedbackCase | EventAction.FeedbackConversation | EventAction.FeedbackMessage | EventAction.FeedbackWebview;
27
42
  feedbackTargetId: string;
@@ -53,6 +68,30 @@ export interface EventFlow extends HtBaseEventProps {
53
68
  flowNodeContentId: string;
54
69
  flowNodeIsMeaningful?: boolean;
55
70
  }
71
+ export interface EventBotAction extends HtBaseEventAllFlowProps {
72
+ action: EventAction.BotAction;
73
+ payload: string;
74
+ }
75
+ export interface EventConditionalCountry extends HtBaseEventAllFlowProps {
76
+ action: EventAction.ConditionalCountry;
77
+ country: string;
78
+ }
79
+ export interface EventConditionalQueueStatus extends HtBaseEventAllFlowProps {
80
+ action: EventAction.ConditionalQueueStatus;
81
+ queueId: string;
82
+ queueName: string;
83
+ isQueueOpen: boolean;
84
+ isAvailableAgent: boolean;
85
+ }
86
+ export interface EventConditionalCustom extends HtBaseEventAllFlowProps {
87
+ action: EventAction.ConditionalCustom;
88
+ conditionalVariable: string;
89
+ variableFormat: string;
90
+ }
91
+ export interface EventConditionalChannel extends HtBaseEventAllFlowProps {
92
+ action: EventAction.ConditionalChannel;
93
+ channel: string;
94
+ }
56
95
  export interface EventHandoff extends HtBaseEventProps {
57
96
  action: EventAction.HandoffSuccess | EventAction.HandoffFail;
58
97
  flowThreadId?: string;
@@ -115,14 +154,13 @@ export interface EventKnowledgeBase extends HtBaseEventProps {
115
154
  knowledgebaseMessageId: string;
116
155
  userInput: string;
117
156
  }
118
- export interface EventAiAgent extends HtBaseEventProps {
157
+ export interface EventWebviewActionTriggered extends HtBaseEventAllFlowProps {
158
+ action: EventAction.WebviewActionTriggered;
159
+ webviewTargetId: string;
160
+ webviewName: string;
161
+ }
162
+ export interface EventAiAgent extends HtBaseEventAllFlowProps {
119
163
  action: EventAction.AiAgent;
120
- flowThreadId: string;
121
- flowId: string;
122
- flowName: string;
123
- flowNodeId: string;
124
- flowNodeContentId: string;
125
- flowNodeIsMeaningful: boolean;
126
164
  toolsExecuted: ToolExecution[];
127
165
  inputMessageId: string;
128
166
  memoryLength: number;
@@ -131,6 +169,11 @@ export interface EventAiAgent extends HtBaseEventProps {
131
169
  exit: boolean;
132
170
  error: boolean;
133
171
  }
172
+ export interface EventRedirectFlow extends HtBaseEventAllFlowProps {
173
+ action: EventAction.RedirectFlow;
174
+ flowTargetId: string;
175
+ flowTargetName: string;
176
+ }
134
177
  export declare enum KnowledgebaseFailReason {
135
178
  NoKnowledge = "no_knowledge",
136
179
  Hallucination = "hallucination"
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebviewEndFailType = exports.KnowledgebaseFailReason = exports.EventAction = exports.EVENT_FORMAT_VERSION = void 0;
4
- exports.EVENT_FORMAT_VERSION = 4;
4
+ exports.EVENT_FORMAT_VERSION = 5;
5
5
  var EventAction;
6
6
  (function (EventAction) {
7
7
  EventAction["AiAgent"] = "ai_agent";
@@ -11,6 +11,12 @@ var EventAction;
11
11
  EventAction["FeedbackKnowledgebase"] = "feedback_knowledgebase";
12
12
  EventAction["FeedbackWebview"] = "feedback_webview";
13
13
  EventAction["FlowNode"] = "flow_node";
14
+ EventAction["ConditionalCountry"] = "conditional_country";
15
+ EventAction["ConditionalQueueStatus"] = "conditional_queue_status";
16
+ EventAction["ConditionalCustom"] = "conditional_custom";
17
+ EventAction["ConditionalChannel"] = "conditional_channel";
18
+ EventAction["BotAction"] = "bot_action";
19
+ EventAction["WebviewActionTriggered"] = "webview_action_triggered";
14
20
  EventAction["HandoffOption"] = "handoff_option";
15
21
  EventAction["HandoffSuccess"] = "handoff_success";
16
22
  EventAction["HandoffFail"] = "handoff_fail";
@@ -21,6 +27,7 @@ var EventAction;
21
27
  EventAction["WebviewStep"] = "webview_step";
22
28
  EventAction["WebviewEnd"] = "webview_end";
23
29
  EventAction["Custom"] = "custom";
30
+ EventAction["RedirectFlow"] = "redirect_flow";
24
31
  })(EventAction = exports.EventAction || (exports.EventAction = {}));
25
32
  var KnowledgebaseFailReason;
26
33
  (function (KnowledgebaseFailReason) {
@@ -1 +1 @@
1
- {"version":3,"file":"hubtype-analytics.js","sourceRoot":"","sources":["../../../src/models/hubtype-analytics.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAG,CAAC,CAAA;AAErC,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,mCAAoB,CAAA;IACpB,6CAA8B,CAAA;IAC9B,mDAAoC,CAAA;IACpC,6DAA8C,CAAA;IAC9C,+DAAgD,CAAA;IAChD,mDAAoC,CAAA;IACpC,qCAAsB,CAAA;IACtB,+CAAgC,CAAA;IAChC,iDAAkC,CAAA;IAClC,2CAA4B,CAAA;IAC5B,sCAAuB,CAAA;IACvB,+CAAgC,CAAA;IAChC,8CAA+B,CAAA;IAC/B,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;AACnB,CAAC,EAlBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAkBtB;AAgID,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAGlC;AAiCD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B"}
1
+ {"version":3,"file":"hubtype-analytics.js","sourceRoot":"","sources":["../../../src/models/hubtype-analytics.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAG,CAAC,CAAA;AAErC,IAAY,WAyBX;AAzBD,WAAY,WAAW;IACrB,mCAAoB,CAAA;IACpB,6CAA8B,CAAA;IAC9B,mDAAoC,CAAA;IACpC,6DAA8C,CAAA;IAC9C,+DAAgD,CAAA;IAChD,mDAAoC,CAAA;IACpC,qCAAsB,CAAA;IACtB,yDAA0C,CAAA;IAC1C,kEAAmD,CAAA;IACnD,uDAAwC,CAAA;IACxC,yDAA0C,CAAA;IAC1C,uCAAwB,CAAA;IACxB,kEAAmD,CAAA;IACnD,+CAAgC,CAAA;IAChC,iDAAkC,CAAA;IAClC,2CAA4B,CAAA;IAC5B,sCAAuB,CAAA;IACvB,+CAAgC,CAAA;IAChC,8CAA+B,CAAA;IAC/B,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;IACjB,6CAA8B,CAAA;AAChC,CAAC,EAzBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAyBtB;AA4KD,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAGlC;AAiCD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B"}
@@ -28,7 +28,6 @@ interface CarouselElement {
28
28
  export interface CarouselMessage extends BaseMessage {
29
29
  type: 'carousel';
30
30
  content: {
31
- text?: string;
32
31
  elements: CarouselElement[];
33
32
  };
34
33
  }
@@ -1,5 +1,5 @@
1
1
  import { ToolExecution } from './ai-agents';
2
- export declare const EVENT_FORMAT_VERSION = 4;
2
+ export declare const EVENT_FORMAT_VERSION = 5;
3
3
  export declare enum EventAction {
4
4
  AiAgent = "ai_agent",
5
5
  FeedbackCase = "feedback_case",
@@ -8,6 +8,12 @@ export declare enum EventAction {
8
8
  FeedbackKnowledgebase = "feedback_knowledgebase",
9
9
  FeedbackWebview = "feedback_webview",
10
10
  FlowNode = "flow_node",
11
+ ConditionalCountry = "conditional_country",
12
+ ConditionalQueueStatus = "conditional_queue_status",
13
+ ConditionalCustom = "conditional_custom",
14
+ ConditionalChannel = "conditional_channel",
15
+ BotAction = "bot_action",
16
+ WebviewActionTriggered = "webview_action_triggered",
11
17
  HandoffOption = "handoff_option",
12
18
  HandoffSuccess = "handoff_success",
13
19
  HandoffFail = "handoff_fail",
@@ -17,11 +23,20 @@ export declare enum EventAction {
17
23
  Fallback = "fallback",
18
24
  WebviewStep = "webview_step",
19
25
  WebviewEnd = "webview_end",
20
- Custom = "custom"
26
+ Custom = "custom",
27
+ RedirectFlow = "redirect_flow"
21
28
  }
22
29
  export interface HtBaseEventProps {
23
30
  action: EventAction;
24
31
  }
32
+ export interface HtBaseEventAllFlowProps extends HtBaseEventProps {
33
+ flowThreadId: string;
34
+ flowId: string;
35
+ flowName: string;
36
+ flowNodeId: string;
37
+ flowNodeContentId: string;
38
+ flowNodeIsMeaningful: boolean;
39
+ }
25
40
  export interface EventFeedback extends HtBaseEventProps {
26
41
  action: EventAction.FeedbackCase | EventAction.FeedbackConversation | EventAction.FeedbackMessage | EventAction.FeedbackWebview;
27
42
  feedbackTargetId: string;
@@ -53,6 +68,30 @@ export interface EventFlow extends HtBaseEventProps {
53
68
  flowNodeContentId: string;
54
69
  flowNodeIsMeaningful?: boolean;
55
70
  }
71
+ export interface EventBotAction extends HtBaseEventAllFlowProps {
72
+ action: EventAction.BotAction;
73
+ payload: string;
74
+ }
75
+ export interface EventConditionalCountry extends HtBaseEventAllFlowProps {
76
+ action: EventAction.ConditionalCountry;
77
+ country: string;
78
+ }
79
+ export interface EventConditionalQueueStatus extends HtBaseEventAllFlowProps {
80
+ action: EventAction.ConditionalQueueStatus;
81
+ queueId: string;
82
+ queueName: string;
83
+ isQueueOpen: boolean;
84
+ isAvailableAgent: boolean;
85
+ }
86
+ export interface EventConditionalCustom extends HtBaseEventAllFlowProps {
87
+ action: EventAction.ConditionalCustom;
88
+ conditionalVariable: string;
89
+ variableFormat: string;
90
+ }
91
+ export interface EventConditionalChannel extends HtBaseEventAllFlowProps {
92
+ action: EventAction.ConditionalChannel;
93
+ channel: string;
94
+ }
56
95
  export interface EventHandoff extends HtBaseEventProps {
57
96
  action: EventAction.HandoffSuccess | EventAction.HandoffFail;
58
97
  flowThreadId?: string;
@@ -115,14 +154,13 @@ export interface EventKnowledgeBase extends HtBaseEventProps {
115
154
  knowledgebaseMessageId: string;
116
155
  userInput: string;
117
156
  }
118
- export interface EventAiAgent extends HtBaseEventProps {
157
+ export interface EventWebviewActionTriggered extends HtBaseEventAllFlowProps {
158
+ action: EventAction.WebviewActionTriggered;
159
+ webviewTargetId: string;
160
+ webviewName: string;
161
+ }
162
+ export interface EventAiAgent extends HtBaseEventAllFlowProps {
119
163
  action: EventAction.AiAgent;
120
- flowThreadId: string;
121
- flowId: string;
122
- flowName: string;
123
- flowNodeId: string;
124
- flowNodeContentId: string;
125
- flowNodeIsMeaningful: boolean;
126
164
  toolsExecuted: ToolExecution[];
127
165
  inputMessageId: string;
128
166
  memoryLength: number;
@@ -131,6 +169,11 @@ export interface EventAiAgent extends HtBaseEventProps {
131
169
  exit: boolean;
132
170
  error: boolean;
133
171
  }
172
+ export interface EventRedirectFlow extends HtBaseEventAllFlowProps {
173
+ action: EventAction.RedirectFlow;
174
+ flowTargetId: string;
175
+ flowTargetName: string;
176
+ }
134
177
  export declare enum KnowledgebaseFailReason {
135
178
  NoKnowledge = "no_knowledge",
136
179
  Hallucination = "hallucination"
@@ -1,4 +1,4 @@
1
- export const EVENT_FORMAT_VERSION = 4;
1
+ export const EVENT_FORMAT_VERSION = 5;
2
2
  export var EventAction;
3
3
  (function (EventAction) {
4
4
  EventAction["AiAgent"] = "ai_agent";
@@ -8,6 +8,12 @@ export var EventAction;
8
8
  EventAction["FeedbackKnowledgebase"] = "feedback_knowledgebase";
9
9
  EventAction["FeedbackWebview"] = "feedback_webview";
10
10
  EventAction["FlowNode"] = "flow_node";
11
+ EventAction["ConditionalCountry"] = "conditional_country";
12
+ EventAction["ConditionalQueueStatus"] = "conditional_queue_status";
13
+ EventAction["ConditionalCustom"] = "conditional_custom";
14
+ EventAction["ConditionalChannel"] = "conditional_channel";
15
+ EventAction["BotAction"] = "bot_action";
16
+ EventAction["WebviewActionTriggered"] = "webview_action_triggered";
11
17
  EventAction["HandoffOption"] = "handoff_option";
12
18
  EventAction["HandoffSuccess"] = "handoff_success";
13
19
  EventAction["HandoffFail"] = "handoff_fail";
@@ -18,6 +24,7 @@ export var EventAction;
18
24
  EventAction["WebviewStep"] = "webview_step";
19
25
  EventAction["WebviewEnd"] = "webview_end";
20
26
  EventAction["Custom"] = "custom";
27
+ EventAction["RedirectFlow"] = "redirect_flow";
21
28
  })(EventAction || (EventAction = {}));
22
29
  export var KnowledgebaseFailReason;
23
30
  (function (KnowledgebaseFailReason) {
@@ -1 +1 @@
1
- {"version":3,"file":"hubtype-analytics.js","sourceRoot":"","sources":["../../../src/models/hubtype-analytics.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AAErC,MAAM,CAAN,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,mCAAoB,CAAA;IACpB,6CAA8B,CAAA;IAC9B,mDAAoC,CAAA;IACpC,6DAA8C,CAAA;IAC9C,+DAAgD,CAAA;IAChD,mDAAoC,CAAA;IACpC,qCAAsB,CAAA;IACtB,+CAAgC,CAAA;IAChC,iDAAkC,CAAA;IAClC,2CAA4B,CAAA;IAC5B,sCAAuB,CAAA;IACvB,+CAAgC,CAAA;IAChC,8CAA+B,CAAA;IAC/B,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;AACnB,CAAC,EAlBW,WAAW,KAAX,WAAW,QAkBtB;AAgID,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAiCD,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B"}
1
+ {"version":3,"file":"hubtype-analytics.js","sourceRoot":"","sources":["../../../src/models/hubtype-analytics.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAA;AAErC,MAAM,CAAN,IAAY,WAyBX;AAzBD,WAAY,WAAW;IACrB,mCAAoB,CAAA;IACpB,6CAA8B,CAAA;IAC9B,mDAAoC,CAAA;IACpC,6DAA8C,CAAA;IAC9C,+DAAgD,CAAA;IAChD,mDAAoC,CAAA;IACpC,qCAAsB,CAAA;IACtB,yDAA0C,CAAA;IAC1C,kEAAmD,CAAA;IACnD,uDAAwC,CAAA;IACxC,yDAA0C,CAAA;IAC1C,uCAAwB,CAAA;IACxB,kEAAmD,CAAA;IACnD,+CAAgC,CAAA;IAChC,iDAAkC,CAAA;IAClC,2CAA4B,CAAA;IAC5B,sCAAuB,CAAA;IACvB,+CAAgC,CAAA;IAChC,8CAA+B,CAAA;IAC/B,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;IACjB,6CAA8B,CAAA;AAChC,CAAC,EAzBW,WAAW,KAAX,WAAW,QAyBtB;AA4KD,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAiCD,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botonic/core",
3
- "version": "0.41.1-alpha.0",
3
+ "version": "0.42.0-alpha.1",
4
4
  "license": "MIT",
5
5
  "description": "Build Chatbots using React",
6
6
  "main": "./lib/cjs/index.js",
@@ -33,7 +33,6 @@ interface CarouselElement {
33
33
  export interface CarouselMessage extends BaseMessage {
34
34
  type: 'carousel'
35
35
  content: {
36
- text?: string
37
36
  elements: CarouselElement[]
38
37
  }
39
38
  }
@@ -1,6 +1,6 @@
1
1
  import { ToolExecution } from './ai-agents'
2
2
 
3
- export const EVENT_FORMAT_VERSION = 4
3
+ export const EVENT_FORMAT_VERSION = 5
4
4
 
5
5
  export enum EventAction {
6
6
  AiAgent = 'ai_agent',
@@ -10,6 +10,12 @@ export enum EventAction {
10
10
  FeedbackKnowledgebase = 'feedback_knowledgebase',
11
11
  FeedbackWebview = 'feedback_webview',
12
12
  FlowNode = 'flow_node',
13
+ ConditionalCountry = 'conditional_country',
14
+ ConditionalQueueStatus = 'conditional_queue_status',
15
+ ConditionalCustom = 'conditional_custom',
16
+ ConditionalChannel = 'conditional_channel',
17
+ BotAction = 'bot_action',
18
+ WebviewActionTriggered = 'webview_action_triggered',
13
19
  HandoffOption = 'handoff_option',
14
20
  HandoffSuccess = 'handoff_success',
15
21
  HandoffFail = 'handoff_fail',
@@ -20,12 +26,22 @@ export enum EventAction {
20
26
  WebviewStep = 'webview_step',
21
27
  WebviewEnd = 'webview_end',
22
28
  Custom = 'custom',
29
+ RedirectFlow = 'redirect_flow',
23
30
  }
24
31
 
25
32
  export interface HtBaseEventProps {
26
33
  action: EventAction
27
34
  }
28
35
 
36
+ export interface HtBaseEventAllFlowProps extends HtBaseEventProps {
37
+ flowThreadId: string
38
+ flowId: string
39
+ flowName: string
40
+ flowNodeId: string
41
+ flowNodeContentId: string
42
+ flowNodeIsMeaningful: boolean
43
+ }
44
+
29
45
  export interface EventFeedback extends HtBaseEventProps {
30
46
  action:
31
47
  | EventAction.FeedbackCase
@@ -64,6 +80,35 @@ export interface EventFlow extends HtBaseEventProps {
64
80
  flowNodeIsMeaningful?: boolean
65
81
  }
66
82
 
83
+ export interface EventBotAction extends HtBaseEventAllFlowProps {
84
+ action: EventAction.BotAction
85
+ payload: string
86
+ }
87
+
88
+ export interface EventConditionalCountry extends HtBaseEventAllFlowProps {
89
+ action: EventAction.ConditionalCountry
90
+ country: string
91
+ }
92
+
93
+ export interface EventConditionalQueueStatus extends HtBaseEventAllFlowProps {
94
+ action: EventAction.ConditionalQueueStatus
95
+ queueId: string
96
+ queueName: string
97
+ isQueueOpen: boolean
98
+ isAvailableAgent: boolean
99
+ }
100
+
101
+ export interface EventConditionalCustom extends HtBaseEventAllFlowProps {
102
+ action: EventAction.ConditionalCustom
103
+ conditionalVariable: string
104
+ variableFormat: string
105
+ }
106
+
107
+ export interface EventConditionalChannel extends HtBaseEventAllFlowProps {
108
+ action: EventAction.ConditionalChannel
109
+ channel: string
110
+ }
111
+
67
112
  export interface EventHandoff extends HtBaseEventProps {
68
113
  action: EventAction.HandoffSuccess | EventAction.HandoffFail
69
114
  flowThreadId?: string
@@ -131,14 +176,14 @@ export interface EventKnowledgeBase extends HtBaseEventProps {
131
176
  userInput: string
132
177
  }
133
178
 
134
- export interface EventAiAgent extends HtBaseEventProps {
179
+ export interface EventWebviewActionTriggered extends HtBaseEventAllFlowProps {
180
+ action: EventAction.WebviewActionTriggered
181
+ webviewTargetId: string
182
+ webviewName: string
183
+ }
184
+
185
+ export interface EventAiAgent extends HtBaseEventAllFlowProps {
135
186
  action: EventAction.AiAgent
136
- flowThreadId: string
137
- flowId: string
138
- flowName: string
139
- flowNodeId: string
140
- flowNodeContentId: string
141
- flowNodeIsMeaningful: boolean
142
187
  toolsExecuted: ToolExecution[]
143
188
  inputMessageId: string
144
189
  memoryLength: number
@@ -148,6 +193,12 @@ export interface EventAiAgent extends HtBaseEventProps {
148
193
  error: boolean
149
194
  }
150
195
 
196
+ export interface EventRedirectFlow extends HtBaseEventAllFlowProps {
197
+ action: EventAction.RedirectFlow
198
+ flowTargetId: string
199
+ flowTargetName: string
200
+ }
201
+
151
202
  export enum KnowledgebaseFailReason {
152
203
  NoKnowledge = 'no_knowledge',
153
204
  Hallucination = 'hallucination',