@botonic/core 0.54.0 → 0.55.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.
@@ -5,7 +5,6 @@ export declare enum EventAction {
5
5
  FeedbackCase = "feedback_case",
6
6
  FeedbackMessage = "feedback_message",
7
7
  FeedbackConversation = "feedback_conversation",
8
- FeedbackKnowledgebase = "feedback_knowledgebase",
9
8
  FeedbackWebview = "feedback_webview",
10
9
  FlowNode = "flow_node",
11
10
  ConditionalCountry = "conditional_country",
@@ -19,7 +18,6 @@ export declare enum EventAction {
19
18
  HandoffFail = "handoff_fail",
20
19
  Keyword = "nlu_keyword",
21
20
  IntentSmart = "nlu_intent_smart",
22
- Knowledgebase = "knowledgebase",
23
21
  Fallback = "fallback",
24
22
  WebviewStep = "webview_step",
25
23
  WebviewEnd = "webview_end",
@@ -49,18 +47,6 @@ export interface EventFeedback extends HtBaseEventProps {
49
47
  value?: number;
50
48
  comment?: string;
51
49
  }
52
- export interface EventFeedbackKnowledgebase extends HtBaseEventProps {
53
- action: EventAction.FeedbackKnowledgebase;
54
- knowledgebaseInferenceId: string;
55
- feedbackBotInteractionId: string;
56
- feedbackTargetId: string;
57
- feedbackGroupId: string;
58
- possibleOptions: string[];
59
- possibleValues?: number[];
60
- option: string;
61
- value?: number;
62
- comment?: string;
63
- }
64
50
  export interface EventFlow extends HtBaseEventProps {
65
51
  action: EventAction.FlowNode;
66
52
  flowThreadId: string;
@@ -143,24 +129,6 @@ export interface EventIntentSmart extends HtBaseEventProps {
143
129
  nluIntentSmartMessageId: string;
144
130
  userInput: string;
145
131
  }
146
- export declare enum KnowledgebaseFailReason {
147
- NoKnowledge = "no_knowledge",
148
- Hallucination = "hallucination"
149
- }
150
- export interface EventKnowledgeBase extends HtBaseEventProps {
151
- action: EventAction.Knowledgebase;
152
- flowThreadId: string;
153
- flowId: string;
154
- flowName: string;
155
- flowNodeId: string;
156
- flowNodeContentId: string;
157
- knowledgebaseInferenceId: string;
158
- knowledgebaseFailReason?: KnowledgebaseFailReason;
159
- knowledgebaseSourcesIds: string[];
160
- knowledgebaseChunksIds: string[];
161
- knowledgebaseMessageId: string;
162
- userInput: string;
163
- }
164
132
  export interface EventWebviewActionTriggered extends HtBaseEventAllFlowProps {
165
133
  action: EventAction.WebviewActionTriggered;
166
134
  webviewTargetId: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebviewEndFailType = exports.KnowledgebaseFailReason = exports.EventAction = exports.EVENT_FORMAT_VERSION = void 0;
3
+ exports.WebviewEndFailType = exports.EventAction = exports.EVENT_FORMAT_VERSION = void 0;
4
4
  exports.EVENT_FORMAT_VERSION = 5;
5
5
  var EventAction;
6
6
  (function (EventAction) {
@@ -8,7 +8,6 @@ var EventAction;
8
8
  EventAction["FeedbackCase"] = "feedback_case";
9
9
  EventAction["FeedbackMessage"] = "feedback_message";
10
10
  EventAction["FeedbackConversation"] = "feedback_conversation";
11
- EventAction["FeedbackKnowledgebase"] = "feedback_knowledgebase";
12
11
  EventAction["FeedbackWebview"] = "feedback_webview";
13
12
  EventAction["FlowNode"] = "flow_node";
14
13
  EventAction["ConditionalCountry"] = "conditional_country";
@@ -22,7 +21,6 @@ var EventAction;
22
21
  EventAction["HandoffFail"] = "handoff_fail";
23
22
  EventAction["Keyword"] = "nlu_keyword";
24
23
  EventAction["IntentSmart"] = "nlu_intent_smart";
25
- EventAction["Knowledgebase"] = "knowledgebase";
26
24
  EventAction["Fallback"] = "fallback";
27
25
  EventAction["WebviewStep"] = "webview_step";
28
26
  EventAction["WebviewEnd"] = "webview_end";
@@ -31,11 +29,6 @@ var EventAction;
31
29
  EventAction["CaptureUserInput"] = "capture_user_input";
32
30
  EventAction["AiAgentRouter"] = "ai_agent_router";
33
31
  })(EventAction || (exports.EventAction = EventAction = {}));
34
- var KnowledgebaseFailReason;
35
- (function (KnowledgebaseFailReason) {
36
- KnowledgebaseFailReason["NoKnowledge"] = "no_knowledge";
37
- KnowledgebaseFailReason["Hallucination"] = "hallucination";
38
- })(KnowledgebaseFailReason || (exports.KnowledgebaseFailReason = KnowledgebaseFailReason = {}));
39
32
  var WebviewEndFailType;
40
33
  (function (WebviewEndFailType) {
41
34
  WebviewEndFailType["CanceledByUser"] = "canceled_by_user";
@@ -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,WA2BX;AA3BD,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;IAC9B,sDAAuC,CAAA;IACvC,gDAAiC,CAAA;AACnC,CAAC,EA3BW,WAAW,2BAAX,WAAW,QA2BtB;AAuID,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,uCAAvB,uBAAuB,QAGlC;AA6FD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,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,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,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;IACjB,6CAA8B,CAAA;IAC9B,sDAAuC,CAAA;IACvC,gDAAiC,CAAA;AACnC,CAAC,EAzBW,WAAW,2BAAX,WAAW,QAyBtB;AAuMD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B"}
@@ -1,5 +1,4 @@
1
1
  export * from './ai-agents';
2
2
  export * from './bot-config';
3
3
  export * from './hubtype-analytics';
4
- export * from './knowledge-bases';
5
4
  export * from './legacy-types';
@@ -4,6 +4,5 @@ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./ai-agents"), exports);
5
5
  tslib_1.__exportStar(require("./bot-config"), exports);
6
6
  tslib_1.__exportStar(require("./hubtype-analytics"), exports);
7
- tslib_1.__exportStar(require("./knowledge-bases"), exports);
8
7
  tslib_1.__exportStar(require("./legacy-types"), exports);
9
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":";;;AAAA,sDAA2B;AAC3B,uDAA4B;AAC5B,8DAAmC;AACnC,4DAAiC;AACjC,yDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":";;;AAAA,sDAA2B;AAC3B,uDAA4B;AAC5B,8DAAmC;AACnC,yDAA8B"}
@@ -13,7 +13,6 @@ function decompressData(compressedData) {
13
13
  const charData = strData.split('').map(x => x.charCodeAt(0)); // Convert binary string to character-number array
14
14
  const binData = new Uint8Array(charData); // Turn number array into byte-array
15
15
  const data = (0, pako_1.inflate)(binData);
16
- // @ts-expect-error
17
- return String.fromCharCode.apply(null, new Uint8Array(data)); // Convert gunzipped byteArray back to ascii string
16
+ return new TextDecoder('utf-8').decode(data);
18
17
  }
19
18
  //# sourceMappingURL=pusher-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pusher-utils.js","sourceRoot":"","sources":["../../src/pusher-utils.ts"],"names":[],"mappings":";;AAQA,wCAOC;AAfD,+BAA8B;AAE9B;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,cAAsB;IACnD,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,CAAA,CAAC,0CAA0C;IAC/E,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,kDAAkD;IAC/G,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAA,CAAC,oCAAoC;IAC7E,MAAM,IAAI,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,CAAA;IAC7B,mBAAmB;IACnB,OAAO,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAA,CAAC,mDAAmD;AAClH,CAAC"}
1
+ {"version":3,"file":"pusher-utils.js","sourceRoot":"","sources":["../../src/pusher-utils.ts"],"names":[],"mappings":";;AAQA,wCAMC;AAdD,+BAA8B;AAE9B;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,cAAsB;IACnD,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,CAAA,CAAC,0CAA0C;IAC/E,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,kDAAkD;IAC/G,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAA,CAAC,oCAAoC;IAC7E,MAAM,IAAI,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,CAAA;IAC7B,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC9C,CAAC"}
@@ -5,7 +5,6 @@ export declare enum EventAction {
5
5
  FeedbackCase = "feedback_case",
6
6
  FeedbackMessage = "feedback_message",
7
7
  FeedbackConversation = "feedback_conversation",
8
- FeedbackKnowledgebase = "feedback_knowledgebase",
9
8
  FeedbackWebview = "feedback_webview",
10
9
  FlowNode = "flow_node",
11
10
  ConditionalCountry = "conditional_country",
@@ -19,7 +18,6 @@ export declare enum EventAction {
19
18
  HandoffFail = "handoff_fail",
20
19
  Keyword = "nlu_keyword",
21
20
  IntentSmart = "nlu_intent_smart",
22
- Knowledgebase = "knowledgebase",
23
21
  Fallback = "fallback",
24
22
  WebviewStep = "webview_step",
25
23
  WebviewEnd = "webview_end",
@@ -49,18 +47,6 @@ export interface EventFeedback extends HtBaseEventProps {
49
47
  value?: number;
50
48
  comment?: string;
51
49
  }
52
- export interface EventFeedbackKnowledgebase extends HtBaseEventProps {
53
- action: EventAction.FeedbackKnowledgebase;
54
- knowledgebaseInferenceId: string;
55
- feedbackBotInteractionId: string;
56
- feedbackTargetId: string;
57
- feedbackGroupId: string;
58
- possibleOptions: string[];
59
- possibleValues?: number[];
60
- option: string;
61
- value?: number;
62
- comment?: string;
63
- }
64
50
  export interface EventFlow extends HtBaseEventProps {
65
51
  action: EventAction.FlowNode;
66
52
  flowThreadId: string;
@@ -143,24 +129,6 @@ export interface EventIntentSmart extends HtBaseEventProps {
143
129
  nluIntentSmartMessageId: string;
144
130
  userInput: string;
145
131
  }
146
- export declare enum KnowledgebaseFailReason {
147
- NoKnowledge = "no_knowledge",
148
- Hallucination = "hallucination"
149
- }
150
- export interface EventKnowledgeBase extends HtBaseEventProps {
151
- action: EventAction.Knowledgebase;
152
- flowThreadId: string;
153
- flowId: string;
154
- flowName: string;
155
- flowNodeId: string;
156
- flowNodeContentId: string;
157
- knowledgebaseInferenceId: string;
158
- knowledgebaseFailReason?: KnowledgebaseFailReason;
159
- knowledgebaseSourcesIds: string[];
160
- knowledgebaseChunksIds: string[];
161
- knowledgebaseMessageId: string;
162
- userInput: string;
163
- }
164
132
  export interface EventWebviewActionTriggered extends HtBaseEventAllFlowProps {
165
133
  action: EventAction.WebviewActionTriggered;
166
134
  webviewTargetId: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WebviewEndFailType = exports.KnowledgebaseFailReason = exports.EventAction = exports.EVENT_FORMAT_VERSION = void 0;
3
+ exports.WebviewEndFailType = exports.EventAction = exports.EVENT_FORMAT_VERSION = void 0;
4
4
  exports.EVENT_FORMAT_VERSION = 5;
5
5
  var EventAction;
6
6
  (function (EventAction) {
@@ -8,7 +8,6 @@ var EventAction;
8
8
  EventAction["FeedbackCase"] = "feedback_case";
9
9
  EventAction["FeedbackMessage"] = "feedback_message";
10
10
  EventAction["FeedbackConversation"] = "feedback_conversation";
11
- EventAction["FeedbackKnowledgebase"] = "feedback_knowledgebase";
12
11
  EventAction["FeedbackWebview"] = "feedback_webview";
13
12
  EventAction["FlowNode"] = "flow_node";
14
13
  EventAction["ConditionalCountry"] = "conditional_country";
@@ -22,7 +21,6 @@ var EventAction;
22
21
  EventAction["HandoffFail"] = "handoff_fail";
23
22
  EventAction["Keyword"] = "nlu_keyword";
24
23
  EventAction["IntentSmart"] = "nlu_intent_smart";
25
- EventAction["Knowledgebase"] = "knowledgebase";
26
24
  EventAction["Fallback"] = "fallback";
27
25
  EventAction["WebviewStep"] = "webview_step";
28
26
  EventAction["WebviewEnd"] = "webview_end";
@@ -31,11 +29,6 @@ var EventAction;
31
29
  EventAction["CaptureUserInput"] = "capture_user_input";
32
30
  EventAction["AiAgentRouter"] = "ai_agent_router";
33
31
  })(EventAction || (exports.EventAction = EventAction = {}));
34
- var KnowledgebaseFailReason;
35
- (function (KnowledgebaseFailReason) {
36
- KnowledgebaseFailReason["NoKnowledge"] = "no_knowledge";
37
- KnowledgebaseFailReason["Hallucination"] = "hallucination";
38
- })(KnowledgebaseFailReason || (exports.KnowledgebaseFailReason = KnowledgebaseFailReason = {}));
39
32
  var WebviewEndFailType;
40
33
  (function (WebviewEndFailType) {
41
34
  WebviewEndFailType["CanceledByUser"] = "canceled_by_user";
@@ -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,WA2BX;AA3BD,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;IAC9B,sDAAuC,CAAA;IACvC,gDAAiC,CAAA;AACnC,CAAC,EA3BW,WAAW,2BAAX,WAAW,QA2BtB;AAuID,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,uDAA4B,CAAA;IAC5B,0DAA+B,CAAA;AACjC,CAAC,EAHW,uBAAuB,uCAAvB,uBAAuB,QAGlC;AA6FD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,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,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,oCAAqB,CAAA;IACrB,2CAA4B,CAAA;IAC5B,yCAA0B,CAAA;IAC1B,gCAAiB,CAAA;IACjB,6CAA8B,CAAA;IAC9B,sDAAuC,CAAA;IACvC,gDAAiC,CAAA;AACnC,CAAC,EAzBW,WAAW,2BAAX,WAAW,QAyBtB;AAuMD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,yDAAmC,CAAA;IACnC,4CAAsB,CAAA;IACtB,0DAAoC,CAAA;AACtC,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B"}
@@ -1,5 +1,4 @@
1
1
  export * from './ai-agents';
2
2
  export * from './bot-config';
3
3
  export * from './hubtype-analytics';
4
- export * from './knowledge-bases';
5
4
  export * from './legacy-types';
@@ -4,6 +4,5 @@ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./ai-agents"), exports);
5
5
  tslib_1.__exportStar(require("./bot-config"), exports);
6
6
  tslib_1.__exportStar(require("./hubtype-analytics"), exports);
7
- tslib_1.__exportStar(require("./knowledge-bases"), exports);
8
7
  tslib_1.__exportStar(require("./legacy-types"), exports);
9
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":";;;AAAA,sDAA2B;AAC3B,uDAA4B;AAC5B,8DAAmC;AACnC,4DAAiC;AACjC,yDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":";;;AAAA,sDAA2B;AAC3B,uDAA4B;AAC5B,8DAAmC;AACnC,yDAA8B"}
@@ -13,7 +13,6 @@ function decompressData(compressedData) {
13
13
  const charData = strData.split('').map(x => x.charCodeAt(0)); // Convert binary string to character-number array
14
14
  const binData = new Uint8Array(charData); // Turn number array into byte-array
15
15
  const data = (0, pako_1.inflate)(binData);
16
- // @ts-expect-error
17
- return String.fromCharCode.apply(null, new Uint8Array(data)); // Convert gunzipped byteArray back to ascii string
16
+ return new TextDecoder('utf-8').decode(data);
18
17
  }
19
18
  //# sourceMappingURL=pusher-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pusher-utils.js","sourceRoot":"","sources":["../../src/pusher-utils.ts"],"names":[],"mappings":";;AAQA,wCAOC;AAfD,+BAA8B;AAE9B;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,cAAsB;IACnD,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,CAAA,CAAC,0CAA0C;IAC/E,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,kDAAkD;IAC/G,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAA,CAAC,oCAAoC;IAC7E,MAAM,IAAI,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,CAAA;IAC7B,mBAAmB;IACnB,OAAO,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAA,CAAC,mDAAmD;AAClH,CAAC"}
1
+ {"version":3,"file":"pusher-utils.js","sourceRoot":"","sources":["../../src/pusher-utils.ts"],"names":[],"mappings":";;AAQA,wCAMC;AAdD,+BAA8B;AAE9B;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,cAAsB;IACnD,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,CAAA,CAAC,0CAA0C;IAC/E,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA,CAAC,kDAAkD;IAC/G,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,QAAQ,CAAC,CAAA,CAAC,oCAAoC;IAC7E,MAAM,IAAI,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,CAAA;IAC7B,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC9C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botonic/core",
3
- "version": "0.54.0",
3
+ "version": "0.55.0",
4
4
  "license": "MIT",
5
5
  "description": "Build Chatbots using React",
6
6
  "main": "./lib/cjs/index.js",
@@ -7,7 +7,6 @@ export enum EventAction {
7
7
  FeedbackCase = 'feedback_case',
8
8
  FeedbackMessage = 'feedback_message',
9
9
  FeedbackConversation = 'feedback_conversation',
10
- FeedbackKnowledgebase = 'feedback_knowledgebase',
11
10
  FeedbackWebview = 'feedback_webview',
12
11
  FlowNode = 'flow_node',
13
12
  ConditionalCountry = 'conditional_country',
@@ -21,7 +20,6 @@ export enum EventAction {
21
20
  HandoffFail = 'handoff_fail',
22
21
  Keyword = 'nlu_keyword',
23
22
  IntentSmart = 'nlu_intent_smart',
24
- Knowledgebase = 'knowledgebase',
25
23
  Fallback = 'fallback',
26
24
  WebviewStep = 'webview_step',
27
25
  WebviewEnd = 'webview_end',
@@ -59,19 +57,6 @@ export interface EventFeedback extends HtBaseEventProps {
59
57
  comment?: string
60
58
  }
61
59
 
62
- export interface EventFeedbackKnowledgebase extends HtBaseEventProps {
63
- action: EventAction.FeedbackKnowledgebase
64
- knowledgebaseInferenceId: string
65
- feedbackBotInteractionId: string
66
- feedbackTargetId: string
67
- feedbackGroupId: string
68
- possibleOptions: string[]
69
- possibleValues?: number[]
70
- option: string
71
- value?: number
72
- comment?: string
73
- }
74
-
75
60
  export interface EventFlow extends HtBaseEventProps {
76
61
  action: EventAction.FlowNode
77
62
  flowThreadId: string
@@ -164,25 +149,6 @@ export interface EventIntentSmart extends HtBaseEventProps {
164
149
  userInput: string
165
150
  }
166
151
 
167
- export enum KnowledgebaseFailReason {
168
- NoKnowledge = 'no_knowledge',
169
- Hallucination = 'hallucination',
170
- }
171
- export interface EventKnowledgeBase extends HtBaseEventProps {
172
- action: EventAction.Knowledgebase
173
- flowThreadId: string
174
- flowId: string
175
- flowName: string
176
- flowNodeId: string
177
- flowNodeContentId: string
178
- knowledgebaseInferenceId: string
179
- knowledgebaseFailReason?: KnowledgebaseFailReason
180
- knowledgebaseSourcesIds: string[]
181
- knowledgebaseChunksIds: string[]
182
- knowledgebaseMessageId: string
183
- userInput: string
184
- }
185
-
186
152
  export interface EventWebviewActionTriggered extends HtBaseEventAllFlowProps {
187
153
  action: EventAction.WebviewActionTriggered
188
154
  webviewTargetId: string
@@ -1,5 +1,4 @@
1
1
  export * from './ai-agents'
2
2
  export * from './bot-config'
3
3
  export * from './hubtype-analytics'
4
- export * from './knowledge-bases'
5
4
  export * from './legacy-types'
@@ -11,6 +11,5 @@ export function decompressData(compressedData: string): string {
11
11
  const charData = strData.split('').map(x => x.charCodeAt(0)) // Convert binary string to character-number array
12
12
  const binData = new Uint8Array(charData) // Turn number array into byte-array
13
13
  const data = inflate(binData)
14
- // @ts-expect-error
15
- return String.fromCharCode.apply(null, new Uint8Array(data)) // Convert gunzipped byteArray back to ascii string
14
+ return new TextDecoder('utf-8').decode(data)
16
15
  }
@@ -1,7 +0,0 @@
1
- export interface KnowledgeBasesResponse {
2
- inferenceId: string;
3
- hasKnowledge: boolean;
4
- isFaithful: boolean;
5
- chunkIds: string[];
6
- answer: string;
7
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=knowledge-bases.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"knowledge-bases.js","sourceRoot":"","sources":["../../../src/models/knowledge-bases.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- export interface KnowledgeBasesResponse {
2
- inferenceId: string;
3
- hasKnowledge: boolean;
4
- isFaithful: boolean;
5
- chunkIds: string[];
6
- answer: string;
7
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=knowledge-bases.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"knowledge-bases.js","sourceRoot":"","sources":["../../../src/models/knowledge-bases.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- export interface KnowledgeBasesResponse {
2
- inferenceId: string
3
- hasKnowledge: boolean
4
- isFaithful: boolean
5
- chunkIds: string[]
6
- answer: string
7
- }