@botonic/plugin-hubtype-analytics 0.23.1 → 0.24.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/lib/cjs/event-models/ht-event-bot-knowledge-base.d.ts +6 -0
- package/lib/cjs/event-models/{ht-event-bot-knowladge-base.js → ht-event-bot-knowledge-base.js} +1 -1
- package/lib/cjs/event-models/{ht-event-bot-knowladge-base.js.map → ht-event-bot-knowledge-base.js.map} +1 -1
- package/lib/cjs/types.d.ts +6 -6
- package/lib/cjs/types.js +1 -1
- package/lib/cjs/utils.js +3 -3
- package/lib/esm/event-models/ht-event-bot-knowledge-base.d.ts +6 -0
- package/lib/esm/event-models/{ht-event-bot-knowladge-base.js → ht-event-bot-knowledge-base.js} +1 -1
- package/lib/esm/event-models/{ht-event-bot-knowladge-base.js.map → ht-event-bot-knowledge-base.js.map} +1 -1
- package/lib/esm/types.d.ts +6 -6
- package/lib/esm/types.js +1 -1
- package/lib/esm/utils.js +2 -2
- package/package.json +4 -4
- package/src/event-models/{ht-event-bot-knowladge-base.ts → ht-event-bot-knowledge-base.ts} +4 -4
- package/src/types.ts +6 -6
- package/src/utils.ts +2 -2
- package/lib/cjs/event-models/ht-event-bot-knowladge-base.d.ts +0 -6
- package/lib/esm/event-models/ht-event-bot-knowladge-base.d.ts +0 -6
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseEventData, EventBotAiKnowledgeBase, EventDataBotAiKnowledgeBase, RequestData } from '../types';
|
|
2
|
+
import { HtEvent } from './ht-event';
|
|
3
|
+
export declare class HtEventBotAiKnowledgeBase extends HtEvent {
|
|
4
|
+
event_data: BaseEventData & EventDataBotAiKnowledgeBase;
|
|
5
|
+
constructor(event: EventBotAiKnowledgeBase, requestData: RequestData);
|
|
6
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ht-event-bot-
|
|
1
|
+
{"version":3,"file":"ht-event-bot-knowledge-base.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-bot-knowledge-base.ts"],"names":[],"mappings":";;;AAMA,yCAAoC;AAEpC,MAAa,yBAA0B,SAAQ,kBAAO;IAGpD,YAAY,KAA8B,EAAE,WAAwB;QAClE,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;QACzB,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAA;QAChD,IAAI,CAAC,UAAU,CAAC,oBAAoB,GAAG,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAA;IAC9E,CAAC;CACF;AARD,8DAQC"}
|
package/lib/cjs/types.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare enum EventName {
|
|
|
13
13
|
botStart = "bot_start",
|
|
14
14
|
botOpen = "bot_open",
|
|
15
15
|
botAiModel = "bot_ai_model",
|
|
16
|
-
|
|
16
|
+
botAiKnowledgeBase = "bot_ai_knowledge_base",
|
|
17
17
|
botKeywordsModel = "bot_keywords_model",
|
|
18
18
|
fallback = "fallback",
|
|
19
19
|
handoffOption = "handoff_option",
|
|
@@ -87,11 +87,11 @@ export interface EventDataBotAiModel {
|
|
|
87
87
|
confidence: number;
|
|
88
88
|
confidence_successful: boolean;
|
|
89
89
|
}
|
|
90
|
-
export interface
|
|
91
|
-
event_type: EventName.
|
|
92
|
-
event_data:
|
|
90
|
+
export interface EventBotAiKnowledgeBase {
|
|
91
|
+
event_type: EventName.botAiKnowledgeBase;
|
|
92
|
+
event_data: EventDataBotAiKnowledgeBase;
|
|
93
93
|
}
|
|
94
|
-
export interface
|
|
94
|
+
export interface EventDataBotAiKnowledgeBase {
|
|
95
95
|
answer: string;
|
|
96
96
|
knowledge_source_ids: string[];
|
|
97
97
|
}
|
|
@@ -122,7 +122,7 @@ export interface EventDataHandoff {
|
|
|
122
122
|
available_agents: boolean;
|
|
123
123
|
threshold_reached: boolean;
|
|
124
124
|
}
|
|
125
|
-
export type HtEventProps = EventAgentRating | EventChannelRating | EventFaqUseful | EventBotRating | EventBotFaq | EventBotStart | EventBotOpen | EventBotAiModel |
|
|
125
|
+
export type HtEventProps = EventAgentRating | EventChannelRating | EventFaqUseful | EventBotRating | EventBotFaq | EventBotStart | EventBotOpen | EventBotAiModel | EventBotAiKnowledgeBase | EventBotKeywordModel | EventFallback | EventHandoffOption | EventHandoffSuccess | EventHandoffFail;
|
|
126
126
|
export interface RequestData {
|
|
127
127
|
language: string;
|
|
128
128
|
country: string;
|
package/lib/cjs/types.js
CHANGED
|
@@ -11,7 +11,7 @@ var EventName;
|
|
|
11
11
|
EventName["botStart"] = "bot_start";
|
|
12
12
|
EventName["botOpen"] = "bot_open";
|
|
13
13
|
EventName["botAiModel"] = "bot_ai_model";
|
|
14
|
-
EventName["
|
|
14
|
+
EventName["botAiKnowledgeBase"] = "bot_ai_knowledge_base";
|
|
15
15
|
EventName["botKeywordsModel"] = "bot_keywords_model";
|
|
16
16
|
EventName["fallback"] = "fallback";
|
|
17
17
|
EventName["handoffOption"] = "handoff_option";
|
package/lib/cjs/utils.js
CHANGED
|
@@ -6,7 +6,7 @@ const ht_event_agent_rating_1 = require("./event-models/ht-event-agent-rating");
|
|
|
6
6
|
const ht_event_bot_ai_model_1 = require("./event-models/ht-event-bot-ai-model");
|
|
7
7
|
const ht_event_bot_faq_1 = require("./event-models/ht-event-bot-faq");
|
|
8
8
|
const ht_event_bot_keyword_model_1 = require("./event-models/ht-event-bot-keyword-model");
|
|
9
|
-
const
|
|
9
|
+
const ht_event_bot_knowledge_base_1 = require("./event-models/ht-event-bot-knowledge-base");
|
|
10
10
|
const ht_event_bot_rating_1 = require("./event-models/ht-event-bot-rating");
|
|
11
11
|
const ht_event_channel_rating_1 = require("./event-models/ht-event-channel-rating");
|
|
12
12
|
const ht_event_faq_useful_1 = require("./event-models/ht-event-faq-useful");
|
|
@@ -27,8 +27,8 @@ function createHtEvent(requestData, htEventProps) {
|
|
|
27
27
|
return new ht_event_bot_faq_1.HtEventBotFaq(htEventProps, requestData);
|
|
28
28
|
case types_1.EventName.botAiModel:
|
|
29
29
|
return new ht_event_bot_ai_model_1.HtEventBotAiModel(htEventProps, requestData);
|
|
30
|
-
case types_1.EventName.
|
|
31
|
-
return new
|
|
30
|
+
case types_1.EventName.botAiKnowledgeBase:
|
|
31
|
+
return new ht_event_bot_knowledge_base_1.HtEventBotAiKnowledgeBase(htEventProps, requestData);
|
|
32
32
|
case types_1.EventName.botKeywordsModel:
|
|
33
33
|
return new ht_event_bot_keyword_model_1.HtEventBotKeywordModel(htEventProps, requestData);
|
|
34
34
|
case types_1.EventName.handoffSuccess:
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseEventData, EventBotAiKnowledgeBase, EventDataBotAiKnowledgeBase, RequestData } from '../types';
|
|
2
|
+
import { HtEvent } from './ht-event';
|
|
3
|
+
export declare class HtEventBotAiKnowledgeBase extends HtEvent {
|
|
4
|
+
event_data: BaseEventData & EventDataBotAiKnowledgeBase;
|
|
5
|
+
constructor(event: EventBotAiKnowledgeBase, requestData: RequestData);
|
|
6
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ht-event-bot-
|
|
1
|
+
{"version":3,"file":"ht-event-bot-knowledge-base.js","sourceRoot":"","sources":["../../../src/event-models/ht-event-bot-knowledge-base.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,MAAM,OAAO,yBAA0B,SAAQ,OAAO;IAGpD,YAAY,KAA8B,EAAE,WAAwB;QAClE,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,CAAA;QACzB,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAA;QAChD,IAAI,CAAC,UAAU,CAAC,oBAAoB,GAAG,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAA;IAC9E,CAAC;CACF"}
|
package/lib/esm/types.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare enum EventName {
|
|
|
13
13
|
botStart = "bot_start",
|
|
14
14
|
botOpen = "bot_open",
|
|
15
15
|
botAiModel = "bot_ai_model",
|
|
16
|
-
|
|
16
|
+
botAiKnowledgeBase = "bot_ai_knowledge_base",
|
|
17
17
|
botKeywordsModel = "bot_keywords_model",
|
|
18
18
|
fallback = "fallback",
|
|
19
19
|
handoffOption = "handoff_option",
|
|
@@ -87,11 +87,11 @@ export interface EventDataBotAiModel {
|
|
|
87
87
|
confidence: number;
|
|
88
88
|
confidence_successful: boolean;
|
|
89
89
|
}
|
|
90
|
-
export interface
|
|
91
|
-
event_type: EventName.
|
|
92
|
-
event_data:
|
|
90
|
+
export interface EventBotAiKnowledgeBase {
|
|
91
|
+
event_type: EventName.botAiKnowledgeBase;
|
|
92
|
+
event_data: EventDataBotAiKnowledgeBase;
|
|
93
93
|
}
|
|
94
|
-
export interface
|
|
94
|
+
export interface EventDataBotAiKnowledgeBase {
|
|
95
95
|
answer: string;
|
|
96
96
|
knowledge_source_ids: string[];
|
|
97
97
|
}
|
|
@@ -122,7 +122,7 @@ export interface EventDataHandoff {
|
|
|
122
122
|
available_agents: boolean;
|
|
123
123
|
threshold_reached: boolean;
|
|
124
124
|
}
|
|
125
|
-
export type HtEventProps = EventAgentRating | EventChannelRating | EventFaqUseful | EventBotRating | EventBotFaq | EventBotStart | EventBotOpen | EventBotAiModel |
|
|
125
|
+
export type HtEventProps = EventAgentRating | EventChannelRating | EventFaqUseful | EventBotRating | EventBotFaq | EventBotStart | EventBotOpen | EventBotAiModel | EventBotAiKnowledgeBase | EventBotKeywordModel | EventFallback | EventHandoffOption | EventHandoffSuccess | EventHandoffFail;
|
|
126
126
|
export interface RequestData {
|
|
127
127
|
language: string;
|
|
128
128
|
country: string;
|
package/lib/esm/types.js
CHANGED
|
@@ -8,7 +8,7 @@ export var EventName;
|
|
|
8
8
|
EventName["botStart"] = "bot_start";
|
|
9
9
|
EventName["botOpen"] = "bot_open";
|
|
10
10
|
EventName["botAiModel"] = "bot_ai_model";
|
|
11
|
-
EventName["
|
|
11
|
+
EventName["botAiKnowledgeBase"] = "bot_ai_knowledge_base";
|
|
12
12
|
EventName["botKeywordsModel"] = "bot_keywords_model";
|
|
13
13
|
EventName["fallback"] = "fallback";
|
|
14
14
|
EventName["handoffOption"] = "handoff_option";
|
package/lib/esm/utils.js
CHANGED
|
@@ -3,7 +3,7 @@ import { HtEventAgentRating } from './event-models/ht-event-agent-rating';
|
|
|
3
3
|
import { HtEventBotAiModel } from './event-models/ht-event-bot-ai-model';
|
|
4
4
|
import { HtEventBotFaq } from './event-models/ht-event-bot-faq';
|
|
5
5
|
import { HtEventBotKeywordModel } from './event-models/ht-event-bot-keyword-model';
|
|
6
|
-
import { HtEventBotAiKnowledgeBase } from './event-models/ht-event-bot-
|
|
6
|
+
import { HtEventBotAiKnowledgeBase } from './event-models/ht-event-bot-knowledge-base';
|
|
7
7
|
import { HtEventBotRating } from './event-models/ht-event-bot-rating';
|
|
8
8
|
import { HtEventChannelRating } from './event-models/ht-event-channel-rating';
|
|
9
9
|
import { HtEventFaqUseful } from './event-models/ht-event-faq-useful';
|
|
@@ -24,7 +24,7 @@ export function createHtEvent(requestData, htEventProps) {
|
|
|
24
24
|
return new HtEventBotFaq(htEventProps, requestData);
|
|
25
25
|
case EventName.botAiModel:
|
|
26
26
|
return new HtEventBotAiModel(htEventProps, requestData);
|
|
27
|
-
case EventName.
|
|
27
|
+
case EventName.botAiKnowledgeBase:
|
|
28
28
|
return new HtEventBotAiKnowledgeBase(htEventProps, requestData);
|
|
29
29
|
case EventName.botKeywordsModel:
|
|
30
30
|
return new HtEventBotKeywordModel(htEventProps, requestData);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botonic/plugin-hubtype-analytics",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.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",
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
11
|
"prepublishOnly": "rm -rf lib && npm run build",
|
|
12
12
|
"lint": "npm run lint_core -- --fix",
|
|
13
|
-
"lint_ci": "npm run lint_core
|
|
13
|
+
"lint_ci": "npm run lint_core",
|
|
14
14
|
"lint_core": "../../node_modules/.bin/eslint_d --cache --quiet 'src/**/*.ts*'"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.21.0",
|
|
18
|
-
"@botonic/core": "0.23.
|
|
19
|
-
"axios": "^1.
|
|
18
|
+
"@botonic/core": "0.23.2",
|
|
19
|
+
"axios": "^1.6.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/node": "^16.11.7",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseEventData,
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
EventBotAiKnowledgeBase,
|
|
4
|
+
EventDataBotAiKnowledgeBase,
|
|
5
5
|
RequestData,
|
|
6
6
|
} from '../types'
|
|
7
7
|
import { HtEvent } from './ht-event'
|
|
8
8
|
|
|
9
9
|
export class HtEventBotAiKnowledgeBase extends HtEvent {
|
|
10
|
-
event_data: BaseEventData &
|
|
10
|
+
event_data: BaseEventData & EventDataBotAiKnowledgeBase
|
|
11
11
|
|
|
12
|
-
constructor(event:
|
|
12
|
+
constructor(event: EventBotAiKnowledgeBase, requestData: RequestData) {
|
|
13
13
|
super(event, requestData)
|
|
14
14
|
this.event_data.answer = event.event_data.answer
|
|
15
15
|
this.event_data.knowledge_source_ids = event.event_data.knowledge_source_ids
|
package/src/types.ts
CHANGED
|
@@ -15,7 +15,7 @@ export enum EventName {
|
|
|
15
15
|
botStart = 'bot_start',
|
|
16
16
|
botOpen = 'bot_open',
|
|
17
17
|
botAiModel = 'bot_ai_model',
|
|
18
|
-
|
|
18
|
+
botAiKnowledgeBase = 'bot_ai_knowledge_base',
|
|
19
19
|
botKeywordsModel = 'bot_keywords_model',
|
|
20
20
|
fallback = 'fallback',
|
|
21
21
|
handoffOption = 'handoff_option',
|
|
@@ -102,12 +102,12 @@ export interface EventDataBotAiModel {
|
|
|
102
102
|
confidence_successful: boolean
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
export interface
|
|
106
|
-
event_type: EventName.
|
|
107
|
-
event_data:
|
|
105
|
+
export interface EventBotAiKnowledgeBase {
|
|
106
|
+
event_type: EventName.botAiKnowledgeBase
|
|
107
|
+
event_data: EventDataBotAiKnowledgeBase
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
export interface
|
|
110
|
+
export interface EventDataBotAiKnowledgeBase {
|
|
111
111
|
answer: string
|
|
112
112
|
knowledge_source_ids: string[]
|
|
113
113
|
}
|
|
@@ -154,7 +154,7 @@ export type HtEventProps =
|
|
|
154
154
|
| EventBotStart
|
|
155
155
|
| EventBotOpen
|
|
156
156
|
| EventBotAiModel
|
|
157
|
-
|
|
|
157
|
+
| EventBotAiKnowledgeBase
|
|
158
158
|
| EventBotKeywordModel
|
|
159
159
|
| EventFallback
|
|
160
160
|
| EventHandoffOption
|
package/src/utils.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { HtEventAgentRating } from './event-models/ht-event-agent-rating'
|
|
|
3
3
|
import { HtEventBotAiModel } from './event-models/ht-event-bot-ai-model'
|
|
4
4
|
import { HtEventBotFaq } from './event-models/ht-event-bot-faq'
|
|
5
5
|
import { HtEventBotKeywordModel } from './event-models/ht-event-bot-keyword-model'
|
|
6
|
-
import { HtEventBotAiKnowledgeBase } from './event-models/ht-event-bot-
|
|
6
|
+
import { HtEventBotAiKnowledgeBase } from './event-models/ht-event-bot-knowledge-base'
|
|
7
7
|
import { HtEventBotRating } from './event-models/ht-event-bot-rating'
|
|
8
8
|
import { HtEventChannelRating } from './event-models/ht-event-channel-rating'
|
|
9
9
|
import { HtEventFaqUseful } from './event-models/ht-event-faq-useful'
|
|
@@ -34,7 +34,7 @@ export function createHtEvent(
|
|
|
34
34
|
case EventName.botAiModel:
|
|
35
35
|
return new HtEventBotAiModel(htEventProps, requestData)
|
|
36
36
|
|
|
37
|
-
case EventName.
|
|
37
|
+
case EventName.botAiKnowledgeBase:
|
|
38
38
|
return new HtEventBotAiKnowledgeBase(htEventProps, requestData)
|
|
39
39
|
|
|
40
40
|
case EventName.botKeywordsModel:
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { BaseEventData, EventBotAiKnowladgeBase, EventDataBotAiKnowladgeBase, RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
3
|
-
export declare class HtEventBotAiKnowledgeBase extends HtEvent {
|
|
4
|
-
event_data: BaseEventData & EventDataBotAiKnowladgeBase;
|
|
5
|
-
constructor(event: EventBotAiKnowladgeBase, requestData: RequestData);
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { BaseEventData, EventBotAiKnowladgeBase, EventDataBotAiKnowladgeBase, RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
3
|
-
export declare class HtEventBotAiKnowledgeBase extends HtEvent {
|
|
4
|
-
event_data: BaseEventData & EventDataBotAiKnowladgeBase;
|
|
5
|
-
constructor(event: EventBotAiKnowladgeBase, requestData: RequestData);
|
|
6
|
-
}
|