@botonic/plugin-hubtype-analytics 0.30.2 → 0.32.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.
- package/README.md +13 -11
- package/lib/cjs/event-models/ht-event-intent-smart.d.ts +3 -0
- package/lib/cjs/event-models/ht-event-intent-smart.js +3 -0
- package/lib/cjs/event-models/ht-event-intent-smart.js.map +1 -1
- package/lib/cjs/event-models/ht-event-intent.d.ts +3 -0
- package/lib/cjs/event-models/ht-event-intent.js +3 -0
- package/lib/cjs/event-models/ht-event-intent.js.map +1 -1
- package/lib/cjs/event-models/ht-event-keyword.d.ts +3 -1
- package/lib/cjs/event-models/ht-event-keyword.js +3 -1
- package/lib/cjs/event-models/ht-event-keyword.js.map +1 -1
- package/lib/cjs/event-models/ht-event-knowledge-base.d.ts +3 -0
- package/lib/cjs/event-models/ht-event-knowledge-base.js +3 -0
- package/lib/cjs/event-models/ht-event-knowledge-base.js.map +1 -1
- package/lib/cjs/types.d.ts +12 -1
- package/lib/cjs/types.js.map +1 -1
- package/lib/esm/event-models/ht-event-intent-smart.d.ts +3 -0
- package/lib/esm/event-models/ht-event-intent-smart.js +3 -0
- package/lib/esm/event-models/ht-event-intent-smart.js.map +1 -1
- package/lib/esm/event-models/ht-event-intent.d.ts +3 -0
- package/lib/esm/event-models/ht-event-intent.js +3 -0
- package/lib/esm/event-models/ht-event-intent.js.map +1 -1
- package/lib/esm/event-models/ht-event-keyword.d.ts +3 -1
- package/lib/esm/event-models/ht-event-keyword.js +3 -1
- package/lib/esm/event-models/ht-event-keyword.js.map +1 -1
- package/lib/esm/event-models/ht-event-knowledge-base.d.ts +3 -0
- package/lib/esm/event-models/ht-event-knowledge-base.js +3 -0
- package/lib/esm/event-models/ht-event-knowledge-base.js.map +1 -1
- package/lib/esm/types.d.ts +12 -1
- package/lib/esm/types.js.map +1 -1
- package/package.json +8 -4
- package/src/event-models/ht-event-intent-smart.ts +6 -0
- package/src/event-models/ht-event-intent.ts +6 -0
- package/src/event-models/ht-event-keyword.ts +6 -2
- package/src/event-models/ht-event-knowledge-base.ts +6 -0
- package/src/types.ts +12 -1
package/README.md
CHANGED
|
@@ -17,17 +17,19 @@ npm i @botonic/plugin-hubtype-analytics
|
|
|
17
17
|
You can define two optional functions to obtain the language and the country.
|
|
18
18
|
By default if you do not define these functions it will use the language defined in request.session.user.extra_data.language and country defined in request.session.user.extra_data.country
|
|
19
19
|
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
```typescript
|
|
21
|
+
export const plugins = [
|
|
22
|
+
{
|
|
23
|
+
id: 'hubtype-analytics',
|
|
24
|
+
resolve: require('@botonic/plugin-hubtype-analytics'),
|
|
25
|
+
options: {
|
|
26
|
+
getLaguange: (request: BotRequest) =>
|
|
27
|
+
request.session.user.extra_data.lang,
|
|
28
|
+
getCountry: (request: BotRequest) =>
|
|
29
|
+
request.session.user.extra_data.store,
|
|
29
30
|
},
|
|
30
|
-
|
|
31
|
+
},
|
|
32
|
+
]
|
|
31
33
|
```
|
|
32
34
|
|
|
33
35
|
## Plugin Options
|
|
@@ -60,7 +62,7 @@ export class WelcomeAction extends FlowBuilderMultichannelAction {
|
|
|
60
62
|
}
|
|
61
63
|
```
|
|
62
64
|
|
|
63
|
-
- To track a handoff, you can use an instance of `HandOffBuilder` from `@botonic/core` `handoffBuilder.withBotEvent()` so
|
|
65
|
+
- To track a handoff, you can use an instance of `HandOffBuilder` from `@botonic/core` `handoffBuilder.withBotEvent()` so that the backend will create the event after the handoff has been done correctly.
|
|
64
66
|
|
|
65
67
|
```typescript
|
|
66
68
|
const handOffBuilder = new HandOffBuilder(request.session)
|
|
@@ -5,5 +5,8 @@ export declare class HtEventIntentSmart extends HtEvent {
|
|
|
5
5
|
nlu_intent_smart_num_used: number;
|
|
6
6
|
nlu_intent_smart_message_id: string;
|
|
7
7
|
user_input: string;
|
|
8
|
+
flow_thread_id: string;
|
|
9
|
+
flow_id: string;
|
|
10
|
+
flow_node_id: string;
|
|
8
11
|
constructor(event: EventIntentSmart, requestData: RequestData);
|
|
9
12
|
}
|
|
@@ -12,6 +12,9 @@ class HtEventIntentSmart extends ht_event_1.HtEvent {
|
|
|
12
12
|
this.nlu_intent_smart_num_used = event.nluIntentSmartNumUsed;
|
|
13
13
|
this.nlu_intent_smart_message_id = event.nluIntentSmartMessageId;
|
|
14
14
|
this.user_input = event.userInput;
|
|
15
|
+
this.flow_thread_id = event.flowThreadId;
|
|
16
|
+
this.flow_id = event.flowId;
|
|
17
|
+
this.flow_node_id = event.flowNodeId;
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
20
|
exports.HtEventIntentSmart = HtEventIntentSmart;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ht-event-intent-smart.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-intent-smart.ts"],"names":[],"mappings":";;;AAAA,oCAAgF;AAChF,yCAAoC;AAEpC,MAAa,kBAAmB,SAAQ,kBAAO;
|
|
1
|
+
{"version":3,"file":"ht-event-intent-smart.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-intent-smart.ts"],"names":[],"mappings":";;;AAAA,oCAAgF;AAChF,yCAAoC;AAEpC,MAAa,kBAAmB,SAAQ,kBAAO;IAS7C,YAAY,KAAuB,EAAE,WAAwB;QAC3D,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,mBAAW,CAAC,WAAW,CAAA;QACrC,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC,mBAAmB,CAAA;QACvD,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,qBAAqB,CAAA;QAC5D,IAAI,CAAC,2BAA2B,GAAG,KAAK,CAAC,uBAAuB,CAAA;QAChE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,YAAY,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,UAAU,CAAA;IACtC,CAAC;CACF;AArBD,gDAqBC"}
|
|
@@ -6,5 +6,8 @@ export declare class HtEventIntent extends HtEvent {
|
|
|
6
6
|
nlu_intent_threshold: number;
|
|
7
7
|
nlu_intent_message_id: string;
|
|
8
8
|
user_input: string;
|
|
9
|
+
flow_thread_id: string;
|
|
10
|
+
flow_id: string;
|
|
11
|
+
flow_node_id: string;
|
|
9
12
|
constructor(event: EventIntent, requestData: RequestData);
|
|
10
13
|
}
|
|
@@ -13,6 +13,9 @@ class HtEventIntent extends ht_event_1.HtEvent {
|
|
|
13
13
|
this.nlu_intent_threshold = event.nluIntentThreshold;
|
|
14
14
|
this.nlu_intent_message_id = event.nluIntentMessageId;
|
|
15
15
|
this.user_input = event.userInput;
|
|
16
|
+
this.flow_thread_id = event.flowThreadId;
|
|
17
|
+
this.flow_id = event.flowId;
|
|
18
|
+
this.flow_node_id = event.flowNodeId;
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
21
|
exports.HtEventIntent = HtEventIntent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ht-event-intent.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-intent.ts"],"names":[],"mappings":";;;AAAA,oCAA2E;AAC3E,yCAAoC;AAEpC,MAAa,aAAc,SAAQ,kBAAO;
|
|
1
|
+
{"version":3,"file":"ht-event-intent.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-intent.ts"],"names":[],"mappings":";;;AAAA,oCAA2E;AAC3E,yCAAoC;AAEpC,MAAa,aAAc,SAAQ,kBAAO;IAUxC,YAAY,KAAkB,EAAE,WAAwB;QACtD,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,mBAAW,CAAC,MAAM,CAAA;QAChC,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAA;QAC5C,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC,mBAAmB,CAAA;QACtD,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC,kBAAkB,CAAA;QACpD,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC,kBAAkB,CAAA;QACrD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,YAAY,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,UAAU,CAAA;IACtC,CAAC;CACF;AAvBD,sCAuBC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { EventKeyword, RequestData } from '../types';
|
|
2
2
|
import { HtEvent } from './ht-event';
|
|
3
3
|
export declare class HtEventKeyword extends HtEvent {
|
|
4
|
-
nlu_keyword_id: string;
|
|
5
4
|
nlu_keyword_name: string;
|
|
6
5
|
nlu_keyword_is_regex: boolean;
|
|
7
6
|
nlu_keyword_message_id: string;
|
|
8
7
|
user_input: string;
|
|
8
|
+
flow_thread_id: string;
|
|
9
|
+
flow_id: string;
|
|
10
|
+
flow_node_id: string;
|
|
9
11
|
constructor(event: EventKeyword, requestData: RequestData);
|
|
10
12
|
}
|
|
@@ -8,11 +8,13 @@ class HtEventKeyword extends ht_event_1.HtEvent {
|
|
|
8
8
|
super(event, requestData);
|
|
9
9
|
this.type = types_1.EventType.BotEvent;
|
|
10
10
|
this.action = types_1.EventAction.Keyword;
|
|
11
|
-
this.nlu_keyword_id = event.nluKeywordId;
|
|
12
11
|
this.nlu_keyword_name = event.nluKeywordName;
|
|
13
12
|
this.nlu_keyword_is_regex = event.nluKeywordIsRegex || false;
|
|
14
13
|
this.nlu_keyword_message_id = event.nluKeywordMessageId;
|
|
15
14
|
this.user_input = event.userInput;
|
|
15
|
+
this.flow_thread_id = event.flowThreadId;
|
|
16
|
+
this.flow_id = event.flowId;
|
|
17
|
+
this.flow_node_id = event.flowNodeId;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
20
|
exports.HtEventKeyword = HtEventKeyword;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ht-event-keyword.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-keyword.ts"],"names":[],"mappings":";;;AAAA,oCAA4E;AAC5E,yCAAoC;AAEpC,MAAa,cAAe,SAAQ,kBAAO;
|
|
1
|
+
{"version":3,"file":"ht-event-keyword.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-keyword.ts"],"names":[],"mappings":";;;AAAA,oCAA4E;AAC5E,yCAAoC;AAEpC,MAAa,cAAe,SAAQ,kBAAO;IASzC,YAAY,KAAmB,EAAE,WAAwB;QACvD,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,mBAAW,CAAC,OAAO,CAAA;QACjC,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAA;QAC5C,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAA;QAC5D,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC,mBAAmB,CAAA;QACvD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,YAAY,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,UAAU,CAAA;IACtC,CAAC;CACF;AArBD,wCAqBC"}
|
|
@@ -7,5 +7,8 @@ export declare class HtEventKnowledgeBase extends HtEvent {
|
|
|
7
7
|
knowledgebase_chunks_ids: string[];
|
|
8
8
|
knowledgebase_message_id: string;
|
|
9
9
|
user_input: string;
|
|
10
|
+
flow_thread_id: string;
|
|
11
|
+
flow_id: string;
|
|
12
|
+
flow_node_id: string;
|
|
10
13
|
constructor(event: EventKnowledgeBase, requestData: RequestData);
|
|
11
14
|
}
|
|
@@ -14,6 +14,9 @@ class HtEventKnowledgeBase extends ht_event_1.HtEvent {
|
|
|
14
14
|
this.knowledgebase_chunks_ids = event.knowledgebaseChunksIds;
|
|
15
15
|
this.knowledgebase_message_id = event.knowledgebaseMessageId;
|
|
16
16
|
this.user_input = event.userInput;
|
|
17
|
+
this.flow_thread_id = event.flowThreadId;
|
|
18
|
+
this.flow_id = event.flowId;
|
|
19
|
+
this.flow_node_id = event.flowNodeId;
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
exports.HtEventKnowledgeBase = HtEventKnowledgeBase;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ht-event-knowledge-base.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-knowledge-base.ts"],"names":[],"mappings":";;;AAAA,oCAKiB;AACjB,yCAAoC;AAEpC,MAAa,oBAAqB,SAAQ,kBAAO;
|
|
1
|
+
{"version":3,"file":"ht-event-knowledge-base.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-knowledge-base.ts"],"names":[],"mappings":";;;AAAA,oCAKiB;AACjB,yCAAoC;AAEpC,MAAa,oBAAqB,SAAQ,kBAAO;IAW/C,YAAY,KAAyB,EAAE,WAAwB;QAC7D,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,iBAAS,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,mBAAW,CAAC,aAAa,CAAA;QACvC,IAAI,CAAC,0BAA0B,GAAG,KAAK,CAAC,wBAAwB,CAAA;QAChE,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,uBAAuB,CAAA;QAC9D,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,uBAAuB,CAAA;QAC9D,IAAI,CAAC,wBAAwB,GAAG,KAAK,CAAC,sBAAsB,CAAA;QAC5D,IAAI,CAAC,wBAAwB,GAAG,KAAK,CAAC,sBAAsB,CAAA;QAC5D,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,YAAY,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,UAAU,CAAA;IACtC,CAAC;CACF;AAzBD,oDAyBC"}
|
package/lib/cjs/types.d.ts
CHANGED
|
@@ -73,6 +73,9 @@ export interface EventHandoffOption extends HtBaseEventProps {
|
|
|
73
73
|
}
|
|
74
74
|
export interface EventIntent extends HtBaseEventProps {
|
|
75
75
|
action: EventAction.Intent;
|
|
76
|
+
flowThreadId: string;
|
|
77
|
+
flowId: string;
|
|
78
|
+
flowNodeId: string;
|
|
76
79
|
nluIntentLabel: string;
|
|
77
80
|
nluIntentConfidence: number;
|
|
78
81
|
nluIntentThreshold: number;
|
|
@@ -81,7 +84,9 @@ export interface EventIntent extends HtBaseEventProps {
|
|
|
81
84
|
}
|
|
82
85
|
export interface EventKeyword extends HtBaseEventProps {
|
|
83
86
|
action: EventAction.Keyword;
|
|
84
|
-
|
|
87
|
+
flowThreadId: string;
|
|
88
|
+
flowId: string;
|
|
89
|
+
flowNodeId: string;
|
|
85
90
|
nluKeywordName: string;
|
|
86
91
|
nluKeywordIsRegex?: boolean;
|
|
87
92
|
nluKeywordMessageId: string;
|
|
@@ -89,6 +94,9 @@ export interface EventKeyword extends HtBaseEventProps {
|
|
|
89
94
|
}
|
|
90
95
|
export interface EventIntentSmart extends HtBaseEventProps {
|
|
91
96
|
action: EventAction.IntentSmart;
|
|
97
|
+
flowThreadId: string;
|
|
98
|
+
flowId: string;
|
|
99
|
+
flowNodeId: string;
|
|
92
100
|
nluIntentSmartTitle: string;
|
|
93
101
|
nluIntentSmartNumUsed: number;
|
|
94
102
|
nluIntentSmartMessageId: string;
|
|
@@ -96,6 +104,9 @@ export interface EventIntentSmart extends HtBaseEventProps {
|
|
|
96
104
|
}
|
|
97
105
|
export interface EventKnowledgeBase extends HtBaseEventProps {
|
|
98
106
|
action: EventAction.Knowledgebase;
|
|
107
|
+
flowThreadId: string;
|
|
108
|
+
flowId: string;
|
|
109
|
+
flowNodeId: string;
|
|
99
110
|
knowledgebaseInferenceId: string;
|
|
100
111
|
knowledgebaseFailReason?: KnowledgebaseFailReason;
|
|
101
112
|
knowledgebaseSourcesIds: string[];
|
package/lib/cjs/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;AACvB,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AAED,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,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,oCAAqB,CAAA;IACrB,+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;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;AACvB,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AAED,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,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,oCAAqB,CAAA;IACrB,+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;AA6GD,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAGlC;AA6BD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B"}
|
|
@@ -5,5 +5,8 @@ export declare class HtEventIntentSmart extends HtEvent {
|
|
|
5
5
|
nlu_intent_smart_num_used: number;
|
|
6
6
|
nlu_intent_smart_message_id: string;
|
|
7
7
|
user_input: string;
|
|
8
|
+
flow_thread_id: string;
|
|
9
|
+
flow_id: string;
|
|
10
|
+
flow_node_id: string;
|
|
8
11
|
constructor(event: EventIntentSmart, requestData: RequestData);
|
|
9
12
|
}
|
|
@@ -9,6 +9,9 @@ export class HtEventIntentSmart extends HtEvent {
|
|
|
9
9
|
this.nlu_intent_smart_num_used = event.nluIntentSmartNumUsed;
|
|
10
10
|
this.nlu_intent_smart_message_id = event.nluIntentSmartMessageId;
|
|
11
11
|
this.user_input = event.userInput;
|
|
12
|
+
this.flow_thread_id = event.flowThreadId;
|
|
13
|
+
this.flow_id = event.flowId;
|
|
14
|
+
this.flow_node_id = event.flowNodeId;
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
17
|
//# sourceMappingURL=ht-event-intent-smart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ht-event-intent-smart.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-intent-smart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoB,SAAS,EAAe,MAAM,UAAU,CAAA;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,MAAM,OAAO,kBAAmB,SAAQ,OAAO;
|
|
1
|
+
{"version":3,"file":"ht-event-intent-smart.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-intent-smart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAoB,SAAS,EAAe,MAAM,UAAU,CAAA;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,MAAM,OAAO,kBAAmB,SAAQ,OAAO;IAS7C,YAAY,KAAuB,EAAE,WAAwB;QAC3D,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,WAAW,CAAA;QACrC,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC,mBAAmB,CAAA;QACvD,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,qBAAqB,CAAA;QAC5D,IAAI,CAAC,2BAA2B,GAAG,KAAK,CAAC,uBAAuB,CAAA;QAChE,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,YAAY,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,UAAU,CAAA;IACtC,CAAC;CACF"}
|
|
@@ -6,5 +6,8 @@ export declare class HtEventIntent extends HtEvent {
|
|
|
6
6
|
nlu_intent_threshold: number;
|
|
7
7
|
nlu_intent_message_id: string;
|
|
8
8
|
user_input: string;
|
|
9
|
+
flow_thread_id: string;
|
|
10
|
+
flow_id: string;
|
|
11
|
+
flow_node_id: string;
|
|
9
12
|
constructor(event: EventIntent, requestData: RequestData);
|
|
10
13
|
}
|
|
@@ -10,6 +10,9 @@ export class HtEventIntent extends HtEvent {
|
|
|
10
10
|
this.nlu_intent_threshold = event.nluIntentThreshold;
|
|
11
11
|
this.nlu_intent_message_id = event.nluIntentMessageId;
|
|
12
12
|
this.user_input = event.userInput;
|
|
13
|
+
this.flow_thread_id = event.flowThreadId;
|
|
14
|
+
this.flow_id = event.flowId;
|
|
15
|
+
this.flow_node_id = event.flowNodeId;
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
18
|
//# sourceMappingURL=ht-event-intent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ht-event-intent.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,SAAS,EAAe,MAAM,UAAU,CAAA;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,MAAM,OAAO,aAAc,SAAQ,OAAO;
|
|
1
|
+
{"version":3,"file":"ht-event-intent.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,SAAS,EAAe,MAAM,UAAU,CAAA;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,MAAM,OAAO,aAAc,SAAQ,OAAO;IAUxC,YAAY,KAAkB,EAAE,WAAwB;QACtD,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,MAAM,CAAA;QAChC,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAA;QAC5C,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC,mBAAmB,CAAA;QACtD,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC,kBAAkB,CAAA;QACpD,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC,kBAAkB,CAAA;QACrD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,YAAY,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,UAAU,CAAA;IACtC,CAAC;CACF"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { EventKeyword, RequestData } from '../types';
|
|
2
2
|
import { HtEvent } from './ht-event';
|
|
3
3
|
export declare class HtEventKeyword extends HtEvent {
|
|
4
|
-
nlu_keyword_id: string;
|
|
5
4
|
nlu_keyword_name: string;
|
|
6
5
|
nlu_keyword_is_regex: boolean;
|
|
7
6
|
nlu_keyword_message_id: string;
|
|
8
7
|
user_input: string;
|
|
8
|
+
flow_thread_id: string;
|
|
9
|
+
flow_id: string;
|
|
10
|
+
flow_node_id: string;
|
|
9
11
|
constructor(event: EventKeyword, requestData: RequestData);
|
|
10
12
|
}
|
|
@@ -5,11 +5,13 @@ export class HtEventKeyword extends HtEvent {
|
|
|
5
5
|
super(event, requestData);
|
|
6
6
|
this.type = EventType.BotEvent;
|
|
7
7
|
this.action = EventAction.Keyword;
|
|
8
|
-
this.nlu_keyword_id = event.nluKeywordId;
|
|
9
8
|
this.nlu_keyword_name = event.nluKeywordName;
|
|
10
9
|
this.nlu_keyword_is_regex = event.nluKeywordIsRegex || false;
|
|
11
10
|
this.nlu_keyword_message_id = event.nluKeywordMessageId;
|
|
12
11
|
this.user_input = event.userInput;
|
|
12
|
+
this.flow_thread_id = event.flowThreadId;
|
|
13
|
+
this.flow_id = event.flowId;
|
|
14
|
+
this.flow_node_id = event.flowNodeId;
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
17
|
//# sourceMappingURL=ht-event-keyword.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ht-event-keyword.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-keyword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAgB,SAAS,EAAe,MAAM,UAAU,CAAA;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,MAAM,OAAO,cAAe,SAAQ,OAAO;
|
|
1
|
+
{"version":3,"file":"ht-event-keyword.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-keyword.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAgB,SAAS,EAAe,MAAM,UAAU,CAAA;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,MAAM,OAAO,cAAe,SAAQ,OAAO;IASzC,YAAY,KAAmB,EAAE,WAAwB;QACvD,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,OAAO,CAAA;QACjC,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAA;QAC5C,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,IAAI,KAAK,CAAA;QAC5D,IAAI,CAAC,sBAAsB,GAAG,KAAK,CAAC,mBAAmB,CAAA;QACvD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,YAAY,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,UAAU,CAAA;IACtC,CAAC;CACF"}
|
|
@@ -7,5 +7,8 @@ export declare class HtEventKnowledgeBase extends HtEvent {
|
|
|
7
7
|
knowledgebase_chunks_ids: string[];
|
|
8
8
|
knowledgebase_message_id: string;
|
|
9
9
|
user_input: string;
|
|
10
|
+
flow_thread_id: string;
|
|
11
|
+
flow_id: string;
|
|
12
|
+
flow_node_id: string;
|
|
10
13
|
constructor(event: EventKnowledgeBase, requestData: RequestData);
|
|
11
14
|
}
|
|
@@ -11,6 +11,9 @@ export class HtEventKnowledgeBase extends HtEvent {
|
|
|
11
11
|
this.knowledgebase_chunks_ids = event.knowledgebaseChunksIds;
|
|
12
12
|
this.knowledgebase_message_id = event.knowledgebaseMessageId;
|
|
13
13
|
this.user_input = event.userInput;
|
|
14
|
+
this.flow_thread_id = event.flowThreadId;
|
|
15
|
+
this.flow_id = event.flowId;
|
|
16
|
+
this.flow_node_id = event.flowNodeId;
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=ht-event-knowledge-base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ht-event-knowledge-base.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-knowledge-base.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,SAAS,GAEV,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,MAAM,OAAO,oBAAqB,SAAQ,OAAO;
|
|
1
|
+
{"version":3,"file":"ht-event-knowledge-base.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-knowledge-base.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,SAAS,GAEV,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,MAAM,OAAO,oBAAqB,SAAQ,OAAO;IAW/C,YAAY,KAAyB,EAAE,WAAwB;QAC7D,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;QACzB,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,aAAa,CAAA;QACvC,IAAI,CAAC,0BAA0B,GAAG,KAAK,CAAC,wBAAwB,CAAA;QAChE,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,uBAAuB,CAAA;QAC9D,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,uBAAuB,CAAA;QAC9D,IAAI,CAAC,wBAAwB,GAAG,KAAK,CAAC,sBAAsB,CAAA;QAC5D,IAAI,CAAC,wBAAwB,GAAG,KAAK,CAAC,sBAAsB,CAAA;QAC5D,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,CAAA;QACjC,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,YAAY,CAAA;QACxC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAA;QAC3B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,UAAU,CAAA;IACtC,CAAC;CACF"}
|
package/lib/esm/types.d.ts
CHANGED
|
@@ -73,6 +73,9 @@ export interface EventHandoffOption extends HtBaseEventProps {
|
|
|
73
73
|
}
|
|
74
74
|
export interface EventIntent extends HtBaseEventProps {
|
|
75
75
|
action: EventAction.Intent;
|
|
76
|
+
flowThreadId: string;
|
|
77
|
+
flowId: string;
|
|
78
|
+
flowNodeId: string;
|
|
76
79
|
nluIntentLabel: string;
|
|
77
80
|
nluIntentConfidence: number;
|
|
78
81
|
nluIntentThreshold: number;
|
|
@@ -81,7 +84,9 @@ export interface EventIntent extends HtBaseEventProps {
|
|
|
81
84
|
}
|
|
82
85
|
export interface EventKeyword extends HtBaseEventProps {
|
|
83
86
|
action: EventAction.Keyword;
|
|
84
|
-
|
|
87
|
+
flowThreadId: string;
|
|
88
|
+
flowId: string;
|
|
89
|
+
flowNodeId: string;
|
|
85
90
|
nluKeywordName: string;
|
|
86
91
|
nluKeywordIsRegex?: boolean;
|
|
87
92
|
nluKeywordMessageId: string;
|
|
@@ -89,6 +94,9 @@ export interface EventKeyword extends HtBaseEventProps {
|
|
|
89
94
|
}
|
|
90
95
|
export interface EventIntentSmart extends HtBaseEventProps {
|
|
91
96
|
action: EventAction.IntentSmart;
|
|
97
|
+
flowThreadId: string;
|
|
98
|
+
flowId: string;
|
|
99
|
+
flowNodeId: string;
|
|
92
100
|
nluIntentSmartTitle: string;
|
|
93
101
|
nluIntentSmartNumUsed: number;
|
|
94
102
|
nluIntentSmartMessageId: string;
|
|
@@ -96,6 +104,9 @@ export interface EventIntentSmart extends HtBaseEventProps {
|
|
|
96
104
|
}
|
|
97
105
|
export interface EventKnowledgeBase extends HtBaseEventProps {
|
|
98
106
|
action: EventAction.Knowledgebase;
|
|
107
|
+
flowThreadId: string;
|
|
108
|
+
flowId: string;
|
|
109
|
+
flowNodeId: string;
|
|
99
110
|
knowledgebaseInferenceId: string;
|
|
100
111
|
knowledgebaseFailReason?: KnowledgebaseFailReason;
|
|
101
112
|
knowledgebaseSourcesIds: string[];
|
package/lib/esm/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;AACvB,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED,MAAM,CAAN,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,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,oCAAqB,CAAA;IACrB,+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;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;AACvB,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED,MAAM,CAAN,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACrB,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,oCAAqB,CAAA;IACrB,+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;AA6GD,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AA6BD,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/plugin-hubtype-analytics",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "Plugin for tracking in the Hubtype backend to see the results in the Hubtype Dashbord",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -13,15 +13,19 @@
|
|
|
13
13
|
"lint_core": "../../node_modules/.bin/eslint_d --cache --quiet 'src/**/*.ts*'"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@babel/runtime": "^7.
|
|
17
|
-
"@botonic/core": "^0.
|
|
18
|
-
"axios": "^1.7.
|
|
16
|
+
"@babel/runtime": "^7.26.0",
|
|
17
|
+
"@botonic/core": "^0.32.0",
|
|
18
|
+
"axios": "^1.7.9"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "^20.11.17",
|
|
22
22
|
"@types/react": "^16.14.0",
|
|
23
23
|
"typescript": "^4.9.5"
|
|
24
24
|
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=20.0.0",
|
|
27
|
+
"npm": ">=10.0.0"
|
|
28
|
+
},
|
|
25
29
|
"files": [
|
|
26
30
|
"lib/**",
|
|
27
31
|
"src/**",
|
|
@@ -6,6 +6,9 @@ export class HtEventIntentSmart extends HtEvent {
|
|
|
6
6
|
nlu_intent_smart_num_used: number
|
|
7
7
|
nlu_intent_smart_message_id: string
|
|
8
8
|
user_input: string
|
|
9
|
+
flow_thread_id: string
|
|
10
|
+
flow_id: string
|
|
11
|
+
flow_node_id: string
|
|
9
12
|
|
|
10
13
|
constructor(event: EventIntentSmart, requestData: RequestData) {
|
|
11
14
|
super(event, requestData)
|
|
@@ -15,5 +18,8 @@ export class HtEventIntentSmart extends HtEvent {
|
|
|
15
18
|
this.nlu_intent_smart_num_used = event.nluIntentSmartNumUsed
|
|
16
19
|
this.nlu_intent_smart_message_id = event.nluIntentSmartMessageId
|
|
17
20
|
this.user_input = event.userInput
|
|
21
|
+
this.flow_thread_id = event.flowThreadId
|
|
22
|
+
this.flow_id = event.flowId
|
|
23
|
+
this.flow_node_id = event.flowNodeId
|
|
18
24
|
}
|
|
19
25
|
}
|
|
@@ -7,6 +7,9 @@ export class HtEventIntent extends HtEvent {
|
|
|
7
7
|
nlu_intent_threshold: number
|
|
8
8
|
nlu_intent_message_id: string
|
|
9
9
|
user_input: string
|
|
10
|
+
flow_thread_id: string
|
|
11
|
+
flow_id: string
|
|
12
|
+
flow_node_id: string
|
|
10
13
|
|
|
11
14
|
constructor(event: EventIntent, requestData: RequestData) {
|
|
12
15
|
super(event, requestData)
|
|
@@ -17,5 +20,8 @@ export class HtEventIntent extends HtEvent {
|
|
|
17
20
|
this.nlu_intent_threshold = event.nluIntentThreshold
|
|
18
21
|
this.nlu_intent_message_id = event.nluIntentMessageId
|
|
19
22
|
this.user_input = event.userInput
|
|
23
|
+
this.flow_thread_id = event.flowThreadId
|
|
24
|
+
this.flow_id = event.flowId
|
|
25
|
+
this.flow_node_id = event.flowNodeId
|
|
20
26
|
}
|
|
21
27
|
}
|
|
@@ -2,20 +2,24 @@ import { EventAction, EventKeyword, EventType, RequestData } from '../types'
|
|
|
2
2
|
import { HtEvent } from './ht-event'
|
|
3
3
|
|
|
4
4
|
export class HtEventKeyword extends HtEvent {
|
|
5
|
-
nlu_keyword_id: string
|
|
6
5
|
nlu_keyword_name: string
|
|
7
6
|
nlu_keyword_is_regex: boolean
|
|
8
7
|
nlu_keyword_message_id: string
|
|
9
8
|
user_input: string
|
|
9
|
+
flow_thread_id: string
|
|
10
|
+
flow_id: string
|
|
11
|
+
flow_node_id: string
|
|
10
12
|
|
|
11
13
|
constructor(event: EventKeyword, requestData: RequestData) {
|
|
12
14
|
super(event, requestData)
|
|
13
15
|
this.type = EventType.BotEvent
|
|
14
16
|
this.action = EventAction.Keyword
|
|
15
|
-
this.nlu_keyword_id = event.nluKeywordId
|
|
16
17
|
this.nlu_keyword_name = event.nluKeywordName
|
|
17
18
|
this.nlu_keyword_is_regex = event.nluKeywordIsRegex || false
|
|
18
19
|
this.nlu_keyword_message_id = event.nluKeywordMessageId
|
|
19
20
|
this.user_input = event.userInput
|
|
21
|
+
this.flow_thread_id = event.flowThreadId
|
|
22
|
+
this.flow_id = event.flowId
|
|
23
|
+
this.flow_node_id = event.flowNodeId
|
|
20
24
|
}
|
|
21
25
|
}
|
|
@@ -13,6 +13,9 @@ export class HtEventKnowledgeBase extends HtEvent {
|
|
|
13
13
|
knowledgebase_chunks_ids: string[]
|
|
14
14
|
knowledgebase_message_id: string
|
|
15
15
|
user_input: string
|
|
16
|
+
flow_thread_id: string
|
|
17
|
+
flow_id: string
|
|
18
|
+
flow_node_id: string
|
|
16
19
|
|
|
17
20
|
constructor(event: EventKnowledgeBase, requestData: RequestData) {
|
|
18
21
|
super(event, requestData)
|
|
@@ -24,5 +27,8 @@ export class HtEventKnowledgeBase extends HtEvent {
|
|
|
24
27
|
this.knowledgebase_chunks_ids = event.knowledgebaseChunksIds
|
|
25
28
|
this.knowledgebase_message_id = event.knowledgebaseMessageId
|
|
26
29
|
this.user_input = event.userInput
|
|
30
|
+
this.flow_thread_id = event.flowThreadId
|
|
31
|
+
this.flow_id = event.flowId
|
|
32
|
+
this.flow_node_id = event.flowNodeId
|
|
27
33
|
}
|
|
28
34
|
}
|
package/src/types.ts
CHANGED
|
@@ -85,6 +85,9 @@ export interface EventHandoffOption extends HtBaseEventProps {
|
|
|
85
85
|
|
|
86
86
|
export interface EventIntent extends HtBaseEventProps {
|
|
87
87
|
action: EventAction.Intent
|
|
88
|
+
flowThreadId: string
|
|
89
|
+
flowId: string
|
|
90
|
+
flowNodeId: string
|
|
88
91
|
nluIntentLabel: string
|
|
89
92
|
nluIntentConfidence: number
|
|
90
93
|
nluIntentThreshold: number
|
|
@@ -94,7 +97,9 @@ export interface EventIntent extends HtBaseEventProps {
|
|
|
94
97
|
|
|
95
98
|
export interface EventKeyword extends HtBaseEventProps {
|
|
96
99
|
action: EventAction.Keyword
|
|
97
|
-
|
|
100
|
+
flowThreadId: string
|
|
101
|
+
flowId: string
|
|
102
|
+
flowNodeId: string
|
|
98
103
|
nluKeywordName: string
|
|
99
104
|
nluKeywordIsRegex?: boolean
|
|
100
105
|
nluKeywordMessageId: string
|
|
@@ -103,6 +108,9 @@ export interface EventKeyword extends HtBaseEventProps {
|
|
|
103
108
|
|
|
104
109
|
export interface EventIntentSmart extends HtBaseEventProps {
|
|
105
110
|
action: EventAction.IntentSmart
|
|
111
|
+
flowThreadId: string
|
|
112
|
+
flowId: string
|
|
113
|
+
flowNodeId: string
|
|
106
114
|
nluIntentSmartTitle: string
|
|
107
115
|
nluIntentSmartNumUsed: number
|
|
108
116
|
nluIntentSmartMessageId: string
|
|
@@ -111,6 +119,9 @@ export interface EventIntentSmart extends HtBaseEventProps {
|
|
|
111
119
|
|
|
112
120
|
export interface EventKnowledgeBase extends HtBaseEventProps {
|
|
113
121
|
action: EventAction.Knowledgebase
|
|
122
|
+
flowThreadId: string
|
|
123
|
+
flowId: string
|
|
124
|
+
flowNodeId: string
|
|
114
125
|
knowledgebaseInferenceId: string
|
|
115
126
|
knowledgebaseFailReason?: KnowledgebaseFailReason
|
|
116
127
|
knowledgebaseSourcesIds: string[]
|