@botonic/plugin-hubtype-analytics 0.56.0-alpha.0 → 0.57.0-rslib-esm.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.
- package/lib/{cjs/event-models → event-models}/ht-event-ai-agent-router.d.ts +2 -2
- package/lib/event-models/ht-event-ai-agent-router.js +45 -0
- package/lib/event-models/ht-event-ai-agent-router.js.map +1 -0
- package/lib/{esm/event-models → event-models}/ht-event-ai-agent.d.ts +2 -2
- package/lib/event-models/ht-event-ai-agent.js +66 -0
- package/lib/event-models/ht-event-ai-agent.js.map +1 -0
- package/lib/{esm/event-models → event-models}/ht-event-bot-action.d.ts +2 -2
- package/lib/event-models/ht-event-bot-action.js +36 -0
- package/lib/event-models/ht-event-bot-action.js.map +1 -0
- package/lib/{esm/event-models → event-models}/ht-event-capture-user-input.d.ts +2 -2
- package/lib/event-models/ht-event-capture-user-input.js +39 -0
- package/lib/event-models/ht-event-capture-user-input.js.map +1 -0
- package/lib/{esm/event-models → event-models}/ht-event-conditional-channel.d.ts +2 -2
- package/lib/event-models/ht-event-conditional-channel.js +36 -0
- package/lib/event-models/ht-event-conditional-channel.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-conditional-country.d.ts +2 -2
- package/lib/event-models/ht-event-conditional-country.js +36 -0
- package/lib/event-models/ht-event-conditional-country.js.map +1 -0
- package/lib/{esm/event-models → event-models}/ht-event-conditional-custom.d.ts +2 -2
- package/lib/event-models/ht-event-conditional-custom.js +38 -0
- package/lib/event-models/ht-event-conditional-custom.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-conditional-queue-status.d.ts +2 -2
- package/lib/event-models/ht-event-conditional-queue-status.js +39 -0
- package/lib/event-models/ht-event-conditional-queue-status.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-custom.d.ts +2 -2
- package/lib/event-models/ht-event-custom.js +31 -0
- package/lib/event-models/ht-event-custom.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-fallback.d.ts +2 -2
- package/lib/event-models/ht-event-fallback.js +36 -0
- package/lib/event-models/ht-event-fallback.js.map +1 -0
- package/lib/{esm/event-models → event-models}/ht-event-feedback.d.ts +2 -2
- package/lib/event-models/ht-event-feedback.js +36 -0
- package/lib/event-models/ht-event-feedback.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-flow.d.ts +2 -2
- package/lib/event-models/ht-event-flow.js +35 -0
- package/lib/event-models/ht-event-flow.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-handoff-option.d.ts +2 -2
- package/lib/event-models/ht-event-handoff-option.js +35 -0
- package/lib/event-models/ht-event-handoff-option.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-handoff.d.ts +2 -2
- package/lib/event-models/ht-event-handoff.js +40 -0
- package/lib/event-models/ht-event-handoff.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-intent-smart.d.ts +2 -2
- package/lib/event-models/ht-event-intent-smart.js +38 -0
- package/lib/event-models/ht-event-intent-smart.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-keyword.d.ts +2 -2
- package/lib/event-models/ht-event-keyword.js +38 -0
- package/lib/event-models/ht-event-keyword.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-redirect-flow.d.ts +2 -2
- package/lib/event-models/ht-event-redirect-flow.js +37 -0
- package/lib/event-models/ht-event-redirect-flow.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-webview-action-triggered.d.ts +2 -2
- package/lib/event-models/ht-event-webview-action-triggered.js +38 -0
- package/lib/event-models/ht-event-webview-action-triggered.js.map +1 -0
- package/lib/{esm/event-models → event-models}/ht-event-webview-end.d.ts +2 -2
- package/lib/event-models/ht-event-webview-end.js +36 -0
- package/lib/event-models/ht-event-webview-end.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event-webview-step.d.ts +2 -2
- package/lib/event-models/ht-event-webview-step.js +34 -0
- package/lib/event-models/ht-event-webview-step.js.map +1 -0
- package/lib/{cjs/event-models → event-models}/ht-event.d.ts +1 -1
- package/lib/event-models/ht-event.js +40 -0
- package/lib/event-models/ht-event.js.map +1 -0
- package/lib/event-models/index.d.ts +20 -0
- package/lib/event-models/index.js +63 -0
- package/lib/event-models/index.js.map +1 -0
- package/lib/{cjs/index.d.ts → index.d.ts} +7 -4
- package/lib/{esm/index.js → index.js} +45 -22
- package/lib/index.js.map +1 -0
- package/lib/types.d.ts +14 -0
- package/lib/types.js +13 -0
- package/lib/types.js.map +1 -0
- package/lib/utils.d.ts +3 -0
- package/lib/utils.js +64 -0
- package/lib/utils.js.map +1 -0
- package/package.json +10 -8
- package/src/types.ts +40 -40
- package/lib/cjs/event-models/ht-event-ai-agent-router.js +0 -31
- package/lib/cjs/event-models/ht-event-ai-agent-router.js.map +0 -1
- package/lib/cjs/event-models/ht-event-ai-agent.d.ts +0 -28
- package/lib/cjs/event-models/ht-event-ai-agent.js +0 -55
- package/lib/cjs/event-models/ht-event-ai-agent.js.map +0 -1
- package/lib/cjs/event-models/ht-event-bot-action.d.ts +0 -12
- package/lib/cjs/event-models/ht-event-bot-action.js +0 -21
- package/lib/cjs/event-models/ht-event-bot-action.js.map +0 -1
- package/lib/cjs/event-models/ht-event-capture-user-input.d.ts +0 -15
- package/lib/cjs/event-models/ht-event-capture-user-input.js +0 -24
- package/lib/cjs/event-models/ht-event-capture-user-input.js.map +0 -1
- package/lib/cjs/event-models/ht-event-conditional-channel.d.ts +0 -12
- package/lib/cjs/event-models/ht-event-conditional-channel.js +0 -21
- package/lib/cjs/event-models/ht-event-conditional-channel.js.map +0 -1
- package/lib/cjs/event-models/ht-event-conditional-country.js +0 -21
- package/lib/cjs/event-models/ht-event-conditional-country.js.map +0 -1
- package/lib/cjs/event-models/ht-event-conditional-custom.d.ts +0 -14
- package/lib/cjs/event-models/ht-event-conditional-custom.js +0 -23
- package/lib/cjs/event-models/ht-event-conditional-custom.js.map +0 -1
- package/lib/cjs/event-models/ht-event-conditional-queue-status.js +0 -24
- package/lib/cjs/event-models/ht-event-conditional-queue-status.js.map +0 -1
- package/lib/cjs/event-models/ht-event-custom.js +0 -16
- package/lib/cjs/event-models/ht-event-custom.js.map +0 -1
- package/lib/cjs/event-models/ht-event-fallback.js +0 -21
- package/lib/cjs/event-models/ht-event-fallback.js.map +0 -1
- package/lib/cjs/event-models/ht-event-feedback.d.ts +0 -13
- package/lib/cjs/event-models/ht-event-feedback.js +0 -21
- package/lib/cjs/event-models/ht-event-feedback.js.map +0 -1
- package/lib/cjs/event-models/ht-event-flow.js +0 -20
- package/lib/cjs/event-models/ht-event-flow.js.map +0 -1
- package/lib/cjs/event-models/ht-event-handoff-option.js +0 -20
- package/lib/cjs/event-models/ht-event-handoff-option.js.map +0 -1
- package/lib/cjs/event-models/ht-event-handoff.js +0 -25
- package/lib/cjs/event-models/ht-event-handoff.js.map +0 -1
- package/lib/cjs/event-models/ht-event-intent-smart.js +0 -23
- package/lib/cjs/event-models/ht-event-intent-smart.js.map +0 -1
- package/lib/cjs/event-models/ht-event-keyword.js +0 -23
- package/lib/cjs/event-models/ht-event-keyword.js.map +0 -1
- package/lib/cjs/event-models/ht-event-redirect-flow.js +0 -22
- package/lib/cjs/event-models/ht-event-redirect-flow.js.map +0 -1
- package/lib/cjs/event-models/ht-event-webview-action-triggered.js +0 -23
- package/lib/cjs/event-models/ht-event-webview-action-triggered.js.map +0 -1
- package/lib/cjs/event-models/ht-event-webview-end.d.ts +0 -13
- package/lib/cjs/event-models/ht-event-webview-end.js +0 -21
- package/lib/cjs/event-models/ht-event-webview-end.js.map +0 -1
- package/lib/cjs/event-models/ht-event-webview-step.js +0 -19
- package/lib/cjs/event-models/ht-event-webview-step.js.map +0 -1
- package/lib/cjs/event-models/ht-event.js +0 -18
- package/lib/cjs/event-models/ht-event.js.map +0 -1
- package/lib/cjs/event-models/index.d.ts +0 -20
- package/lib/cjs/event-models/index.js +0 -44
- package/lib/cjs/event-models/index.js.map +0 -1
- package/lib/cjs/index.js +0 -70
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/types.d.ts +0 -14
- package/lib/cjs/types.js +0 -12
- package/lib/cjs/types.js.map +0 -1
- package/lib/cjs/utils.d.ts +0 -3
- package/lib/cjs/utils.js +0 -58
- package/lib/cjs/utils.js.map +0 -1
- package/lib/esm/event-models/ht-event-ai-agent-router.d.ts +0 -21
- package/lib/esm/event-models/ht-event-ai-agent-router.js +0 -31
- package/lib/esm/event-models/ht-event-ai-agent-router.js.map +0 -1
- package/lib/esm/event-models/ht-event-ai-agent.js +0 -55
- package/lib/esm/event-models/ht-event-ai-agent.js.map +0 -1
- package/lib/esm/event-models/ht-event-bot-action.js +0 -21
- package/lib/esm/event-models/ht-event-bot-action.js.map +0 -1
- package/lib/esm/event-models/ht-event-capture-user-input.js +0 -24
- package/lib/esm/event-models/ht-event-capture-user-input.js.map +0 -1
- package/lib/esm/event-models/ht-event-conditional-channel.js +0 -21
- package/lib/esm/event-models/ht-event-conditional-channel.js.map +0 -1
- package/lib/esm/event-models/ht-event-conditional-country.d.ts +0 -12
- package/lib/esm/event-models/ht-event-conditional-country.js +0 -21
- package/lib/esm/event-models/ht-event-conditional-country.js.map +0 -1
- package/lib/esm/event-models/ht-event-conditional-custom.js +0 -23
- package/lib/esm/event-models/ht-event-conditional-custom.js.map +0 -1
- package/lib/esm/event-models/ht-event-conditional-queue-status.d.ts +0 -15
- package/lib/esm/event-models/ht-event-conditional-queue-status.js +0 -24
- package/lib/esm/event-models/ht-event-conditional-queue-status.js.map +0 -1
- package/lib/esm/event-models/ht-event-custom.d.ts +0 -7
- package/lib/esm/event-models/ht-event-custom.js +0 -16
- package/lib/esm/event-models/ht-event-custom.js.map +0 -1
- package/lib/esm/event-models/ht-event-fallback.d.ts +0 -12
- package/lib/esm/event-models/ht-event-fallback.js +0 -21
- package/lib/esm/event-models/ht-event-fallback.js.map +0 -1
- package/lib/esm/event-models/ht-event-feedback.js +0 -21
- package/lib/esm/event-models/ht-event-feedback.js.map +0 -1
- package/lib/esm/event-models/ht-event-flow.d.ts +0 -11
- package/lib/esm/event-models/ht-event-flow.js +0 -20
- package/lib/esm/event-models/ht-event-flow.js.map +0 -1
- package/lib/esm/event-models/ht-event-handoff-option.d.ts +0 -13
- package/lib/esm/event-models/ht-event-handoff-option.js +0 -20
- package/lib/esm/event-models/ht-event-handoff-option.js.map +0 -1
- package/lib/esm/event-models/ht-event-handoff.d.ts +0 -17
- package/lib/esm/event-models/ht-event-handoff.js +0 -25
- package/lib/esm/event-models/ht-event-handoff.js.map +0 -1
- package/lib/esm/event-models/ht-event-intent-smart.d.ts +0 -14
- package/lib/esm/event-models/ht-event-intent-smart.js +0 -23
- package/lib/esm/event-models/ht-event-intent-smart.js.map +0 -1
- package/lib/esm/event-models/ht-event-keyword.d.ts +0 -14
- package/lib/esm/event-models/ht-event-keyword.js +0 -23
- package/lib/esm/event-models/ht-event-keyword.js.map +0 -1
- package/lib/esm/event-models/ht-event-redirect-flow.d.ts +0 -14
- package/lib/esm/event-models/ht-event-redirect-flow.js +0 -22
- package/lib/esm/event-models/ht-event-redirect-flow.js.map +0 -1
- package/lib/esm/event-models/ht-event-webview-action-triggered.d.ts +0 -14
- package/lib/esm/event-models/ht-event-webview-action-triggered.js +0 -23
- package/lib/esm/event-models/ht-event-webview-action-triggered.js.map +0 -1
- package/lib/esm/event-models/ht-event-webview-end.js +0 -21
- package/lib/esm/event-models/ht-event-webview-end.js.map +0 -1
- package/lib/esm/event-models/ht-event-webview-step.d.ts +0 -11
- package/lib/esm/event-models/ht-event-webview-step.js +0 -19
- package/lib/esm/event-models/ht-event-webview-step.js.map +0 -1
- package/lib/esm/event-models/ht-event.d.ts +0 -14
- package/lib/esm/event-models/ht-event.js +0 -18
- package/lib/esm/event-models/ht-event.js.map +0 -1
- package/lib/esm/event-models/index.d.ts +0 -20
- package/lib/esm/event-models/index.js +0 -44
- package/lib/esm/event-models/index.js.map +0 -1
- package/lib/esm/index.d.ts +0 -18
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/types.d.ts +0 -14
- package/lib/esm/types.js +0 -12
- package/lib/esm/types.js.map +0 -1
- package/lib/esm/utils.d.ts +0 -3
- package/lib/esm/utils.js +0 -58
- package/lib/esm/utils.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type AvailableSpecialist, type EventAiAgentRouter, type RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
1
|
+
import { type AvailableSpecialist, type EventAiAgentRouter, type RequestData } from '../types.js';
|
|
2
|
+
import { HtEvent } from './ht-event.js';
|
|
3
3
|
export declare class HtEventAiAgentRouter extends HtEvent {
|
|
4
4
|
flow_thread_id: string;
|
|
5
5
|
flow_id: string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { EventAction, EventType } from "../types.js";
|
|
2
|
+
import { HtEvent } from "./ht-event.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function _define_property(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else obj[key] = value;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
18
|
+
|
|
19
|
+
class HtEventAiAgentRouter extends HtEvent {
|
|
20
|
+
constructor(event, requestData){
|
|
21
|
+
super(event, requestData), _define_property(this, "flow_thread_id", void 0), _define_property(this, "flow_id", void 0), _define_property(this, "flow_name", void 0), _define_property(this, "flow_node_id", void 0), _define_property(this, "flow_node_content_id", void 0), _define_property(this, "flow_node_is_meaningful", void 0), _define_property(this, "memory_length", void 0), _define_property(this, "input_message_id", void 0), _define_property(this, "input_guardrails_triggered", void 0), _define_property(this, "output_guardrails_triggered", void 0), _define_property(this, "exit", void 0), _define_property(this, "error", void 0), _define_property(this, "starting_agent_name", void 0), _define_property(this, "last_agent_name", void 0), _define_property(this, "available_specialists", void 0), _define_property(this, "is_transferred_to_specialist", void 0);
|
|
22
|
+
this.type = EventType.BotEvent;
|
|
23
|
+
this.action = EventAction.AiAgentRouter;
|
|
24
|
+
this.flow_thread_id = event.flowThreadId;
|
|
25
|
+
this.flow_id = event.flowId;
|
|
26
|
+
this.flow_name = event.flowName;
|
|
27
|
+
this.flow_node_id = event.flowNodeId;
|
|
28
|
+
this.flow_node_content_id = event.flowNodeContentId;
|
|
29
|
+
this.flow_node_is_meaningful = event.flowNodeIsMeaningful;
|
|
30
|
+
this.memory_length = event.memoryLength;
|
|
31
|
+
this.input_message_id = event.inputMessageId;
|
|
32
|
+
this.input_guardrails_triggered = event.inputGuardrailsTriggered;
|
|
33
|
+
this.output_guardrails_triggered = event.outputGuardrailsTriggered;
|
|
34
|
+
this.exit = event.exit;
|
|
35
|
+
this.error = event.error;
|
|
36
|
+
this.starting_agent_name = event.startingAgentName;
|
|
37
|
+
this.last_agent_name = event.lastAgentName;
|
|
38
|
+
this.available_specialists = event.availableSpecialists;
|
|
39
|
+
this.is_transferred_to_specialist = event.isTransferredToSpecialist;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { HtEventAiAgentRouter };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=ht-event-ai-agent-router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-ai-agent-router.js","sources":["../../src/event-models/ht-event-ai-agent-router.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport {\n type AvailableSpecialist,\n EventAction,\n type EventAiAgentRouter,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventAiAgentRouter extends HtEvent {\n flow_thread_id: string\n flow_id: string\n flow_name: string\n flow_node_id: string\n flow_node_content_id: string\n flow_node_is_meaningful: boolean\n memory_length: number\n input_message_id: string\n input_guardrails_triggered: string[]\n output_guardrails_triggered: string[]\n exit: boolean\n error: boolean\n starting_agent_name: string\n last_agent_name: string\n available_specialists: AvailableSpecialist[]\n is_transferred_to_specialist: boolean\n\n constructor(event: EventAiAgentRouter, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.AiAgentRouter\n this.flow_thread_id = event.flowThreadId\n this.flow_id = event.flowId\n this.flow_name = event.flowName\n this.flow_node_id = event.flowNodeId\n this.flow_node_content_id = event.flowNodeContentId\n this.flow_node_is_meaningful = event.flowNodeIsMeaningful\n this.memory_length = event.memoryLength\n this.input_message_id = event.inputMessageId\n this.input_guardrails_triggered = event.inputGuardrailsTriggered\n this.output_guardrails_triggered = event.outputGuardrailsTriggered\n this.exit = event.exit\n this.error = event.error\n this.starting_agent_name = event.startingAgentName\n this.last_agent_name = event.lastAgentName\n this.available_specialists = event.availableSpecialists\n this.is_transferred_to_specialist = event.isTransferredToSpecialist\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventAiAgentRouter","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAuD,GAOtC;AACmB;AAE7B,MAAMG,oBAAoBA,SAASD,OAAOA;IAkB/C,YAAYE,KAAyB,EAAEC,WAAwB,CAAE;QAC/D,KAAK,CAACD,OAAOC,cAlBf,kDACA,2CACA,6CACA,gDACA,wDACA,2DACA,iDACA,oDACA,8DACA,+DACA,wCACA,yCACA,uDACA,mDACA,yDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,yBAAyB;QACvC,IAAI,CAAC,cAAc,GAAGI,MAAM,YAAY;QACxC,IAAI,CAAC,OAAO,GAAGA,MAAM,MAAM;QAC3B,IAAI,CAAC,SAAS,GAAGA,MAAM,QAAQ;QAC/B,IAAI,CAAC,YAAY,GAAGA,MAAM,UAAU;QACpC,IAAI,CAAC,oBAAoB,GAAGA,MAAM,iBAAiB;QACnD,IAAI,CAAC,uBAAuB,GAAGA,MAAM,oBAAoB;QACzD,IAAI,CAAC,aAAa,GAAGA,MAAM,YAAY;QACvC,IAAI,CAAC,gBAAgB,GAAGA,MAAM,cAAc;QAC5C,IAAI,CAAC,0BAA0B,GAAGA,MAAM,wBAAwB;QAChE,IAAI,CAAC,2BAA2B,GAAGA,MAAM,yBAAyB;QAClE,IAAI,CAAC,IAAI,GAAGA,MAAM,IAAI;QACtB,IAAI,CAAC,KAAK,GAAGA,MAAM,KAAK;QACxB,IAAI,CAAC,mBAAmB,GAAGA,MAAM,iBAAiB;QAClD,IAAI,CAAC,eAAe,GAAGA,MAAM,aAAa;QAC1C,IAAI,CAAC,qBAAqB,GAAGA,MAAM,oBAAoB;QACvD,IAAI,CAAC,4BAA4B,GAAGA,MAAM,yBAAyB;IACrE;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EventAiAgent, type RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
1
|
+
import { type EventAiAgent, type RequestData } from '../types.js';
|
|
2
|
+
import { HtEvent } from './ht-event.js';
|
|
3
3
|
interface ToolExecutionEventArgs {
|
|
4
4
|
tool_name: string;
|
|
5
5
|
tool_arguments: Record<string, unknown>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { EventAction, EventType } from "../types.js";
|
|
2
|
+
import { HtEvent } from "./ht-event.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function _define_property(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else obj[key] = value;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
18
|
+
|
|
19
|
+
class HtEventAiAgent extends HtEvent {
|
|
20
|
+
truncateToolResults(toolResults) {
|
|
21
|
+
const MAX_TOOL_RESULTS_LENGTH_IN_KB = 16 * 1024 // 16384 characters
|
|
22
|
+
;
|
|
23
|
+
if (!toolResults) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return toolResults.length > MAX_TOOL_RESULTS_LENGTH_IN_KB ? `${toolResults.slice(0, MAX_TOOL_RESULTS_LENGTH_IN_KB - 3)}...` : toolResults;
|
|
27
|
+
}
|
|
28
|
+
getToolExecutionInfo(toolExecution) {
|
|
29
|
+
const knowledgeBaseArgs = {};
|
|
30
|
+
if (toolExecution.knowledgebaseSourcesIds) {
|
|
31
|
+
knowledgeBaseArgs.knowledgebase_sources_ids = toolExecution.knowledgebaseSourcesIds;
|
|
32
|
+
}
|
|
33
|
+
if (toolExecution.knowledgebaseChunksIds) {
|
|
34
|
+
knowledgeBaseArgs.knowledgebase_chunks_ids = toolExecution.knowledgebaseChunksIds;
|
|
35
|
+
}
|
|
36
|
+
const truncatedToolResults = this.truncateToolResults(toolExecution.toolResults ?? '');
|
|
37
|
+
return {
|
|
38
|
+
tool_name: toolExecution.toolName,
|
|
39
|
+
tool_arguments: toolExecution.toolArguments,
|
|
40
|
+
tool_results: truncatedToolResults,
|
|
41
|
+
...knowledgeBaseArgs
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
constructor(event, requestData){
|
|
45
|
+
super(event, requestData), _define_property(this, "flow_thread_id", void 0), _define_property(this, "flow_id", void 0), _define_property(this, "flow_name", void 0), _define_property(this, "flow_node_id", void 0), _define_property(this, "flow_node_content_id", void 0), _define_property(this, "flow_node_is_meaningful", void 0), _define_property(this, "tools_executed", void 0), _define_property(this, "memory_length", void 0), _define_property(this, "input_message_id", void 0), _define_property(this, "input_guardrails_triggered", void 0), _define_property(this, "output_guardrails_triggered", void 0), _define_property(this, "exit", void 0), _define_property(this, "error", void 0);
|
|
46
|
+
this.type = EventType.BotEvent;
|
|
47
|
+
this.action = EventAction.AiAgent;
|
|
48
|
+
this.flow_thread_id = event.flowThreadId;
|
|
49
|
+
this.flow_id = event.flowId;
|
|
50
|
+
this.flow_name = event.flowName;
|
|
51
|
+
this.flow_node_id = event.flowNodeId;
|
|
52
|
+
this.flow_node_content_id = event.flowNodeContentId;
|
|
53
|
+
this.flow_node_is_meaningful = event.flowNodeIsMeaningful;
|
|
54
|
+
this.tools_executed = event.toolsExecuted.map((tool)=>this.getToolExecutionInfo(tool));
|
|
55
|
+
this.memory_length = event.memoryLength;
|
|
56
|
+
this.input_message_id = event.inputMessageId;
|
|
57
|
+
this.input_guardrails_triggered = event.inputGuardrailsTriggered;
|
|
58
|
+
this.output_guardrails_triggered = event.outputGuardrailsTriggered;
|
|
59
|
+
this.exit = event.exit;
|
|
60
|
+
this.error = event.error;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { HtEventAiAgent };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=ht-event-ai-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-ai-agent.js","sources":["../../src/event-models/ht-event-ai-agent.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport {\n EventAction,\n type EventAiAgent,\n EventType,\n type RequestData,\n type ToolExecution,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\ninterface ToolExecutionEventArgs {\n tool_name: string\n tool_arguments: Record<string, unknown>\n tool_results?: string\n knowledgebase_sources_ids?: string[]\n knowledgebase_chunks_ids?: string[]\n}\n\nexport class HtEventAiAgent extends HtEvent {\n flow_thread_id: string\n flow_id: string\n flow_name: string\n flow_node_id: string\n flow_node_content_id: string\n flow_node_is_meaningful: boolean\n tools_executed: ToolExecutionEventArgs[]\n memory_length: number\n input_message_id: string\n input_guardrails_triggered: string[]\n output_guardrails_triggered: string[]\n exit: boolean\n error: boolean\n\n constructor(event: EventAiAgent, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.AiAgent\n this.flow_thread_id = event.flowThreadId\n this.flow_id = event.flowId\n this.flow_name = event.flowName\n this.flow_node_id = event.flowNodeId\n this.flow_node_content_id = event.flowNodeContentId\n this.flow_node_is_meaningful = event.flowNodeIsMeaningful\n this.tools_executed = event.toolsExecuted.map(tool =>\n this.getToolExecutionInfo(tool)\n )\n this.memory_length = event.memoryLength\n this.input_message_id = event.inputMessageId\n this.input_guardrails_triggered = event.inputGuardrailsTriggered\n this.output_guardrails_triggered = event.outputGuardrailsTriggered\n this.exit = event.exit\n this.error = event.error\n }\n\n private truncateToolResults(toolResults?: string): string | undefined {\n const MAX_TOOL_RESULTS_LENGTH_IN_KB = 16 * 1024 // 16384 characters\n if (!toolResults) {\n return undefined\n }\n return toolResults.length > MAX_TOOL_RESULTS_LENGTH_IN_KB\n ? `${toolResults.slice(0, MAX_TOOL_RESULTS_LENGTH_IN_KB - 3)}...`\n : toolResults\n }\n\n private getToolExecutionInfo(\n toolExecution: ToolExecution\n ): ToolExecutionEventArgs {\n const knowledgeBaseArgs: {\n knowledgebase_sources_ids?: string[]\n knowledgebase_chunks_ids?: string[]\n } = {}\n\n if (toolExecution.knowledgebaseSourcesIds) {\n knowledgeBaseArgs.knowledgebase_sources_ids =\n toolExecution.knowledgebaseSourcesIds\n }\n\n if (toolExecution.knowledgebaseChunksIds) {\n knowledgeBaseArgs.knowledgebase_chunks_ids =\n toolExecution.knowledgebaseChunksIds\n }\n\n const truncatedToolResults = this.truncateToolResults(\n toolExecution.toolResults ?? ''\n )\n\n return {\n tool_name: toolExecution.toolName,\n tool_arguments: toolExecution.toolArguments,\n tool_results: truncatedToolResults,\n ...knowledgeBaseArgs,\n }\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventAiAgent","toolResults","MAX_TOOL_RESULTS_LENGTH_IN_KB","undefined","toolExecution","knowledgeBaseArgs","truncatedToolResults","event","requestData","tool"],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAuD,GAOtC;AACmB;AAU7B,MAAMG,cAAcA,SAASD,OAAOA;IAoCjC,oBAAoBE,WAAoB,EAAsB;QACpE,MAAMC,gCAAgC,KAAK,KAAK,mBAAmB;;QACnE,IAAI,CAACD,aAAa;YAChB,OAAOE;QACT;QACA,OAAOF,YAAY,MAAM,GAAGC,gCACxB,GAAGD,YAAY,KAAK,CAAC,GAAGC,gCAAgC,GAAG,GAAG,CAAC,GAC/DD;IACN;IAEQ,qBACNG,aAA4B,EACJ;QACxB,MAAMC,oBAGF,CAAC;QAEL,IAAID,cAAc,uBAAuB,EAAE;YACzCC,kBAAkB,yBAAyB,GACzCD,cAAc,uBAAuB;QACzC;QAEA,IAAIA,cAAc,sBAAsB,EAAE;YACxCC,kBAAkB,wBAAwB,GACxCD,cAAc,sBAAsB;QACxC;QAEA,MAAME,uBAAuB,IAAI,CAAC,mBAAmB,CACnDF,cAAc,WAAW,IAAI;QAG/B,OAAO;YACL,WAAWA,cAAc,QAAQ;YACjC,gBAAgBA,cAAc,aAAa;YAC3C,cAAcE;YACd,GAAGD,iBAAiB;QACtB;IACF;IA3DA,YAAYE,KAAmB,EAAEC,WAAwB,CAAE;QACzD,KAAK,CAACD,OAAOC,cAff,kDACA,2CACA,6CACA,gDACA,wDACA,2DACA,kDACA,iDACA,oDACA,8DACA,+DACA,wCACA;QAIE,IAAI,CAAC,IAAI,GAAGV,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,mBAAmB;QACjC,IAAI,CAAC,cAAc,GAAGU,MAAM,YAAY;QACxC,IAAI,CAAC,OAAO,GAAGA,MAAM,MAAM;QAC3B,IAAI,CAAC,SAAS,GAAGA,MAAM,QAAQ;QAC/B,IAAI,CAAC,YAAY,GAAGA,MAAM,UAAU;QACpC,IAAI,CAAC,oBAAoB,GAAGA,MAAM,iBAAiB;QACnD,IAAI,CAAC,uBAAuB,GAAGA,MAAM,oBAAoB;QACzD,IAAI,CAAC,cAAc,GAAGA,MAAM,aAAa,CAAC,GAAG,CAACE,CAAAA,OAC5C,IAAI,CAAC,oBAAoB,CAACA;QAE5B,IAAI,CAAC,aAAa,GAAGF,MAAM,YAAY;QACvC,IAAI,CAAC,gBAAgB,GAAGA,MAAM,cAAc;QAC5C,IAAI,CAAC,0BAA0B,GAAGA,MAAM,wBAAwB;QAChE,IAAI,CAAC,2BAA2B,GAAGA,MAAM,yBAAyB;QAClE,IAAI,CAAC,IAAI,GAAGA,MAAM,IAAI;QACtB,IAAI,CAAC,KAAK,GAAGA,MAAM,KAAK;IAC1B;AAyCF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EventBotAction, type RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
1
|
+
import { type EventBotAction, type RequestData } from '../types.js';
|
|
2
|
+
import { HtEvent } from './ht-event.js';
|
|
3
3
|
export declare class HtEventBotAction extends HtEvent {
|
|
4
4
|
flow_thread_id: string;
|
|
5
5
|
flow_id: string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EventAction, EventType } from "../types.js";
|
|
2
|
+
import { HtEvent } from "./ht-event.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function _define_property(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else obj[key] = value;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HtEventBotAction extends HtEvent {
|
|
20
|
+
constructor(event, requestData){
|
|
21
|
+
super(event, requestData), _define_property(this, "flow_thread_id", void 0), _define_property(this, "flow_id", void 0), _define_property(this, "flow_name", void 0), _define_property(this, "flow_node_id", void 0), _define_property(this, "flow_node_content_id", void 0), _define_property(this, "flow_node_is_meaningful", void 0), _define_property(this, "payload", void 0);
|
|
22
|
+
this.type = EventType.BotEvent;
|
|
23
|
+
this.action = EventAction.BotAction;
|
|
24
|
+
this.flow_thread_id = event.flowThreadId;
|
|
25
|
+
this.flow_id = event.flowId;
|
|
26
|
+
this.flow_name = event.flowName;
|
|
27
|
+
this.flow_node_id = event.flowNodeId;
|
|
28
|
+
this.flow_node_content_id = event.flowNodeContentId;
|
|
29
|
+
this.flow_node_is_meaningful = event.flowNodeIsMeaningful;
|
|
30
|
+
this.payload = event.payload;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { HtEventBotAction };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=ht-event-bot-action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-bot-action.js","sources":["../../src/event-models/ht-event-bot-action.ts"],"sourcesContent":["import {\n EventAction,\n type EventBotAction,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventBotAction extends HtEvent {\n flow_thread_id: string\n flow_id: string\n flow_name: string\n flow_node_id: string\n flow_node_content_id: string\n flow_node_is_meaningful: boolean\n payload: string\n\n constructor(event: EventBotAction, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.BotAction\n this.flow_thread_id = event.flowThreadId\n this.flow_id = event.flowId\n this.flow_name = event.flowName\n this.flow_node_id = event.flowNodeId\n this.flow_node_content_id = event.flowNodeContentId\n this.flow_node_is_meaningful = event.flowNodeIsMeaningful\n this.payload = event.payload\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventBotAction","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,gBAAgBA,SAASD,OAAOA;IAS3C,YAAYE,KAAqB,EAAEC,WAAwB,CAAE;QAC3D,KAAK,CAACD,OAAOC,cATf,kDACA,2CACA,6CACA,gDACA,wDACA,2DACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,qBAAqB;QACnC,IAAI,CAAC,cAAc,GAAGI,MAAM,YAAY;QACxC,IAAI,CAAC,OAAO,GAAGA,MAAM,MAAM;QAC3B,IAAI,CAAC,SAAS,GAAGA,MAAM,QAAQ;QAC/B,IAAI,CAAC,YAAY,GAAGA,MAAM,UAAU;QACpC,IAAI,CAAC,oBAAoB,GAAGA,MAAM,iBAAiB;QACnD,IAAI,CAAC,uBAAuB,GAAGA,MAAM,oBAAoB;QACzD,IAAI,CAAC,OAAO,GAAGA,MAAM,OAAO;IAC9B;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EventCaptureUserInput, type RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
1
|
+
import { type EventCaptureUserInput, type RequestData } from '../types.js';
|
|
2
|
+
import { HtEvent } from './ht-event.js';
|
|
3
3
|
export declare class HtEventCaptureUserInput extends HtEvent {
|
|
4
4
|
flow_id: string;
|
|
5
5
|
flow_name: string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventAction, EventType } from "../types.js";
|
|
2
|
+
import { HtEvent } from "./ht-event.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function _define_property(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else obj[key] = value;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HtEventCaptureUserInput extends HtEvent {
|
|
20
|
+
constructor(event, requestData){
|
|
21
|
+
super(event, requestData), _define_property(this, "flow_id", void 0), _define_property(this, "flow_name", void 0), _define_property(this, "flow_node_id", void 0), _define_property(this, "flow_node_content_id", void 0), _define_property(this, "flow_thread_id", void 0), _define_property(this, "flow_node_is_meaningful", void 0), _define_property(this, "field_name", void 0), _define_property(this, "user_input", void 0), _define_property(this, "capture_success", void 0), _define_property(this, "message_id", void 0);
|
|
22
|
+
this.type = EventType.BotEvent;
|
|
23
|
+
this.action = EventAction.CaptureUserInput;
|
|
24
|
+
this.flow_id = event.flowId;
|
|
25
|
+
this.flow_name = event.flowName;
|
|
26
|
+
this.flow_node_id = event.flowNodeId;
|
|
27
|
+
this.flow_node_content_id = event.flowNodeContentId;
|
|
28
|
+
this.flow_thread_id = event.flowThreadId;
|
|
29
|
+
this.flow_node_is_meaningful = event.flowNodeIsMeaningful;
|
|
30
|
+
this.field_name = event.fieldName;
|
|
31
|
+
this.user_input = event.userInput;
|
|
32
|
+
this.capture_success = event.captureSuccess;
|
|
33
|
+
this.message_id = event.messageId;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { HtEventCaptureUserInput };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=ht-event-capture-user-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-capture-user-input.js","sources":["../../src/event-models/ht-event-capture-user-input.ts"],"sourcesContent":["import {\n EventAction,\n type EventCaptureUserInput,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventCaptureUserInput extends HtEvent {\n flow_id: string\n flow_name: string\n flow_node_id: string\n flow_node_content_id: string\n flow_thread_id: string\n flow_node_is_meaningful: boolean\n field_name: string\n user_input: string\n capture_success: boolean\n message_id: string\n\n constructor(event: EventCaptureUserInput, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.CaptureUserInput\n this.flow_id = event.flowId\n this.flow_name = event.flowName\n this.flow_node_id = event.flowNodeId\n this.flow_node_content_id = event.flowNodeContentId\n this.flow_thread_id = event.flowThreadId\n this.flow_node_is_meaningful = event.flowNodeIsMeaningful\n this.field_name = event.fieldName\n this.user_input = event.userInput\n this.capture_success = event.captureSuccess\n this.message_id = event.messageId\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventCaptureUserInput","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,uBAAuBA,SAASD,OAAOA;IAYlD,YAAYE,KAA4B,EAAEC,WAAwB,CAAE;QAClE,KAAK,CAACD,OAAOC,cAZf,2CACA,6CACA,gDACA,wDACA,kDACA,2DACA,8CACA,8CACA,mDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,4BAA4B;QAC1C,IAAI,CAAC,OAAO,GAAGI,MAAM,MAAM;QAC3B,IAAI,CAAC,SAAS,GAAGA,MAAM,QAAQ;QAC/B,IAAI,CAAC,YAAY,GAAGA,MAAM,UAAU;QACpC,IAAI,CAAC,oBAAoB,GAAGA,MAAM,iBAAiB;QACnD,IAAI,CAAC,cAAc,GAAGA,MAAM,YAAY;QACxC,IAAI,CAAC,uBAAuB,GAAGA,MAAM,oBAAoB;QACzD,IAAI,CAAC,UAAU,GAAGA,MAAM,SAAS;QACjC,IAAI,CAAC,UAAU,GAAGA,MAAM,SAAS;QACjC,IAAI,CAAC,eAAe,GAAGA,MAAM,cAAc;QAC3C,IAAI,CAAC,UAAU,GAAGA,MAAM,SAAS;IACnC;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EventConditionalChannel, type RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
1
|
+
import { type EventConditionalChannel, type RequestData } from '../types.js';
|
|
2
|
+
import { HtEvent } from './ht-event.js';
|
|
3
3
|
export declare class HtEventConditionalChannel extends HtEvent {
|
|
4
4
|
flow_thread_id: string;
|
|
5
5
|
flow_id: string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EventAction, EventType } from "../types.js";
|
|
2
|
+
import { HtEvent } from "./ht-event.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function _define_property(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else obj[key] = value;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HtEventConditionalChannel extends HtEvent {
|
|
20
|
+
constructor(event, requestData){
|
|
21
|
+
super(event, requestData), _define_property(this, "flow_thread_id", void 0), _define_property(this, "flow_id", void 0), _define_property(this, "flow_name", void 0), _define_property(this, "flow_node_id", void 0), _define_property(this, "flow_node_content_id", void 0), _define_property(this, "flow_node_is_meaningful", void 0), _define_property(this, "channel", void 0);
|
|
22
|
+
this.type = EventType.BotEvent;
|
|
23
|
+
this.action = EventAction.ConditionalChannel;
|
|
24
|
+
this.flow_thread_id = event.flowThreadId;
|
|
25
|
+
this.flow_id = event.flowId;
|
|
26
|
+
this.flow_name = event.flowName;
|
|
27
|
+
this.flow_node_id = event.flowNodeId;
|
|
28
|
+
this.flow_node_content_id = event.flowNodeContentId;
|
|
29
|
+
this.flow_node_is_meaningful = event.flowNodeIsMeaningful;
|
|
30
|
+
this.channel = event.channel;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { HtEventConditionalChannel };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=ht-event-conditional-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-conditional-channel.js","sources":["../../src/event-models/ht-event-conditional-channel.ts"],"sourcesContent":["import {\n EventAction,\n type EventConditionalChannel,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventConditionalChannel extends HtEvent {\n flow_thread_id: string\n flow_id: string\n flow_name: string\n flow_node_id: string\n flow_node_content_id: string\n flow_node_is_meaningful: boolean\n channel: string\n\n constructor(event: EventConditionalChannel, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.ConditionalChannel\n this.flow_thread_id = event.flowThreadId\n this.flow_id = event.flowId\n this.flow_name = event.flowName\n this.flow_node_id = event.flowNodeId\n this.flow_node_content_id = event.flowNodeContentId\n this.flow_node_is_meaningful = event.flowNodeIsMeaningful\n this.channel = event.channel\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventConditionalChannel","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,yBAAyBA,SAASD,OAAOA;IASpD,YAAYE,KAA8B,EAAEC,WAAwB,CAAE;QACpE,KAAK,CAACD,OAAOC,cATf,kDACA,2CACA,6CACA,gDACA,wDACA,2DACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,8BAA8B;QAC5C,IAAI,CAAC,cAAc,GAAGI,MAAM,YAAY;QACxC,IAAI,CAAC,OAAO,GAAGA,MAAM,MAAM;QAC3B,IAAI,CAAC,SAAS,GAAGA,MAAM,QAAQ;QAC/B,IAAI,CAAC,YAAY,GAAGA,MAAM,UAAU;QACpC,IAAI,CAAC,oBAAoB,GAAGA,MAAM,iBAAiB;QACnD,IAAI,CAAC,uBAAuB,GAAGA,MAAM,oBAAoB;QACzD,IAAI,CAAC,OAAO,GAAGA,MAAM,OAAO;IAC9B;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EventConditionalCountry, type RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
1
|
+
import { type EventConditionalCountry, type RequestData } from '../types.js';
|
|
2
|
+
import { HtEvent } from './ht-event.js';
|
|
3
3
|
export declare class HtEventConditionalCountry extends HtEvent {
|
|
4
4
|
flow_thread_id: string;
|
|
5
5
|
flow_id: string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EventAction, EventType } from "../types.js";
|
|
2
|
+
import { HtEvent } from "./ht-event.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function _define_property(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else obj[key] = value;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HtEventConditionalCountry extends HtEvent {
|
|
20
|
+
constructor(event, requestData){
|
|
21
|
+
super(event, requestData), _define_property(this, "flow_thread_id", void 0), _define_property(this, "flow_id", void 0), _define_property(this, "flow_name", void 0), _define_property(this, "flow_node_id", void 0), _define_property(this, "flow_node_content_id", void 0), _define_property(this, "flow_node_is_meaningful", void 0), _define_property(this, "country", void 0);
|
|
22
|
+
this.type = EventType.BotEvent;
|
|
23
|
+
this.action = EventAction.ConditionalCountry;
|
|
24
|
+
this.flow_thread_id = event.flowThreadId;
|
|
25
|
+
this.flow_id = event.flowId;
|
|
26
|
+
this.flow_name = event.flowName;
|
|
27
|
+
this.flow_node_id = event.flowNodeId;
|
|
28
|
+
this.flow_node_content_id = event.flowNodeContentId;
|
|
29
|
+
this.flow_node_is_meaningful = event.flowNodeIsMeaningful;
|
|
30
|
+
this.country = event.country;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { HtEventConditionalCountry };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=ht-event-conditional-country.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-conditional-country.js","sources":["../../src/event-models/ht-event-conditional-country.ts"],"sourcesContent":["import {\n EventAction,\n type EventConditionalCountry,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventConditionalCountry extends HtEvent {\n flow_thread_id: string\n flow_id: string\n flow_name: string\n flow_node_id: string\n flow_node_content_id: string\n flow_node_is_meaningful: boolean\n country: string\n\n constructor(event: EventConditionalCountry, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.ConditionalCountry\n this.flow_thread_id = event.flowThreadId\n this.flow_id = event.flowId\n this.flow_name = event.flowName\n this.flow_node_id = event.flowNodeId\n this.flow_node_content_id = event.flowNodeContentId\n this.flow_node_is_meaningful = event.flowNodeIsMeaningful\n this.country = event.country\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventConditionalCountry","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,yBAAyBA,SAASD,OAAOA;IASpD,YAAYE,KAA8B,EAAEC,WAAwB,CAAE;QACpE,KAAK,CAACD,OAAOC,cATf,kDACA,2CACA,6CACA,gDACA,wDACA,2DACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,8BAA8B;QAC5C,IAAI,CAAC,cAAc,GAAGI,MAAM,YAAY;QACxC,IAAI,CAAC,OAAO,GAAGA,MAAM,MAAM;QAC3B,IAAI,CAAC,SAAS,GAAGA,MAAM,QAAQ;QAC/B,IAAI,CAAC,YAAY,GAAGA,MAAM,UAAU;QACpC,IAAI,CAAC,oBAAoB,GAAGA,MAAM,iBAAiB;QACnD,IAAI,CAAC,uBAAuB,GAAGA,MAAM,oBAAoB;QACzD,IAAI,CAAC,OAAO,GAAGA,MAAM,OAAO;IAC9B;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EventConditionalCustom, type RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
1
|
+
import { type EventConditionalCustom, type RequestData } from '../types.js';
|
|
2
|
+
import { HtEvent } from './ht-event.js';
|
|
3
3
|
export declare class HtEventConditionalCustom extends HtEvent {
|
|
4
4
|
flow_thread_id: string;
|
|
5
5
|
flow_id: string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EventAction, EventType } from "../types.js";
|
|
2
|
+
import { HtEvent } from "./ht-event.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function _define_property(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else obj[key] = value;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HtEventConditionalCustom extends HtEvent {
|
|
20
|
+
constructor(event, requestData){
|
|
21
|
+
super(event, requestData), _define_property(this, "flow_thread_id", void 0), _define_property(this, "flow_id", void 0), _define_property(this, "flow_name", void 0), _define_property(this, "flow_node_id", void 0), _define_property(this, "flow_node_content_id", void 0), _define_property(this, "flow_node_is_meaningful", void 0), _define_property(this, "conditional_variable", void 0), _define_property(this, "variable_format", void 0), _define_property(this, "operator", void 0);
|
|
22
|
+
this.type = EventType.BotEvent;
|
|
23
|
+
this.action = EventAction.ConditionalCustom;
|
|
24
|
+
this.flow_thread_id = event.flowThreadId;
|
|
25
|
+
this.flow_id = event.flowId;
|
|
26
|
+
this.flow_name = event.flowName;
|
|
27
|
+
this.flow_node_id = event.flowNodeId;
|
|
28
|
+
this.flow_node_content_id = event.flowNodeContentId;
|
|
29
|
+
this.conditional_variable = event.conditionalVariable;
|
|
30
|
+
this.flow_node_is_meaningful = event.flowNodeIsMeaningful;
|
|
31
|
+
this.variable_format = event.variableFormat;
|
|
32
|
+
this.operator = event.operator;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { HtEventConditionalCustom };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=ht-event-conditional-custom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-conditional-custom.js","sources":["../../src/event-models/ht-event-conditional-custom.ts"],"sourcesContent":["import {\n EventAction,\n type EventConditionalCustom,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventConditionalCustom extends HtEvent {\n flow_thread_id: string\n flow_id: string\n flow_name: string\n flow_node_id: string\n flow_node_content_id: string\n flow_node_is_meaningful: boolean\n conditional_variable: string\n variable_format: string\n operator: string\n\n constructor(event: EventConditionalCustom, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.ConditionalCustom\n this.flow_thread_id = event.flowThreadId\n this.flow_id = event.flowId\n this.flow_name = event.flowName\n this.flow_node_id = event.flowNodeId\n this.flow_node_content_id = event.flowNodeContentId\n this.conditional_variable = event.conditionalVariable\n this.flow_node_is_meaningful = event.flowNodeIsMeaningful\n this.variable_format = event.variableFormat\n this.operator = event.operator\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventConditionalCustom","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,wBAAwBA,SAASD,OAAOA;IAWnD,YAAYE,KAA6B,EAAEC,WAAwB,CAAE;QACnE,KAAK,CAACD,OAAOC,cAXf,kDACA,2CACA,6CACA,gDACA,wDACA,2DACA,wDACA,mDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,6BAA6B;QAC3C,IAAI,CAAC,cAAc,GAAGI,MAAM,YAAY;QACxC,IAAI,CAAC,OAAO,GAAGA,MAAM,MAAM;QAC3B,IAAI,CAAC,SAAS,GAAGA,MAAM,QAAQ;QAC/B,IAAI,CAAC,YAAY,GAAGA,MAAM,UAAU;QACpC,IAAI,CAAC,oBAAoB,GAAGA,MAAM,iBAAiB;QACnD,IAAI,CAAC,oBAAoB,GAAGA,MAAM,mBAAmB;QACrD,IAAI,CAAC,uBAAuB,GAAGA,MAAM,oBAAoB;QACzD,IAAI,CAAC,eAAe,GAAGA,MAAM,cAAc;QAC3C,IAAI,CAAC,QAAQ,GAAGA,MAAM,QAAQ;IAChC;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EventConditionalQueueStatus, type RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
1
|
+
import { type EventConditionalQueueStatus, type RequestData } from '../types.js';
|
|
2
|
+
import { HtEvent } from './ht-event.js';
|
|
3
3
|
export declare class HtEventConditionalQueueStatus extends HtEvent {
|
|
4
4
|
flow_thread_id: string;
|
|
5
5
|
flow_id: string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { EventAction, EventType } from "../types.js";
|
|
2
|
+
import { HtEvent } from "./ht-event.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function _define_property(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else obj[key] = value;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HtEventConditionalQueueStatus extends HtEvent {
|
|
20
|
+
constructor(event, requestData){
|
|
21
|
+
super(event, requestData), _define_property(this, "flow_thread_id", void 0), _define_property(this, "flow_id", void 0), _define_property(this, "flow_name", void 0), _define_property(this, "flow_node_id", void 0), _define_property(this, "flow_node_content_id", void 0), _define_property(this, "flow_node_is_meaningful", void 0), _define_property(this, "queue_id", void 0), _define_property(this, "queue_name", void 0), _define_property(this, "is_queue_open", void 0), _define_property(this, "is_available_agent", void 0);
|
|
22
|
+
this.type = EventType.BotEvent;
|
|
23
|
+
this.action = EventAction.ConditionalQueueStatus;
|
|
24
|
+
this.flow_thread_id = event.flowThreadId;
|
|
25
|
+
this.flow_id = event.flowId;
|
|
26
|
+
this.flow_name = event.flowName;
|
|
27
|
+
this.flow_node_id = event.flowNodeId;
|
|
28
|
+
this.flow_node_content_id = event.flowNodeContentId;
|
|
29
|
+
this.flow_node_is_meaningful = event.flowNodeIsMeaningful;
|
|
30
|
+
this.queue_id = event.queueId;
|
|
31
|
+
this.queue_name = event.queueName;
|
|
32
|
+
this.is_queue_open = event.isQueueOpen;
|
|
33
|
+
this.is_available_agent = event.isAvailableAgent;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { HtEventConditionalQueueStatus };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=ht-event-conditional-queue-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-conditional-queue-status.js","sources":["../../src/event-models/ht-event-conditional-queue-status.ts"],"sourcesContent":["import {\n EventAction,\n type EventConditionalQueueStatus,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventConditionalQueueStatus extends HtEvent {\n flow_thread_id: string\n flow_id: string\n flow_name: string\n flow_node_id: string\n flow_node_content_id: string\n flow_node_is_meaningful: boolean\n queue_id: string\n queue_name: string\n is_queue_open: boolean\n is_available_agent: boolean\n\n constructor(event: EventConditionalQueueStatus, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.ConditionalQueueStatus\n this.flow_thread_id = event.flowThreadId\n this.flow_id = event.flowId\n this.flow_name = event.flowName\n this.flow_node_id = event.flowNodeId\n this.flow_node_content_id = event.flowNodeContentId\n this.flow_node_is_meaningful = event.flowNodeIsMeaningful\n this.queue_id = event.queueId\n this.queue_name = event.queueName\n this.is_queue_open = event.isQueueOpen\n this.is_available_agent = event.isAvailableAgent\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventConditionalQueueStatus","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,6BAA6BA,SAASD,OAAOA;IAYxD,YAAYE,KAAkC,EAAEC,WAAwB,CAAE;QACxE,KAAK,CAACD,OAAOC,cAZf,kDACA,2CACA,6CACA,gDACA,wDACA,2DACA,4CACA,8CACA,iDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,kCAAkC;QAChD,IAAI,CAAC,cAAc,GAAGI,MAAM,YAAY;QACxC,IAAI,CAAC,OAAO,GAAGA,MAAM,MAAM;QAC3B,IAAI,CAAC,SAAS,GAAGA,MAAM,QAAQ;QAC/B,IAAI,CAAC,YAAY,GAAGA,MAAM,UAAU;QACpC,IAAI,CAAC,oBAAoB,GAAGA,MAAM,iBAAiB;QACnD,IAAI,CAAC,uBAAuB,GAAGA,MAAM,oBAAoB;QACzD,IAAI,CAAC,QAAQ,GAAGA,MAAM,OAAO;QAC7B,IAAI,CAAC,UAAU,GAAGA,MAAM,SAAS;QACjC,IAAI,CAAC,aAAa,GAAGA,MAAM,WAAW;QACtC,IAAI,CAAC,kBAAkB,GAAGA,MAAM,gBAAgB;IAClD;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EventCustom, type RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
1
|
+
import { type EventCustom, type RequestData } from '../types.js';
|
|
2
|
+
import { HtEvent } from './ht-event.js';
|
|
3
3
|
export declare class HtEventCustom extends HtEvent {
|
|
4
4
|
custom_fields: Record<string, unknown>;
|
|
5
5
|
custom_sensitive_fields: Record<string, unknown>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EventAction, EventType } from "../types.js";
|
|
2
|
+
import { HtEvent } from "./ht-event.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function _define_property(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else obj[key] = value;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HtEventCustom extends HtEvent {
|
|
20
|
+
constructor(event, requestData){
|
|
21
|
+
super(event, requestData), _define_property(this, "custom_fields", void 0), _define_property(this, "custom_sensitive_fields", void 0);
|
|
22
|
+
this.type = EventType.WebEvent;
|
|
23
|
+
this.action = EventAction.Custom;
|
|
24
|
+
this.custom_fields = event.customFields || {};
|
|
25
|
+
this.custom_sensitive_fields = event.customSensitiveFields || {};
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { HtEventCustom };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=ht-event-custom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-custom.js","sources":["../../src/event-models/ht-event-custom.ts"],"sourcesContent":["import {\n EventAction,\n type EventCustom,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventCustom extends HtEvent {\n custom_fields: Record<string, unknown>\n custom_sensitive_fields: Record<string, unknown>\n\n constructor(event: EventCustom, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.WebEvent\n this.action = EventAction.Custom\n this.custom_fields = event.customFields || {}\n this.custom_sensitive_fields = event.customSensitiveFields || {}\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventCustom","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,aAAaA,SAASD,OAAOA;IAIxC,YAAYE,KAAkB,EAAEC,WAAwB,CAAE;QACxD,KAAK,CAACD,OAAOC,cAJf,iDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,kBAAkB;QAChC,IAAI,CAAC,aAAa,GAAGI,MAAM,YAAY,IAAI,CAAC;QAC5C,IAAI,CAAC,uBAAuB,GAAGA,MAAM,qBAAqB,IAAI,CAAC;IACjE;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EventFallback, type RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
1
|
+
import { type EventFallback, type RequestData } from '../types.js';
|
|
2
|
+
import { HtEvent } from './ht-event.js';
|
|
3
3
|
export declare class HtEventFallback extends HtEvent {
|
|
4
4
|
flow_id: string;
|
|
5
5
|
flow_name: string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EventAction, EventType } from "../types.js";
|
|
2
|
+
import { HtEvent } from "./ht-event.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function _define_property(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else obj[key] = value;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HtEventFallback extends HtEvent {
|
|
20
|
+
constructor(event, requestData){
|
|
21
|
+
super(event, requestData), _define_property(this, "flow_id", void 0), _define_property(this, "flow_name", void 0), _define_property(this, "flow_node_id", void 0), _define_property(this, "flow_node_content_id", void 0), _define_property(this, "fallback_out", void 0), _define_property(this, "fallback_message_id", void 0), _define_property(this, "user_input", void 0);
|
|
22
|
+
this.type = EventType.BotEvent;
|
|
23
|
+
this.action = EventAction.Fallback;
|
|
24
|
+
this.flow_id = event.flowId;
|
|
25
|
+
this.flow_name = event.flowName;
|
|
26
|
+
this.flow_node_id = event.flowNodeId;
|
|
27
|
+
this.flow_node_content_id = event.flowNodeContentId;
|
|
28
|
+
this.user_input = event.userInput;
|
|
29
|
+
this.fallback_out = event.fallbackOut;
|
|
30
|
+
this.fallback_message_id = event.fallbackMessageId;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { HtEventFallback };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=ht-event-fallback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-fallback.js","sources":["../../src/event-models/ht-event-fallback.ts"],"sourcesContent":["import {\n EventAction,\n type EventFallback,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventFallback extends HtEvent {\n flow_id: string\n flow_name: string\n flow_node_id: string\n flow_node_content_id: string\n fallback_out: number\n fallback_message_id: string\n user_input: string\n\n constructor(event: EventFallback, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.Fallback\n this.flow_id = event.flowId\n this.flow_name = event.flowName\n this.flow_node_id = event.flowNodeId\n this.flow_node_content_id = event.flowNodeContentId\n this.user_input = event.userInput\n this.fallback_out = event.fallbackOut\n this.fallback_message_id = event.fallbackMessageId\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventFallback","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,eAAeA,SAASD,OAAOA;IAS1C,YAAYE,KAAoB,EAAEC,WAAwB,CAAE;QAC1D,KAAK,CAACD,OAAOC,cATf,2CACA,6CACA,gDACA,wDACA,gDACA,uDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,oBAAoB;QAClC,IAAI,CAAC,OAAO,GAAGI,MAAM,MAAM;QAC3B,IAAI,CAAC,SAAS,GAAGA,MAAM,QAAQ;QAC/B,IAAI,CAAC,YAAY,GAAGA,MAAM,UAAU;QACpC,IAAI,CAAC,oBAAoB,GAAGA,MAAM,iBAAiB;QACnD,IAAI,CAAC,UAAU,GAAGA,MAAM,SAAS;QACjC,IAAI,CAAC,YAAY,GAAGA,MAAM,WAAW;QACrC,IAAI,CAAC,mBAAmB,GAAGA,MAAM,iBAAiB;IACpD;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type EventAction, type EventFeedback, type RequestData } from '../types';
|
|
2
|
-
import { HtEvent } from './ht-event';
|
|
1
|
+
import { type EventAction, type EventFeedback, type RequestData } from '../types.js';
|
|
2
|
+
import { HtEvent } from './ht-event.js';
|
|
3
3
|
export declare class HtEventFeedback extends HtEvent {
|
|
4
4
|
action: EventAction.FeedbackCase | EventAction.FeedbackConversation | EventAction.FeedbackMessage | EventAction.FeedbackWebview;
|
|
5
5
|
feedback_target_id: string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EventType } from "../types.js";
|
|
2
|
+
import { HtEvent } from "./ht-event.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function _define_property(obj, key, value) {
|
|
7
|
+
if (key in obj) {
|
|
8
|
+
Object.defineProperty(obj, key, {
|
|
9
|
+
value: value,
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true
|
|
13
|
+
});
|
|
14
|
+
} else obj[key] = value;
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HtEventFeedback extends HtEvent {
|
|
20
|
+
constructor(event, requestData){
|
|
21
|
+
super(event, requestData), _define_property(this, "action", void 0), _define_property(this, "feedback_target_id", void 0), _define_property(this, "feedback_group_id", void 0), _define_property(this, "possible_options", void 0), _define_property(this, "possible_values", void 0), _define_property(this, "option", void 0), _define_property(this, "value", void 0), _define_property(this, "comment", void 0);
|
|
22
|
+
this.type = EventType.WebEvent;
|
|
23
|
+
this.action = event.action;
|
|
24
|
+
this.feedback_target_id = event.feedbackTargetId;
|
|
25
|
+
this.feedback_group_id = event.feedbackGroupId;
|
|
26
|
+
this.possible_options = event.possibleOptions;
|
|
27
|
+
this.possible_values = event.possibleValues;
|
|
28
|
+
this.option = event.option;
|
|
29
|
+
this.value = event.value;
|
|
30
|
+
this.comment = event.comment;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { HtEventFeedback };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=ht-event-feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-feedback.js","sources":["../../src/event-models/ht-event-feedback.ts"],"sourcesContent":["import {\n type EventAction,\n type EventFeedback,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventFeedback extends HtEvent {\n action:\n | EventAction.FeedbackCase\n | EventAction.FeedbackConversation\n | EventAction.FeedbackMessage\n | EventAction.FeedbackWebview\n feedback_target_id: string\n feedback_group_id: string\n possible_options: string[]\n possible_values?: number[]\n option: string\n value?: number\n comment?: string\n\n constructor(event: EventFeedback, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.WebEvent\n this.action = event.action\n this.feedback_target_id = event.feedbackTargetId\n this.feedback_group_id = event.feedbackGroupId\n this.possible_options = event.possibleOptions\n this.possible_values = event.possibleValues\n this.option = event.option\n this.value = event.value\n this.comment = event.comment\n }\n}\n"],"names":["EventType","HtEvent","HtEventFeedback","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAME,eAAeA,SAASD,OAAOA;IAc1C,YAAYE,KAAoB,EAAEC,WAAwB,CAAE;QAC1D,KAAK,CAACD,OAAOC,cAdf,0CAKA,sDACA,qDACA,oDACA,mDACA,0CACA,yCACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGG,MAAM,MAAM;QAC1B,IAAI,CAAC,kBAAkB,GAAGA,MAAM,gBAAgB;QAChD,IAAI,CAAC,iBAAiB,GAAGA,MAAM,eAAe;QAC9C,IAAI,CAAC,gBAAgB,GAAGA,MAAM,eAAe;QAC7C,IAAI,CAAC,eAAe,GAAGA,MAAM,cAAc;QAC3C,IAAI,CAAC,MAAM,GAAGA,MAAM,MAAM;QAC1B,IAAI,CAAC,KAAK,GAAGA,MAAM,KAAK;QACxB,IAAI,CAAC,OAAO,GAAGA,MAAM,OAAO;IAC9B;AACF"}
|