@botonic/plugin-hubtype-analytics 0.57.0-rslib-esm.0 → 0.57.0-rslib-esm.2
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/event-models/ht-event-ai-agent-router.js.map +1 -0
- package/lib/event-models/ht-event-ai-agent.js.map +1 -0
- package/lib/event-models/ht-event-bot-action.js.map +1 -0
- package/lib/event-models/ht-event-capture-user-input.js.map +1 -0
- package/lib/event-models/ht-event-conditional-channel.js.map +1 -0
- package/lib/event-models/ht-event-conditional-country.js.map +1 -0
- package/lib/event-models/ht-event-conditional-custom.js.map +1 -0
- package/lib/event-models/ht-event-conditional-queue-status.js.map +1 -0
- package/lib/event-models/ht-event-custom.js.map +1 -0
- package/lib/event-models/ht-event-fallback.js.map +1 -0
- package/lib/event-models/ht-event-feedback.js.map +1 -0
- package/lib/event-models/ht-event-flow.js.map +1 -0
- package/lib/event-models/ht-event-handoff-option.js.map +1 -0
- package/lib/event-models/ht-event-handoff.js.map +1 -0
- package/lib/event-models/ht-event-intent-smart.js.map +1 -0
- package/lib/event-models/ht-event-keyword.js.map +1 -0
- package/lib/event-models/ht-event-redirect-flow.js.map +1 -0
- package/lib/event-models/ht-event-webview-action-triggered.js.map +1 -0
- package/lib/event-models/ht-event-webview-end.js.map +1 -0
- package/lib/event-models/ht-event-webview-step.js.map +1 -0
- package/lib/event-models/ht-event.js.map +1 -0
- package/lib/event-models/index.js.map +1 -0
- package/lib/{esm/index.d.ts → index.d.ts} +4 -1
- package/lib/index.js.map +1 -0
- package/lib/{esm/types.d.ts → types.d.ts} +1 -1
- package/lib/types.js.map +1 -0
- package/lib/utils.js.map +1 -0
- package/package.json +9 -8
- package/src/types.ts +1 -1
- package/lib/esm/event-models/ht-event-ai-agent-router.js.map +0 -1
- package/lib/esm/event-models/ht-event-ai-agent.js.map +0 -1
- package/lib/esm/event-models/ht-event-bot-action.js.map +0 -1
- package/lib/esm/event-models/ht-event-capture-user-input.js.map +0 -1
- package/lib/esm/event-models/ht-event-conditional-channel.js.map +0 -1
- package/lib/esm/event-models/ht-event-conditional-country.js.map +0 -1
- package/lib/esm/event-models/ht-event-conditional-custom.js.map +0 -1
- package/lib/esm/event-models/ht-event-conditional-queue-status.js.map +0 -1
- package/lib/esm/event-models/ht-event-custom.js.map +0 -1
- package/lib/esm/event-models/ht-event-fallback.js.map +0 -1
- package/lib/esm/event-models/ht-event-feedback.js.map +0 -1
- package/lib/esm/event-models/ht-event-flow.js.map +0 -1
- package/lib/esm/event-models/ht-event-handoff-option.js.map +0 -1
- package/lib/esm/event-models/ht-event-handoff.js.map +0 -1
- package/lib/esm/event-models/ht-event-intent-smart.js.map +0 -1
- package/lib/esm/event-models/ht-event-keyword.js.map +0 -1
- package/lib/esm/event-models/ht-event-redirect-flow.js.map +0 -1
- package/lib/esm/event-models/ht-event-webview-action-triggered.js.map +0 -1
- package/lib/esm/event-models/ht-event-webview-end.js.map +0 -1
- package/lib/esm/event-models/ht-event-webview-step.js.map +0 -1
- package/lib/esm/event-models/ht-event.js.map +0 -1
- package/lib/esm/event-models/index.js.map +0 -1
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/esm/types.js.map +0 -1
- package/lib/esm/utils.js.map +0 -1
- /package/lib/{esm/event-models → event-models}/ht-event-ai-agent-router.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-ai-agent-router.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-ai-agent.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-ai-agent.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-bot-action.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-bot-action.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-capture-user-input.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-capture-user-input.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-conditional-channel.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-conditional-channel.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-conditional-country.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-conditional-country.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-conditional-custom.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-conditional-custom.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-conditional-queue-status.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-conditional-queue-status.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-custom.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-custom.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-fallback.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-fallback.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-feedback.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-feedback.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-flow.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-flow.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-handoff-option.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-handoff-option.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-handoff.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-handoff.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-intent-smart.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-intent-smart.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-keyword.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-keyword.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-redirect-flow.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-redirect-flow.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-webview-action-triggered.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-webview-action-triggered.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-webview-end.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-webview-end.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-webview-step.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event-webview-step.js +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/ht-event.js +0 -0
- /package/lib/{esm/event-models → event-models}/index.d.ts +0 -0
- /package/lib/{esm/event-models → event-models}/index.js +0 -0
- /package/lib/{esm/index.js → index.js} +0 -0
- /package/lib/{esm/types.js → types.js} +0 -0
- /package/lib/{esm/utils.d.ts → utils.d.ts} +0 -0
- /package/lib/{esm/utils.js → utils.js} +0 -0
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-flow.js","sources":["../../src/event-models/ht-event-flow.ts"],"sourcesContent":["import {\n EventAction,\n type EventFlow,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventFlow 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\n constructor(event: EventFlow, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.FlowNode\n this.flow_thread_id = event.flowThreadId // This value is managed by the flow builder plugin, stored in the session and updated every time the content connected to the conversation start is displayed\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 || false\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventFlow","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,WAAWA,SAASD,OAAOA;IAQtC,YAAYE,KAAgB,EAAEC,WAAwB,CAAE;QACtD,KAAK,CAACD,OAAOC,cARf,kDACA,2CACA,6CACA,gDACA,wDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,oBAAoB;QAClC,IAAI,CAAC,cAAc,GAAGI,MAAM,YAAY,EAAC,8JAA8J;QACvM,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,IAAI;IAC/D;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-handoff-option.js","sources":["../../src/event-models/ht-event-handoff-option.ts"],"sourcesContent":["import {\n type EventAction,\n type EventHandoffOption,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventHandoffOption extends HtEvent {\n action: EventAction.HandoffOption\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 handoff_queue_id?: string\n handoff_queue_name?: string\n\n constructor(event: EventHandoffOption, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\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.handoff_queue_id = event.queueId\n this.handoff_queue_name = event.queueName\n }\n}\n"],"names":["EventType","HtEvent","HtEventHandoffOption","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAME,oBAAoBA,SAASD,OAAOA;IAU/C,YAAYE,KAAyB,EAAEC,WAAwB,CAAE;QAC/D,KAAK,CAACD,OAAOC,cAVf,0CACA,kDACA,2CACA,6CACA,gDACA,wDACA,oDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,cAAc,GAAGG,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,gBAAgB,GAAGA,MAAM,OAAO;QACrC,IAAI,CAAC,kBAAkB,GAAGA,MAAM,SAAS;IAC3C;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-handoff.js","sources":["../../src/event-models/ht-event-handoff.ts"],"sourcesContent":["import {\n type EventAction,\n type EventHandoff,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventHandoff extends HtEvent {\n action: EventAction.HandoffSuccess | EventAction.HandoffFail\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 handoff_queue_id: string\n handoff_queue_name: string\n handoff_case_id?: string\n handoff_is_queue_open: boolean\n handoff_is_available_agent: boolean\n handoff_is_threshold_reached: boolean\n\n constructor(event: EventHandoff, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = event.action\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.handoff_queue_id = event.queueId\n this.handoff_queue_name = event.queueName\n this.handoff_case_id = event.caseId\n this.handoff_is_queue_open = event.isQueueOpen || false\n this.handoff_is_available_agent = event.isAvailableAgent || false\n this.handoff_is_threshold_reached = event.isThresholdReached || false\n }\n}\n"],"names":["EventType","HtEvent","HtEventHandoff","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAME,cAAcA,SAASD,OAAOA;IAczC,YAAYE,KAAmB,EAAEC,WAAwB,CAAE;QACzD,KAAK,CAACD,OAAOC,cAdf,0CACA,kDACA,2CACA,6CACA,gDACA,wDACA,oDACA,sDACA,mDACA,yDACA,8DACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGG,MAAM,MAAM;QAC1B,IAAI,CAAC,cAAc,GAAGA,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,gBAAgB,GAAGA,MAAM,OAAO;QACrC,IAAI,CAAC,kBAAkB,GAAGA,MAAM,SAAS;QACzC,IAAI,CAAC,eAAe,GAAGA,MAAM,MAAM;QACnC,IAAI,CAAC,qBAAqB,GAAGA,MAAM,WAAW,IAAI;QAClD,IAAI,CAAC,0BAA0B,GAAGA,MAAM,gBAAgB,IAAI;QAC5D,IAAI,CAAC,4BAA4B,GAAGA,MAAM,kBAAkB,IAAI;IAClE;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-intent-smart.js","sources":["../../src/event-models/ht-event-intent-smart.ts"],"sourcesContent":["import {\n EventAction,\n type EventIntentSmart,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventIntentSmart extends HtEvent {\n nlu_intent_smart_title: string\n nlu_intent_smart_num_used: number\n nlu_intent_smart_message_id: string\n user_input: string\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\n constructor(event: EventIntentSmart, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.IntentSmart\n this.nlu_intent_smart_title = event.nluIntentSmartTitle\n this.nlu_intent_smart_num_used = event.nluIntentSmartNumUsed\n this.nlu_intent_smart_message_id = event.nluIntentSmartMessageId\n this.user_input = event.userInput\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 }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventIntentSmart","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,kBAAkBA,SAASD,OAAOA;IAW7C,YAAYE,KAAuB,EAAEC,WAAwB,CAAE;QAC7D,KAAK,CAACD,OAAOC,cAXf,0DACA,6DACA,+DACA,8CACA,kDACA,2CACA,6CACA,gDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,uBAAuB;QACrC,IAAI,CAAC,sBAAsB,GAAGI,MAAM,mBAAmB;QACvD,IAAI,CAAC,yBAAyB,GAAGA,MAAM,qBAAqB;QAC5D,IAAI,CAAC,2BAA2B,GAAGA,MAAM,uBAAuB;QAChE,IAAI,CAAC,UAAU,GAAGA,MAAM,SAAS;QACjC,IAAI,CAAC,cAAc,GAAGA,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;IACrD;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-keyword.js","sources":["../../src/event-models/ht-event-keyword.ts"],"sourcesContent":["import {\n EventAction,\n type EventKeyword,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventKeyword extends HtEvent {\n nlu_keyword_name: string\n nlu_keyword_is_regex: boolean\n nlu_keyword_message_id: string\n user_input: string\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\n constructor(event: EventKeyword, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.Keyword\n this.nlu_keyword_name = event.nluKeywordName\n this.nlu_keyword_is_regex = event.nluKeywordIsRegex || false\n this.nlu_keyword_message_id = event.nluKeywordMessageId\n this.user_input = event.userInput\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 }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventKeyword","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,cAAcA,SAASD,OAAOA;IAWzC,YAAYE,KAAmB,EAAEC,WAAwB,CAAE;QACzD,KAAK,CAACD,OAAOC,cAXf,oDACA,wDACA,0DACA,8CACA,kDACA,2CACA,6CACA,gDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,mBAAmB;QACjC,IAAI,CAAC,gBAAgB,GAAGI,MAAM,cAAc;QAC5C,IAAI,CAAC,oBAAoB,GAAGA,MAAM,iBAAiB,IAAI;QACvD,IAAI,CAAC,sBAAsB,GAAGA,MAAM,mBAAmB;QACvD,IAAI,CAAC,UAAU,GAAGA,MAAM,SAAS;QACjC,IAAI,CAAC,cAAc,GAAGA,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;IACrD;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-redirect-flow.js","sources":["../../src/event-models/ht-event-redirect-flow.ts"],"sourcesContent":["import type { EventRedirectFlow } from '@botonic/core'\n\nimport { EventAction, EventType, type RequestData } from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventRedirectFlow 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 flow_target_id: string\n flow_target_name: string\n\n constructor(event: EventRedirectFlow, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.RedirectFlow\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.flow_target_id = event.flowTargetId\n this.flow_target_name = event.flowTargetName\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventRedirectFlow","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAEmE;AAC/B;AAE7B,MAAMG,mBAAmBA,SAASD,OAAOA;IAU9C,YAAYE,KAAwB,EAAEC,WAAwB,CAAE;QAC9D,KAAK,CAACD,OAAOC,cAVf,kDACA,2CACA,6CACA,gDACA,wDACA,2DACA,kDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,wBAAwB;QACtC,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,cAAc,GAAGA,MAAM,YAAY;QACxC,IAAI,CAAC,gBAAgB,GAAGA,MAAM,cAAc;IAC9C;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-webview-action-triggered.js","sources":["../../src/event-models/ht-event-webview-action-triggered.ts"],"sourcesContent":["import {\n EventAction,\n EventType,\n type EventWebviewActionTriggered,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventWebviewActionTriggered 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 webview_name: string\n webview_target_id: string\n webview_params?: Record<string, string>\n\n constructor(event: EventWebviewActionTriggered, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.WebviewActionTriggered\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.webview_name = event.webviewName\n this.webview_target_id = event.webviewTargetId\n this.webview_params = event.webviewParams\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventWebviewActionTriggered","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,6BAA6BA,SAASD,OAAOA;IAWxD,YAAYE,KAAkC,EAAEC,WAAwB,CAAE;QACxE,KAAK,CAACD,OAAOC,cAXf,kDACA,2CACA,6CACA,gDACA,wDACA,2DACA,gDACA,qDACA;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,YAAY,GAAGA,MAAM,WAAW;QACrC,IAAI,CAAC,iBAAiB,GAAGA,MAAM,eAAe;QAC9C,IAAI,CAAC,cAAc,GAAGA,MAAM,aAAa;IAC3C;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-webview-end.js","sources":["../../src/event-models/ht-event-webview-end.ts"],"sourcesContent":["import {\n type EventAction,\n EventType,\n type EventWebviewEnd,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventWebviewEnd extends HtEvent {\n action: EventAction.WebviewEnd\n flow_thread_id?: string\n webview_thread_id: string\n webview_name: string\n webview_end_step_name?: string\n webview_end_step_n?: number\n webview_end_fail_type?: string\n webview_end_fail_message?: string\n\n constructor(event: EventWebviewEnd, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.WebEvent\n this.action = event.action\n this.flow_thread_id = event.flowThreadId\n this.webview_thread_id = event.webviewThreadId\n this.webview_name = event.webviewName\n this.webview_end_step_name = event.webviewStepName\n this.webview_end_step_n = event.webviewStepNumber\n this.webview_end_fail_type = event.webviewEndFailType\n this.webview_end_fail_message = event.webviewEndFailMessage\n }\n}\n"],"names":["EventType","HtEvent","HtEventWebviewEnd","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAME,iBAAiBA,SAASD,OAAOA;IAU5C,YAAYE,KAAsB,EAAEC,WAAwB,CAAE;QAC5D,KAAK,CAACD,OAAOC,cAVf,0CACA,kDACA,qDACA,gDACA,yDACA,sDACA,yDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGG,MAAM,MAAM;QAC1B,IAAI,CAAC,cAAc,GAAGA,MAAM,YAAY;QACxC,IAAI,CAAC,iBAAiB,GAAGA,MAAM,eAAe;QAC9C,IAAI,CAAC,YAAY,GAAGA,MAAM,WAAW;QACrC,IAAI,CAAC,qBAAqB,GAAGA,MAAM,eAAe;QAClD,IAAI,CAAC,kBAAkB,GAAGA,MAAM,iBAAiB;QACjD,IAAI,CAAC,qBAAqB,GAAGA,MAAM,kBAAkB;QACrD,IAAI,CAAC,wBAAwB,GAAGA,MAAM,qBAAqB;IAC7D;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event-webview-step.js","sources":["../../src/event-models/ht-event-webview-step.ts"],"sourcesContent":["import {\n type EventAction,\n EventType,\n type EventWebviewStep,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventWebviewStep extends HtEvent {\n action: EventAction.WebviewStep\n flow_thread_id?: string\n webview_thread_id: string\n webview_name: string\n webview_step_name: string\n webview_step_n: number\n\n constructor(event: EventWebviewStep, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.WebEvent\n this.action = event.action\n this.flow_thread_id = event.flowThreadId\n this.webview_thread_id = event.webviewThreadId\n this.webview_name = event.webviewName\n this.webview_step_name = event.webviewStepName\n this.webview_step_n = event.webviewStepNumber\n }\n}\n"],"names":["EventType","HtEvent","HtEventWebviewStep","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAME,kBAAkBA,SAASD,OAAOA;IAQ7C,YAAYE,KAAuB,EAAEC,WAAwB,CAAE;QAC7D,KAAK,CAACD,OAAOC,cARf,0CACA,kDACA,qDACA,gDACA,qDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGG,MAAM,MAAM;QAC1B,IAAI,CAAC,cAAc,GAAGA,MAAM,YAAY;QACxC,IAAI,CAAC,iBAAiB,GAAGA,MAAM,eAAe;QAC9C,IAAI,CAAC,YAAY,GAAGA,MAAM,WAAW;QACrC,IAAI,CAAC,iBAAiB,GAAGA,MAAM,eAAe;QAC9C,IAAI,CAAC,cAAc,GAAGA,MAAM,iBAAiB;IAC/C;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/ht-event.js","sources":["../../src/event-models/ht-event.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { EVENT_FORMAT_VERSION } from '@botonic/core'\n\nimport type {\n EventAction,\n EventType,\n HtEventProps,\n RequestData,\n} from '../types'\nexport class HtEvent {\n chat_id?: string\n type: EventType\n format_version?: number\n bot_version?: string\n flow_version?: string\n action: EventAction\n bot_interaction_id?: string\n user_locale: string\n user_country: string\n system_locale: string\n\n constructor(event: HtEventProps, requestData: RequestData) {\n this.chat_id = requestData.userId\n this.format_version = EVENT_FORMAT_VERSION\n this.action = event.action\n this.bot_interaction_id = requestData.botInteractionId\n this.user_locale = requestData.userLocale\n this.user_country = requestData.userCountry\n this.system_locale = requestData.systemLocale\n }\n}\n"],"names":["EVENT_FORMAT_VERSION","HtEvent","event","requestData"],"mappings":";;;;;;;;;;;;;;AAAA,uDAAuD,GACH;AAQ7C,MAAMC,OAAOA;IAYlB,YAAYC,KAAmB,EAAEC,WAAwB,CAAE;QAX3D;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QAGE,IAAI,CAAC,OAAO,GAAGA,YAAY,MAAM;QACjC,IAAI,CAAC,cAAc,GAAGH,oBAAoBA;QAC1C,IAAI,CAAC,MAAM,GAAGE,MAAM,MAAM;QAC1B,IAAI,CAAC,kBAAkB,GAAGC,YAAY,gBAAgB;QACtD,IAAI,CAAC,WAAW,GAAGA,YAAY,UAAU;QACzC,IAAI,CAAC,YAAY,GAAGA,YAAY,WAAW;QAC3C,IAAI,CAAC,aAAa,GAAGA,YAAY,YAAY;IAC/C;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-models/index.js","sources":["../../src/event-models/index.ts"],"sourcesContent":["export { HtEvent } from './ht-event'\nexport { HtEventAiAgent } from './ht-event-ai-agent'\nexport { HtEventAiAgentRouter } from './ht-event-ai-agent-router'\nexport { HtEventBotAction } from './ht-event-bot-action'\nexport { HtEventConditionalChannel } from './ht-event-conditional-channel'\nexport { HtEventConditionalCountry } from './ht-event-conditional-country'\nexport { HtEventConditionalCustom } from './ht-event-conditional-custom'\nexport { HtEventConditionalQueueStatus } from './ht-event-conditional-queue-status'\nexport { HtEventCustom } from './ht-event-custom'\nexport { HtEventFallback } from './ht-event-fallback'\nexport { HtEventFeedback } from './ht-event-feedback'\nexport { HtEventFlow } from './ht-event-flow'\nexport { HtEventHandoff } from './ht-event-handoff'\nexport { HtEventHandoffOption } from './ht-event-handoff-option'\nexport { HtEventIntentSmart } from './ht-event-intent-smart'\nexport { HtEventKeyword } from './ht-event-keyword'\nexport { HtEventRedirectFlow } from './ht-event-redirect-flow'\nexport { HtEventWebviewActionTriggered } from './ht-event-webview-action-triggered'\nexport { HtEventWebviewEnd } from './ht-event-webview-end'\nexport { HtEventWebviewStep } from './ht-event-webview-step'\n"],"names":["HtEvent","HtEventAiAgent","HtEventAiAgentRouter","HtEventBotAction","HtEventConditionalChannel","HtEventConditionalCountry","HtEventConditionalCustom","HtEventConditionalQueueStatus","HtEventCustom","HtEventFallback","HtEventFeedback","HtEventFlow","HtEventHandoff","HtEventHandoffOption","HtEventIntentSmart","HtEventKeyword","HtEventRedirectFlow","HtEventWebviewActionTriggered","HtEventWebviewEnd","HtEventWebviewStep"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAoC;AACgB;AACa;AACT;AACkB;AACA;AACF;AACW;AAClC;AACI;AACA;AACR;AACM;AACa;AACJ;AACT;AACW;AACqB;AACzB;AACE"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { BotContext, Plugin } from '@botonic/core';
|
|
2
|
+
import type { HtEvent } from './event-models/index.js';
|
|
2
3
|
import { type HtEventProps, type RequestData } from './types.js';
|
|
3
4
|
export default class BotonicPluginHubtypeAnalytics implements Plugin {
|
|
4
5
|
eventsBaseUrl: string;
|
|
5
6
|
constructor();
|
|
6
7
|
post(): void;
|
|
7
|
-
trackEvent(request: BotContext, htEventProps: HtEventProps): Promise<import("axios").AxiosResponse<any, any, {}
|
|
8
|
+
trackEvent(request: BotContext, htEventProps: HtEventProps): Promise<import("axios").AxiosResponse<any, HtEvent, {}, any> | import("axios").AxiosResponse<any, HtEvent, {}, {
|
|
9
|
+
provider_id: string;
|
|
10
|
+
}>>;
|
|
8
11
|
getRequestData(request: BotContext): RequestData;
|
|
9
12
|
private isLambdaEvent;
|
|
10
13
|
private sendEvent;
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { BotContext, Plugin } from '@botonic/core'\nimport axios from 'axios'\n\nimport type { HtEvent } from './event-models'\nimport { EventType, type HtEventProps, type RequestData } from './types'\nimport { createHtEvent } from './utils'\n\nexport default class BotonicPluginHubtypeAnalytics implements Plugin {\n eventsBaseUrl: string\n constructor() {\n const hubtypeUrl = process.env.HUBTYPE_API_URL || 'https://api.hubtype.com'\n this.eventsBaseUrl = `${hubtypeUrl}/external/v2/conversational_apps`\n }\n\n post(): void {\n return\n }\n\n async trackEvent(request: BotContext, htEventProps: HtEventProps) {\n const requestData = this.getRequestData(request)\n const event = createHtEvent(requestData, htEventProps)\n return this.sendEvent(request, event)\n }\n\n getRequestData(request: BotContext): RequestData {\n return {\n userId: this.isLambdaEvent(request) ? request.session.user.id : undefined,\n botInteractionId: request.input?.bot_interaction_id,\n userLocale: request.getUserLocale(),\n userCountry: request.getUserCountry(),\n systemLocale: request.getSystemLocale(),\n }\n }\n\n private isLambdaEvent(request: BotContext): boolean {\n return request.session?.bot?.id !== undefined\n }\n\n private sendEvent(request: BotContext, event: HtEvent) {\n if (event.type === EventType.BotEvent) {\n return this.sendBotEvent(request, event)\n }\n\n return this.sendWebEvent(request, event)\n }\n\n private sendBotEvent(request: BotContext, event: HtEvent) {\n const botId = request.session.bot.id\n const url = `${this.eventsBaseUrl}/${botId}/bot_event/`\n const config = {\n headers: { Authorization: `Bearer ${request.session._access_token}` },\n }\n return axios.post(url, event, config)\n }\n\n private sendWebEvent(request: BotContext, event: HtEvent) {\n if (this.isLambdaEvent(request)) {\n return this.sendWebEventByBotId(request, event)\n }\n\n return this.sendWebEventByProviderId(request, event)\n }\n\n private sendWebEventByBotId(request: BotContext, event: HtEvent) {\n const botId = request.session.bot.id\n const url = `${this.eventsBaseUrl}/${botId}/web_event/`\n return axios.post(url, event)\n }\n\n private sendWebEventByProviderId(request: BotContext, event: HtEvent) {\n const url = `${this.eventsBaseUrl}/web_event/`\n const config = {\n params: {\n provider_id: request.session.user.id,\n },\n }\n return axios.post(url, event, config)\n }\n}\n\nexport * from './types'\nexport * from './utils'\n"],"names":["axios","EventType","createHtEvent","BotonicPluginHubtypeAnalytics","request","htEventProps","requestData","event","undefined","botId","url","config","hubtypeUrl","process"],"mappings":";;;;;;;;;;;;;;;;;;;;AACyB;AAG+C;AACjC;AAExB,MAAMG,6BAA6BA;IAOhD,OAAa;QACX;IACF;IAEA,MAAM,WAAWC,OAAmB,EAAEC,YAA0B,EAAE;QAChE,MAAMC,cAAc,IAAI,CAAC,cAAc,CAACF;QACxC,MAAMG,QAAQL,aAAaA,CAACI,aAAaD;QACzC,OAAO,IAAI,CAAC,SAAS,CAACD,SAASG;IACjC;IAEA,eAAeH,OAAmB,EAAe;QAC/C,OAAO;YACL,QAAQ,IAAI,CAAC,aAAa,CAACA,WAAWA,QAAQ,OAAO,CAAC,IAAI,CAAC,EAAE,GAAGI;YAChE,kBAAkBJ,QAAQ,KAAK,EAAE;YACjC,YAAYA,QAAQ,aAAa;YACjC,aAAaA,QAAQ,cAAc;YACnC,cAAcA,QAAQ,eAAe;QACvC;IACF;IAEQ,cAAcA,OAAmB,EAAW;QAClD,OAAOA,QAAQ,OAAO,EAAE,KAAK,OAAOI;IACtC;IAEQ,UAAUJ,OAAmB,EAAEG,KAAc,EAAE;QACrD,IAAIA,MAAM,IAAI,KAAKN,kBAAkB,EAAE;YACrC,OAAO,IAAI,CAAC,YAAY,CAACG,SAASG;QACpC;QAEA,OAAO,IAAI,CAAC,YAAY,CAACH,SAASG;IACpC;IAEQ,aAAaH,OAAmB,EAAEG,KAAc,EAAE;QACxD,MAAME,QAAQL,QAAQ,OAAO,CAAC,GAAG,CAAC,EAAE;QACpC,MAAMM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,EAAED,MAAM,WAAW,CAAC;QACvD,MAAME,SAAS;YACb,SAAS;gBAAE,eAAe,CAAC,OAAO,EAAEP,QAAQ,OAAO,CAAC,aAAa,EAAE;YAAC;QACtE;QACA,OAAOJ,UAAU,CAACU,KAAKH,OAAOI;IAChC;IAEQ,aAAaP,OAAmB,EAAEG,KAAc,EAAE;QACxD,IAAI,IAAI,CAAC,aAAa,CAACH,UAAU;YAC/B,OAAO,IAAI,CAAC,mBAAmB,CAACA,SAASG;QAC3C;QAEA,OAAO,IAAI,CAAC,wBAAwB,CAACH,SAASG;IAChD;IAEQ,oBAAoBH,OAAmB,EAAEG,KAAc,EAAE;QAC/D,MAAME,QAAQL,QAAQ,OAAO,CAAC,GAAG,CAAC,EAAE;QACpC,MAAMM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,EAAED,MAAM,WAAW,CAAC;QACvD,OAAOT,UAAU,CAACU,KAAKH;IACzB;IAEQ,yBAAyBH,OAAmB,EAAEG,KAAc,EAAE;QACpE,MAAMG,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC;QAC9C,MAAMC,SAAS;YACb,QAAQ;gBACN,aAAaP,QAAQ,OAAO,CAAC,IAAI,CAAC,EAAE;YACtC;QACF;QACA,OAAOJ,UAAU,CAACU,KAAKH,OAAOI;IAChC;IApEA,aAAc;QADd;QAEE,MAAMC,aAAaC,QAAQ,GAAG,CAAC,eAAe,IAAI;QAClD,IAAI,CAAC,aAAa,GAAG,GAAGD,WAAW,gCAAgC,CAAC;IACtE;AAkEF;AAAC;AAEsB;AACA"}
|
|
@@ -11,4 +11,4 @@ export interface RequestData {
|
|
|
11
11
|
userCountry: string;
|
|
12
12
|
systemLocale: string;
|
|
13
13
|
}
|
|
14
|
-
export { EventAction, type EventAiAgent, type EventAiAgentRouter, type
|
|
14
|
+
export { type AvailableSpecialist, EventAction, type EventAiAgent, type EventAiAgentRouter, type EventBotAction, type EventCaptureUserInput, type EventConditionalChannel, type EventConditionalCountry, type EventConditionalCustom, type EventConditionalQueueStatus, type EventCustom, type EventFallback, type EventFeedback, type EventFlow, type EventHandoff, type EventHandoffOption, type EventIntentSmart, type EventKeyword, type EventWebviewActionTriggered, type EventWebviewEnd, type EventWebviewStep, type ToolExecution, WebviewEndFailType, };
|
package/lib/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import {\n type AvailableSpecialist,\n EventAction,\n type EventAiAgent,\n type EventAiAgentRouter,\n type EventBotAction,\n type EventCaptureUserInput,\n type EventConditionalChannel,\n type EventConditionalCountry,\n type EventConditionalCustom,\n type EventConditionalQueueStatus,\n type EventCustom,\n type EventFallback,\n type EventFeedback,\n type EventFlow,\n type EventHandoff,\n type EventHandoffOption,\n type EventIntentSmart,\n type EventKeyword,\n type EventRedirectFlow,\n type EventWebviewActionTriggered,\n type EventWebviewEnd,\n type EventWebviewStep,\n type ToolExecution,\n WebviewEndFailType,\n} from '@botonic/core'\n\nexport enum EventType {\n BotEvent = 'botevent',\n WebEvent = 'webevent',\n}\n\nexport type HtEventProps =\n | EventFeedback\n | EventFlow\n | EventBotAction\n | EventConditionalChannel\n | EventConditionalCountry\n | EventConditionalCustom\n | EventConditionalQueueStatus\n | EventHandoff\n | EventHandoffOption\n | EventKeyword\n | EventIntentSmart\n | EventWebviewActionTriggered\n | EventFallback\n | EventWebviewStep\n | EventWebviewEnd\n | EventCustom\n | EventAiAgent\n | EventAiAgentRouter\n | EventRedirectFlow\n | EventCaptureUserInput\n\nexport interface RequestData {\n userId?: string\n botInteractionId: string\n userLocale: string\n userCountry: string\n systemLocale: string\n}\n\nexport {\n type AvailableSpecialist,\n EventAction,\n type EventAiAgent,\n type EventAiAgentRouter,\n type EventBotAction,\n type EventCaptureUserInput,\n type EventConditionalChannel,\n type EventConditionalCountry,\n type EventConditionalCustom,\n type EventConditionalQueueStatus,\n type EventCustom,\n type EventFallback,\n type EventFeedback,\n type EventFlow,\n type EventHandoff,\n type EventHandoffOption,\n type EventIntentSmart,\n type EventKeyword,\n type EventWebviewActionTriggered,\n type EventWebviewEnd,\n type EventWebviewStep,\n type ToolExecution,\n WebviewEndFailType,\n}\n"],"names":["EventAction","WebviewEndFailType","EventType"],"mappings":";AAyBsB;AAEf,IAAKE,eAASA,0BAATA;;;WAAAA;MAGX;AAwDA"}
|
package/lib/utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["/* eslint-disable complexity */\nimport {\n HtEvent,\n HtEventAiAgent,\n HtEventAiAgentRouter,\n HtEventBotAction,\n HtEventConditionalChannel,\n HtEventConditionalCountry,\n HtEventConditionalCustom,\n HtEventConditionalQueueStatus,\n HtEventCustom,\n HtEventFallback,\n HtEventFeedback,\n HtEventFlow,\n HtEventHandoff,\n HtEventHandoffOption,\n HtEventIntentSmart,\n HtEventKeyword,\n HtEventRedirectFlow,\n HtEventWebviewActionTriggered,\n HtEventWebviewEnd,\n HtEventWebviewStep,\n} from './event-models'\nimport { HtEventCaptureUserInput } from './event-models/ht-event-capture-user-input'\nimport { EventAction, type HtEventProps, type RequestData } from './types'\n\nexport function createHtEvent(\n requestData: RequestData,\n htEventProps: HtEventProps\n): HtEvent {\n switch (htEventProps.action) {\n case EventAction.FeedbackCase:\n case EventAction.FeedbackConversation:\n case EventAction.FeedbackMessage:\n case EventAction.FeedbackWebview:\n return new HtEventFeedback(htEventProps, requestData)\n\n case EventAction.FlowNode:\n return new HtEventFlow(htEventProps, requestData)\n\n case EventAction.HandoffOption:\n return new HtEventHandoffOption(htEventProps, requestData)\n\n case EventAction.HandoffSuccess:\n case EventAction.HandoffFail:\n return new HtEventHandoff(htEventProps, requestData)\n\n case EventAction.Keyword:\n return new HtEventKeyword(htEventProps, requestData)\n\n case EventAction.IntentSmart:\n return new HtEventIntentSmart(htEventProps, requestData)\n\n case EventAction.Fallback:\n return new HtEventFallback(htEventProps, requestData)\n\n case EventAction.WebviewStep:\n return new HtEventWebviewStep(htEventProps, requestData)\n\n case EventAction.WebviewEnd:\n return new HtEventWebviewEnd(htEventProps, requestData)\n\n case EventAction.Custom:\n return new HtEventCustom(htEventProps, requestData)\n\n case EventAction.AiAgent:\n return new HtEventAiAgent(htEventProps, requestData)\n\n case EventAction.AiAgentRouter:\n return new HtEventAiAgentRouter(htEventProps, requestData)\n\n case EventAction.ConditionalCountry:\n return new HtEventConditionalCountry(htEventProps, requestData)\n\n case EventAction.ConditionalQueueStatus:\n return new HtEventConditionalQueueStatus(htEventProps, requestData)\n\n case EventAction.ConditionalCustom:\n return new HtEventConditionalCustom(htEventProps, requestData)\n\n case EventAction.ConditionalChannel:\n return new HtEventConditionalChannel(htEventProps, requestData)\n\n case EventAction.BotAction:\n return new HtEventBotAction(htEventProps, requestData)\n\n case EventAction.WebviewActionTriggered:\n return new HtEventWebviewActionTriggered(htEventProps, requestData)\n\n case EventAction.RedirectFlow:\n return new HtEventRedirectFlow(htEventProps, requestData)\n\n case EventAction.CaptureUserInput:\n return new HtEventCaptureUserInput(htEventProps, requestData)\n\n default:\n return new HtEvent(htEventProps, requestData)\n }\n}\n"],"names":["HtEvent","HtEventAiAgent","HtEventAiAgentRouter","HtEventBotAction","HtEventConditionalChannel","HtEventConditionalCountry","HtEventConditionalCustom","HtEventConditionalQueueStatus","HtEventCustom","HtEventFallback","HtEventFeedback","HtEventFlow","HtEventHandoff","HtEventHandoffOption","HtEventIntentSmart","HtEventKeyword","HtEventRedirectFlow","HtEventWebviewActionTriggered","HtEventWebviewEnd","HtEventWebviewStep","HtEventCaptureUserInput","EventAction","createHtEvent","requestData","htEventProps"],"mappings":";;;;;;;AAAA,6BAA6B,GAsBN;AAC6D;AACV;AAEnE,SAASsB,aAAaA,CAC3BC,WAAwB,EACxBC,YAA0B;IAE1B,OAAQA,aAAa,MAAM;QACzB,KAAKH,wBAAwB;QAC7B,KAAKA,gCAAgC;QACrC,KAAKA,2BAA2B;QAChC,KAAKA,2BAA2B;YAC9B,OAAO,IAAIX,eAAeA,CAACc,cAAcD;QAE3C,KAAKF,oBAAoB;YACvB,OAAO,IAAIV,WAAWA,CAACa,cAAcD;QAEvC,KAAKF,yBAAyB;YAC5B,OAAO,IAAIR,oBAAoBA,CAACW,cAAcD;QAEhD,KAAKF,0BAA0B;QAC/B,KAAKA,uBAAuB;YAC1B,OAAO,IAAIT,cAAcA,CAACY,cAAcD;QAE1C,KAAKF,mBAAmB;YACtB,OAAO,IAAIN,cAAcA,CAACS,cAAcD;QAE1C,KAAKF,uBAAuB;YAC1B,OAAO,IAAIP,kBAAkBA,CAACU,cAAcD;QAE9C,KAAKF,oBAAoB;YACvB,OAAO,IAAIZ,eAAeA,CAACe,cAAcD;QAE3C,KAAKF,uBAAuB;YAC1B,OAAO,IAAIF,kBAAkBA,CAACK,cAAcD;QAE9C,KAAKF,sBAAsB;YACzB,OAAO,IAAIH,iBAAiBA,CAACM,cAAcD;QAE7C,KAAKF,kBAAkB;YACrB,OAAO,IAAIb,aAAaA,CAACgB,cAAcD;QAEzC,KAAKF,mBAAmB;YACtB,OAAO,IAAIpB,cAAcA,CAACuB,cAAcD;QAE1C,KAAKF,yBAAyB;YAC5B,OAAO,IAAInB,oBAAoBA,CAACsB,cAAcD;QAEhD,KAAKF,8BAA8B;YACjC,OAAO,IAAIhB,yBAAyBA,CAACmB,cAAcD;QAErD,KAAKF,kCAAkC;YACrC,OAAO,IAAId,6BAA6BA,CAACiB,cAAcD;QAEzD,KAAKF,6BAA6B;YAChC,OAAO,IAAIf,wBAAwBA,CAACkB,cAAcD;QAEpD,KAAKF,8BAA8B;YACjC,OAAO,IAAIjB,yBAAyBA,CAACoB,cAAcD;QAErD,KAAKF,qBAAqB;YACxB,OAAO,IAAIlB,gBAAgBA,CAACqB,cAAcD;QAE5C,KAAKF,kCAAkC;YACrC,OAAO,IAAIJ,6BAA6BA,CAACO,cAAcD;QAEzD,KAAKF,wBAAwB;YAC3B,OAAO,IAAIL,mBAAmBA,CAACQ,cAAcD;QAE/C,KAAKF,4BAA4B;YAC/B,OAAO,IAAID,uBAAuBA,CAACI,cAAcD;QAEnD;YACE,OAAO,IAAIvB,OAAOA,CAACwB,cAAcD;IACrC;AACF"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
+
"type": "module",
|
|
2
3
|
"name": "@botonic/plugin-hubtype-analytics",
|
|
3
|
-
"version": "0.57.0-rslib-esm.
|
|
4
|
+
"version": "0.57.0-rslib-esm.2",
|
|
4
5
|
"description": "Plugin for tracking in the Hubtype backend to see the results in the Hubtype Dashbord",
|
|
5
|
-
"main": "./lib/
|
|
6
|
-
"module": "./lib/
|
|
6
|
+
"main": "./lib/index.js",
|
|
7
|
+
"module": "./lib/index.js",
|
|
7
8
|
"scripts": {
|
|
8
|
-
"build": "
|
|
9
|
-
"build:watch": "
|
|
10
|
-
"test": "
|
|
9
|
+
"build": "rslib build --no-env",
|
|
10
|
+
"build:watch": "rslib build --watch --no-env",
|
|
11
|
+
"test": "vitest run --coverage",
|
|
11
12
|
"prepublishOnly": "npm run build && npm run test && npm run lint",
|
|
12
13
|
"lint": "biome check --write src/ tests/",
|
|
13
14
|
"lint:check": "biome check src/ tests/",
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"@babel/runtime": "^7.26.0",
|
|
18
|
-
"@botonic/core": "
|
|
19
|
+
"@botonic/core": "0.57.0-rslib-esm.2",
|
|
19
20
|
"axios": "^1.18.1"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
@@ -41,5 +42,5 @@
|
|
|
41
42
|
"javascript",
|
|
42
43
|
"typescript"
|
|
43
44
|
],
|
|
44
|
-
"types": "./lib/
|
|
45
|
+
"types": "./lib/index.d.ts"
|
|
45
46
|
}
|
package/src/types.ts
CHANGED
|
@@ -61,10 +61,10 @@ export interface RequestData {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export {
|
|
64
|
+
type AvailableSpecialist,
|
|
64
65
|
EventAction,
|
|
65
66
|
type EventAiAgent,
|
|
66
67
|
type EventAiAgentRouter,
|
|
67
|
-
type AvailableSpecialist,
|
|
68
68
|
type EventBotAction,
|
|
69
69
|
type EventCaptureUserInput,
|
|
70
70
|
type EventConditionalChannel,
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-models/ht-event-flow.js","sources":["../../../src/event-models/ht-event-flow.ts"],"sourcesContent":["import {\n EventAction,\n type EventFlow,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventFlow 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\n constructor(event: EventFlow, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.FlowNode\n this.flow_thread_id = event.flowThreadId // This value is managed by the flow builder plugin, stored in the session and updated every time the content connected to the conversation start is displayed\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 || false\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventFlow","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,WAAWA,SAASD,OAAOA;IAQtC,YAAYE,KAAgB,EAAEC,WAAwB,CAAE;QACtD,KAAK,CAACD,OAAOC,cARf,kDACA,2CACA,6CACA,gDACA,wDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,oBAAoB;QAClC,IAAI,CAAC,cAAc,GAAGI,MAAM,YAAY,EAAC,8JAA8J;QACvM,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,IAAI;IAC/D;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-models/ht-event-handoff-option.js","sources":["../../../src/event-models/ht-event-handoff-option.ts"],"sourcesContent":["import {\n type EventAction,\n type EventHandoffOption,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventHandoffOption extends HtEvent {\n action: EventAction.HandoffOption\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 handoff_queue_id?: string\n handoff_queue_name?: string\n\n constructor(event: EventHandoffOption, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\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.handoff_queue_id = event.queueId\n this.handoff_queue_name = event.queueName\n }\n}\n"],"names":["EventType","HtEvent","HtEventHandoffOption","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAME,oBAAoBA,SAASD,OAAOA;IAU/C,YAAYE,KAAyB,EAAEC,WAAwB,CAAE;QAC/D,KAAK,CAACD,OAAOC,cAVf,0CACA,kDACA,2CACA,6CACA,gDACA,wDACA,oDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,cAAc,GAAGG,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,gBAAgB,GAAGA,MAAM,OAAO;QACrC,IAAI,CAAC,kBAAkB,GAAGA,MAAM,SAAS;IAC3C;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-models/ht-event-handoff.js","sources":["../../../src/event-models/ht-event-handoff.ts"],"sourcesContent":["import {\n type EventAction,\n type EventHandoff,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventHandoff extends HtEvent {\n action: EventAction.HandoffSuccess | EventAction.HandoffFail\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 handoff_queue_id: string\n handoff_queue_name: string\n handoff_case_id?: string\n handoff_is_queue_open: boolean\n handoff_is_available_agent: boolean\n handoff_is_threshold_reached: boolean\n\n constructor(event: EventHandoff, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = event.action\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.handoff_queue_id = event.queueId\n this.handoff_queue_name = event.queueName\n this.handoff_case_id = event.caseId\n this.handoff_is_queue_open = event.isQueueOpen || false\n this.handoff_is_available_agent = event.isAvailableAgent || false\n this.handoff_is_threshold_reached = event.isThresholdReached || false\n }\n}\n"],"names":["EventType","HtEvent","HtEventHandoff","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAME,cAAcA,SAASD,OAAOA;IAczC,YAAYE,KAAmB,EAAEC,WAAwB,CAAE;QACzD,KAAK,CAACD,OAAOC,cAdf,0CACA,kDACA,2CACA,6CACA,gDACA,wDACA,oDACA,sDACA,mDACA,yDACA,8DACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGG,MAAM,MAAM;QAC1B,IAAI,CAAC,cAAc,GAAGA,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,gBAAgB,GAAGA,MAAM,OAAO;QACrC,IAAI,CAAC,kBAAkB,GAAGA,MAAM,SAAS;QACzC,IAAI,CAAC,eAAe,GAAGA,MAAM,MAAM;QACnC,IAAI,CAAC,qBAAqB,GAAGA,MAAM,WAAW,IAAI;QAClD,IAAI,CAAC,0BAA0B,GAAGA,MAAM,gBAAgB,IAAI;QAC5D,IAAI,CAAC,4BAA4B,GAAGA,MAAM,kBAAkB,IAAI;IAClE;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-models/ht-event-intent-smart.js","sources":["../../../src/event-models/ht-event-intent-smart.ts"],"sourcesContent":["import {\n EventAction,\n type EventIntentSmart,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventIntentSmart extends HtEvent {\n nlu_intent_smart_title: string\n nlu_intent_smart_num_used: number\n nlu_intent_smart_message_id: string\n user_input: string\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\n constructor(event: EventIntentSmart, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.IntentSmart\n this.nlu_intent_smart_title = event.nluIntentSmartTitle\n this.nlu_intent_smart_num_used = event.nluIntentSmartNumUsed\n this.nlu_intent_smart_message_id = event.nluIntentSmartMessageId\n this.user_input = event.userInput\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 }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventIntentSmart","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,kBAAkBA,SAASD,OAAOA;IAW7C,YAAYE,KAAuB,EAAEC,WAAwB,CAAE;QAC7D,KAAK,CAACD,OAAOC,cAXf,0DACA,6DACA,+DACA,8CACA,kDACA,2CACA,6CACA,gDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,uBAAuB;QACrC,IAAI,CAAC,sBAAsB,GAAGI,MAAM,mBAAmB;QACvD,IAAI,CAAC,yBAAyB,GAAGA,MAAM,qBAAqB;QAC5D,IAAI,CAAC,2BAA2B,GAAGA,MAAM,uBAAuB;QAChE,IAAI,CAAC,UAAU,GAAGA,MAAM,SAAS;QACjC,IAAI,CAAC,cAAc,GAAGA,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;IACrD;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-models/ht-event-keyword.js","sources":["../../../src/event-models/ht-event-keyword.ts"],"sourcesContent":["import {\n EventAction,\n type EventKeyword,\n EventType,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventKeyword extends HtEvent {\n nlu_keyword_name: string\n nlu_keyword_is_regex: boolean\n nlu_keyword_message_id: string\n user_input: string\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\n constructor(event: EventKeyword, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.Keyword\n this.nlu_keyword_name = event.nluKeywordName\n this.nlu_keyword_is_regex = event.nluKeywordIsRegex || false\n this.nlu_keyword_message_id = event.nluKeywordMessageId\n this.user_input = event.userInput\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 }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventKeyword","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,cAAcA,SAASD,OAAOA;IAWzC,YAAYE,KAAmB,EAAEC,WAAwB,CAAE;QACzD,KAAK,CAACD,OAAOC,cAXf,oDACA,wDACA,0DACA,8CACA,kDACA,2CACA,6CACA,gDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,mBAAmB;QACjC,IAAI,CAAC,gBAAgB,GAAGI,MAAM,cAAc;QAC5C,IAAI,CAAC,oBAAoB,GAAGA,MAAM,iBAAiB,IAAI;QACvD,IAAI,CAAC,sBAAsB,GAAGA,MAAM,mBAAmB;QACvD,IAAI,CAAC,UAAU,GAAGA,MAAM,SAAS;QACjC,IAAI,CAAC,cAAc,GAAGA,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;IACrD;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-models/ht-event-redirect-flow.js","sources":["../../../src/event-models/ht-event-redirect-flow.ts"],"sourcesContent":["import type { EventRedirectFlow } from '@botonic/core'\n\nimport { EventAction, EventType, type RequestData } from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventRedirectFlow 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 flow_target_id: string\n flow_target_name: string\n\n constructor(event: EventRedirectFlow, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.RedirectFlow\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.flow_target_id = event.flowTargetId\n this.flow_target_name = event.flowTargetName\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventRedirectFlow","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAEmE;AAC/B;AAE7B,MAAMG,mBAAmBA,SAASD,OAAOA;IAU9C,YAAYE,KAAwB,EAAEC,WAAwB,CAAE;QAC9D,KAAK,CAACD,OAAOC,cAVf,kDACA,2CACA,6CACA,gDACA,wDACA,2DACA,kDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGD,wBAAwB;QACtC,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,cAAc,GAAGA,MAAM,YAAY;QACxC,IAAI,CAAC,gBAAgB,GAAGA,MAAM,cAAc;IAC9C;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-models/ht-event-webview-action-triggered.js","sources":["../../../src/event-models/ht-event-webview-action-triggered.ts"],"sourcesContent":["import {\n EventAction,\n EventType,\n type EventWebviewActionTriggered,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventWebviewActionTriggered 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 webview_name: string\n webview_target_id: string\n webview_params?: Record<string, string>\n\n constructor(event: EventWebviewActionTriggered, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.BotEvent\n this.action = EventAction.WebviewActionTriggered\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.webview_name = event.webviewName\n this.webview_target_id = event.webviewTargetId\n this.webview_params = event.webviewParams\n }\n}\n"],"names":["EventAction","EventType","HtEvent","HtEventWebviewActionTriggered","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAMG,6BAA6BA,SAASD,OAAOA;IAWxD,YAAYE,KAAkC,EAAEC,WAAwB,CAAE;QACxE,KAAK,CAACD,OAAOC,cAXf,kDACA,2CACA,6CACA,gDACA,wDACA,2DACA,gDACA,qDACA;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,YAAY,GAAGA,MAAM,WAAW;QACrC,IAAI,CAAC,iBAAiB,GAAGA,MAAM,eAAe;QAC9C,IAAI,CAAC,cAAc,GAAGA,MAAM,aAAa;IAC3C;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-models/ht-event-webview-end.js","sources":["../../../src/event-models/ht-event-webview-end.ts"],"sourcesContent":["import {\n type EventAction,\n EventType,\n type EventWebviewEnd,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventWebviewEnd extends HtEvent {\n action: EventAction.WebviewEnd\n flow_thread_id?: string\n webview_thread_id: string\n webview_name: string\n webview_end_step_name?: string\n webview_end_step_n?: number\n webview_end_fail_type?: string\n webview_end_fail_message?: string\n\n constructor(event: EventWebviewEnd, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.WebEvent\n this.action = event.action\n this.flow_thread_id = event.flowThreadId\n this.webview_thread_id = event.webviewThreadId\n this.webview_name = event.webviewName\n this.webview_end_step_name = event.webviewStepName\n this.webview_end_step_n = event.webviewStepNumber\n this.webview_end_fail_type = event.webviewEndFailType\n this.webview_end_fail_message = event.webviewEndFailMessage\n }\n}\n"],"names":["EventType","HtEvent","HtEventWebviewEnd","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAME,iBAAiBA,SAASD,OAAOA;IAU5C,YAAYE,KAAsB,EAAEC,WAAwB,CAAE;QAC5D,KAAK,CAACD,OAAOC,cAVf,0CACA,kDACA,qDACA,gDACA,yDACA,sDACA,yDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGG,MAAM,MAAM;QAC1B,IAAI,CAAC,cAAc,GAAGA,MAAM,YAAY;QACxC,IAAI,CAAC,iBAAiB,GAAGA,MAAM,eAAe;QAC9C,IAAI,CAAC,YAAY,GAAGA,MAAM,WAAW;QACrC,IAAI,CAAC,qBAAqB,GAAGA,MAAM,eAAe;QAClD,IAAI,CAAC,kBAAkB,GAAGA,MAAM,iBAAiB;QACjD,IAAI,CAAC,qBAAqB,GAAGA,MAAM,kBAAkB;QACrD,IAAI,CAAC,wBAAwB,GAAGA,MAAM,qBAAqB;IAC7D;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-models/ht-event-webview-step.js","sources":["../../../src/event-models/ht-event-webview-step.ts"],"sourcesContent":["import {\n type EventAction,\n EventType,\n type EventWebviewStep,\n type RequestData,\n} from '../types'\nimport { HtEvent } from './ht-event'\n\nexport class HtEventWebviewStep extends HtEvent {\n action: EventAction.WebviewStep\n flow_thread_id?: string\n webview_thread_id: string\n webview_name: string\n webview_step_name: string\n webview_step_n: number\n\n constructor(event: EventWebviewStep, requestData: RequestData) {\n super(event, requestData)\n this.type = EventType.WebEvent\n this.action = event.action\n this.flow_thread_id = event.flowThreadId\n this.webview_thread_id = event.webviewThreadId\n this.webview_name = event.webviewName\n this.webview_step_name = event.webviewStepName\n this.webview_step_n = event.webviewStepNumber\n }\n}\n"],"names":["EventType","HtEvent","HtEventWebviewStep","event","requestData"],"mappings":";;;;;;;;;;;;;;;;AAKiB;AACmB;AAE7B,MAAME,kBAAkBA,SAASD,OAAOA;IAQ7C,YAAYE,KAAuB,EAAEC,WAAwB,CAAE;QAC7D,KAAK,CAACD,OAAOC,cARf,0CACA,kDACA,qDACA,gDACA,qDACA;QAIE,IAAI,CAAC,IAAI,GAAGJ,kBAAkB;QAC9B,IAAI,CAAC,MAAM,GAAGG,MAAM,MAAM;QAC1B,IAAI,CAAC,cAAc,GAAGA,MAAM,YAAY;QACxC,IAAI,CAAC,iBAAiB,GAAGA,MAAM,eAAe;QAC9C,IAAI,CAAC,YAAY,GAAGA,MAAM,WAAW;QACrC,IAAI,CAAC,iBAAiB,GAAGA,MAAM,eAAe;QAC9C,IAAI,CAAC,cAAc,GAAGA,MAAM,iBAAiB;IAC/C;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-models/ht-event.js","sources":["../../../src/event-models/ht-event.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { EVENT_FORMAT_VERSION } from '@botonic/core'\n\nimport type {\n EventAction,\n EventType,\n HtEventProps,\n RequestData,\n} from '../types'\nexport class HtEvent {\n chat_id?: string\n type: EventType\n format_version?: number\n bot_version?: string\n flow_version?: string\n action: EventAction\n bot_interaction_id?: string\n user_locale: string\n user_country: string\n system_locale: string\n\n constructor(event: HtEventProps, requestData: RequestData) {\n this.chat_id = requestData.userId\n this.format_version = EVENT_FORMAT_VERSION\n this.action = event.action\n this.bot_interaction_id = requestData.botInteractionId\n this.user_locale = requestData.userLocale\n this.user_country = requestData.userCountry\n this.system_locale = requestData.systemLocale\n }\n}\n"],"names":["EVENT_FORMAT_VERSION","HtEvent","event","requestData"],"mappings":";;;;;;;;;;;;;;AAAA,uDAAuD,GACH;AAQ7C,MAAMC,OAAOA;IAYlB,YAAYC,KAAmB,EAAEC,WAAwB,CAAE;QAX3D;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QAGE,IAAI,CAAC,OAAO,GAAGA,YAAY,MAAM;QACjC,IAAI,CAAC,cAAc,GAAGH,oBAAoBA;QAC1C,IAAI,CAAC,MAAM,GAAGE,MAAM,MAAM;QAC1B,IAAI,CAAC,kBAAkB,GAAGC,YAAY,gBAAgB;QACtD,IAAI,CAAC,WAAW,GAAGA,YAAY,UAAU;QACzC,IAAI,CAAC,YAAY,GAAGA,YAAY,WAAW;QAC3C,IAAI,CAAC,aAAa,GAAGA,YAAY,YAAY;IAC/C;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-models/index.js","sources":["../../../src/event-models/index.ts"],"sourcesContent":["export { HtEvent } from './ht-event'\nexport { HtEventAiAgent } from './ht-event-ai-agent'\nexport { HtEventAiAgentRouter } from './ht-event-ai-agent-router'\nexport { HtEventBotAction } from './ht-event-bot-action'\nexport { HtEventConditionalChannel } from './ht-event-conditional-channel'\nexport { HtEventConditionalCountry } from './ht-event-conditional-country'\nexport { HtEventConditionalCustom } from './ht-event-conditional-custom'\nexport { HtEventConditionalQueueStatus } from './ht-event-conditional-queue-status'\nexport { HtEventCustom } from './ht-event-custom'\nexport { HtEventFallback } from './ht-event-fallback'\nexport { HtEventFeedback } from './ht-event-feedback'\nexport { HtEventFlow } from './ht-event-flow'\nexport { HtEventHandoff } from './ht-event-handoff'\nexport { HtEventHandoffOption } from './ht-event-handoff-option'\nexport { HtEventIntentSmart } from './ht-event-intent-smart'\nexport { HtEventKeyword } from './ht-event-keyword'\nexport { HtEventRedirectFlow } from './ht-event-redirect-flow'\nexport { HtEventWebviewActionTriggered } from './ht-event-webview-action-triggered'\nexport { HtEventWebviewEnd } from './ht-event-webview-end'\nexport { HtEventWebviewStep } from './ht-event-webview-step'\n"],"names":["HtEvent","HtEventAiAgent","HtEventAiAgentRouter","HtEventBotAction","HtEventConditionalChannel","HtEventConditionalCountry","HtEventConditionalCustom","HtEventConditionalQueueStatus","HtEventCustom","HtEventFallback","HtEventFeedback","HtEventFlow","HtEventHandoff","HtEventHandoffOption","HtEventIntentSmart","HtEventKeyword","HtEventRedirectFlow","HtEventWebviewActionTriggered","HtEventWebviewEnd","HtEventWebviewStep"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAoC;AACgB;AACa;AACT;AACkB;AACA;AACF;AACW;AAClC;AACI;AACA;AACR;AACM;AACa;AACJ;AACT;AACW;AACqB;AACzB;AACE"}
|
package/lib/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import type { BotContext, Plugin } from '@botonic/core'\nimport axios from 'axios'\n\nimport type { HtEvent } from './event-models'\nimport { EventType, type HtEventProps, type RequestData } from './types'\nimport { createHtEvent } from './utils'\n\nexport default class BotonicPluginHubtypeAnalytics implements Plugin {\n eventsBaseUrl: string\n constructor() {\n const hubtypeUrl = process.env.HUBTYPE_API_URL || 'https://api.hubtype.com'\n this.eventsBaseUrl = `${hubtypeUrl}/external/v2/conversational_apps`\n }\n\n post(): void {\n return\n }\n\n async trackEvent(request: BotContext, htEventProps: HtEventProps) {\n const requestData = this.getRequestData(request)\n const event = createHtEvent(requestData, htEventProps)\n return this.sendEvent(request, event)\n }\n\n getRequestData(request: BotContext): RequestData {\n return {\n userId: this.isLambdaEvent(request) ? request.session.user.id : undefined,\n botInteractionId: request.input?.bot_interaction_id,\n userLocale: request.getUserLocale(),\n userCountry: request.getUserCountry(),\n systemLocale: request.getSystemLocale(),\n }\n }\n\n private isLambdaEvent(request: BotContext): boolean {\n return request.session?.bot?.id !== undefined\n }\n\n private sendEvent(request: BotContext, event: HtEvent) {\n if (event.type === EventType.BotEvent) {\n return this.sendBotEvent(request, event)\n }\n\n return this.sendWebEvent(request, event)\n }\n\n private sendBotEvent(request: BotContext, event: HtEvent) {\n const botId = request.session.bot.id\n const url = `${this.eventsBaseUrl}/${botId}/bot_event/`\n const config = {\n headers: { Authorization: `Bearer ${request.session._access_token}` },\n }\n return axios.post(url, event, config)\n }\n\n private sendWebEvent(request: BotContext, event: HtEvent) {\n if (this.isLambdaEvent(request)) {\n return this.sendWebEventByBotId(request, event)\n }\n\n return this.sendWebEventByProviderId(request, event)\n }\n\n private sendWebEventByBotId(request: BotContext, event: HtEvent) {\n const botId = request.session.bot.id\n const url = `${this.eventsBaseUrl}/${botId}/web_event/`\n return axios.post(url, event)\n }\n\n private sendWebEventByProviderId(request: BotContext, event: HtEvent) {\n const url = `${this.eventsBaseUrl}/web_event/`\n const config = {\n params: {\n provider_id: request.session.user.id,\n },\n }\n return axios.post(url, event, config)\n }\n}\n\nexport * from './types'\nexport * from './utils'\n"],"names":["axios","EventType","createHtEvent","BotonicPluginHubtypeAnalytics","request","htEventProps","requestData","event","undefined","botId","url","config","hubtypeUrl","process"],"mappings":";;;;;;;;;;;;;;;;;;;;AACyB;AAG+C;AACjC;AAExB,MAAMG,6BAA6BA;IAOhD,OAAa;QACX;IACF;IAEA,MAAM,WAAWC,OAAmB,EAAEC,YAA0B,EAAE;QAChE,MAAMC,cAAc,IAAI,CAAC,cAAc,CAACF;QACxC,MAAMG,QAAQL,aAAaA,CAACI,aAAaD;QACzC,OAAO,IAAI,CAAC,SAAS,CAACD,SAASG;IACjC;IAEA,eAAeH,OAAmB,EAAe;QAC/C,OAAO;YACL,QAAQ,IAAI,CAAC,aAAa,CAACA,WAAWA,QAAQ,OAAO,CAAC,IAAI,CAAC,EAAE,GAAGI;YAChE,kBAAkBJ,QAAQ,KAAK,EAAE;YACjC,YAAYA,QAAQ,aAAa;YACjC,aAAaA,QAAQ,cAAc;YACnC,cAAcA,QAAQ,eAAe;QACvC;IACF;IAEQ,cAAcA,OAAmB,EAAW;QAClD,OAAOA,QAAQ,OAAO,EAAE,KAAK,OAAOI;IACtC;IAEQ,UAAUJ,OAAmB,EAAEG,KAAc,EAAE;QACrD,IAAIA,MAAM,IAAI,KAAKN,kBAAkB,EAAE;YACrC,OAAO,IAAI,CAAC,YAAY,CAACG,SAASG;QACpC;QAEA,OAAO,IAAI,CAAC,YAAY,CAACH,SAASG;IACpC;IAEQ,aAAaH,OAAmB,EAAEG,KAAc,EAAE;QACxD,MAAME,QAAQL,QAAQ,OAAO,CAAC,GAAG,CAAC,EAAE;QACpC,MAAMM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,EAAED,MAAM,WAAW,CAAC;QACvD,MAAME,SAAS;YACb,SAAS;gBAAE,eAAe,CAAC,OAAO,EAAEP,QAAQ,OAAO,CAAC,aAAa,EAAE;YAAC;QACtE;QACA,OAAOJ,UAAU,CAACU,KAAKH,OAAOI;IAChC;IAEQ,aAAaP,OAAmB,EAAEG,KAAc,EAAE;QACxD,IAAI,IAAI,CAAC,aAAa,CAACH,UAAU;YAC/B,OAAO,IAAI,CAAC,mBAAmB,CAACA,SAASG;QAC3C;QAEA,OAAO,IAAI,CAAC,wBAAwB,CAACH,SAASG;IAChD;IAEQ,oBAAoBH,OAAmB,EAAEG,KAAc,EAAE;QAC/D,MAAME,QAAQL,QAAQ,OAAO,CAAC,GAAG,CAAC,EAAE;QACpC,MAAMM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,EAAED,MAAM,WAAW,CAAC;QACvD,OAAOT,UAAU,CAACU,KAAKH;IACzB;IAEQ,yBAAyBH,OAAmB,EAAEG,KAAc,EAAE;QACpE,MAAMG,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC;QAC9C,MAAMC,SAAS;YACb,QAAQ;gBACN,aAAaP,QAAQ,OAAO,CAAC,IAAI,CAAC,EAAE;YACtC;QACF;QACA,OAAOJ,UAAU,CAACU,KAAKH,OAAOI;IAChC;IApEA,aAAc;QADd;QAEE,MAAMC,aAAaC,QAAQ,GAAG,CAAC,eAAe,IAAI;QAClD,IAAI,CAAC,aAAa,GAAG,GAAGD,WAAW,gCAAgC,CAAC;IACtE;AAkEF;AAAC;AAEsB;AACA"}
|
package/lib/esm/package.json
DELETED
package/lib/esm/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../src/types.ts"],"sourcesContent":["import {\n type AvailableSpecialist,\n EventAction,\n type EventAiAgent,\n type EventAiAgentRouter,\n type EventBotAction,\n type EventCaptureUserInput,\n type EventConditionalChannel,\n type EventConditionalCountry,\n type EventConditionalCustom,\n type EventConditionalQueueStatus,\n type EventCustom,\n type EventFallback,\n type EventFeedback,\n type EventFlow,\n type EventHandoff,\n type EventHandoffOption,\n type EventIntentSmart,\n type EventKeyword,\n type EventRedirectFlow,\n type EventWebviewActionTriggered,\n type EventWebviewEnd,\n type EventWebviewStep,\n type ToolExecution,\n WebviewEndFailType,\n} from '@botonic/core'\n\nexport enum EventType {\n BotEvent = 'botevent',\n WebEvent = 'webevent',\n}\n\nexport type HtEventProps =\n | EventFeedback\n | EventFlow\n | EventBotAction\n | EventConditionalChannel\n | EventConditionalCountry\n | EventConditionalCustom\n | EventConditionalQueueStatus\n | EventHandoff\n | EventHandoffOption\n | EventKeyword\n | EventIntentSmart\n | EventWebviewActionTriggered\n | EventFallback\n | EventWebviewStep\n | EventWebviewEnd\n | EventCustom\n | EventAiAgent\n | EventAiAgentRouter\n | EventRedirectFlow\n | EventCaptureUserInput\n\nexport interface RequestData {\n userId?: string\n botInteractionId: string\n userLocale: string\n userCountry: string\n systemLocale: string\n}\n\nexport {\n EventAction,\n type EventAiAgent,\n type EventAiAgentRouter,\n type AvailableSpecialist,\n type EventBotAction,\n type EventCaptureUserInput,\n type EventConditionalChannel,\n type EventConditionalCountry,\n type EventConditionalCustom,\n type EventConditionalQueueStatus,\n type EventCustom,\n type EventFallback,\n type EventFeedback,\n type EventFlow,\n type EventHandoff,\n type EventHandoffOption,\n type EventIntentSmart,\n type EventKeyword,\n type EventWebviewActionTriggered,\n type EventWebviewEnd,\n type EventWebviewStep,\n type ToolExecution,\n WebviewEndFailType,\n}\n"],"names":["EventAction","WebviewEndFailType","EventType"],"mappings":";AAyBsB;AAEf,IAAKE,eAASA,0BAATA;;;WAAAA;MAGX;AAwDA"}
|
package/lib/esm/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../src/utils.ts"],"sourcesContent":["/* eslint-disable complexity */\nimport {\n HtEvent,\n HtEventAiAgent,\n HtEventAiAgentRouter,\n HtEventBotAction,\n HtEventConditionalChannel,\n HtEventConditionalCountry,\n HtEventConditionalCustom,\n HtEventConditionalQueueStatus,\n HtEventCustom,\n HtEventFallback,\n HtEventFeedback,\n HtEventFlow,\n HtEventHandoff,\n HtEventHandoffOption,\n HtEventIntentSmart,\n HtEventKeyword,\n HtEventRedirectFlow,\n HtEventWebviewActionTriggered,\n HtEventWebviewEnd,\n HtEventWebviewStep,\n} from './event-models'\nimport { HtEventCaptureUserInput } from './event-models/ht-event-capture-user-input'\nimport { EventAction, type HtEventProps, type RequestData } from './types'\n\nexport function createHtEvent(\n requestData: RequestData,\n htEventProps: HtEventProps\n): HtEvent {\n switch (htEventProps.action) {\n case EventAction.FeedbackCase:\n case EventAction.FeedbackConversation:\n case EventAction.FeedbackMessage:\n case EventAction.FeedbackWebview:\n return new HtEventFeedback(htEventProps, requestData)\n\n case EventAction.FlowNode:\n return new HtEventFlow(htEventProps, requestData)\n\n case EventAction.HandoffOption:\n return new HtEventHandoffOption(htEventProps, requestData)\n\n case EventAction.HandoffSuccess:\n case EventAction.HandoffFail:\n return new HtEventHandoff(htEventProps, requestData)\n\n case EventAction.Keyword:\n return new HtEventKeyword(htEventProps, requestData)\n\n case EventAction.IntentSmart:\n return new HtEventIntentSmart(htEventProps, requestData)\n\n case EventAction.Fallback:\n return new HtEventFallback(htEventProps, requestData)\n\n case EventAction.WebviewStep:\n return new HtEventWebviewStep(htEventProps, requestData)\n\n case EventAction.WebviewEnd:\n return new HtEventWebviewEnd(htEventProps, requestData)\n\n case EventAction.Custom:\n return new HtEventCustom(htEventProps, requestData)\n\n case EventAction.AiAgent:\n return new HtEventAiAgent(htEventProps, requestData)\n\n case EventAction.AiAgentRouter:\n return new HtEventAiAgentRouter(htEventProps, requestData)\n\n case EventAction.ConditionalCountry:\n return new HtEventConditionalCountry(htEventProps, requestData)\n\n case EventAction.ConditionalQueueStatus:\n return new HtEventConditionalQueueStatus(htEventProps, requestData)\n\n case EventAction.ConditionalCustom:\n return new HtEventConditionalCustom(htEventProps, requestData)\n\n case EventAction.ConditionalChannel:\n return new HtEventConditionalChannel(htEventProps, requestData)\n\n case EventAction.BotAction:\n return new HtEventBotAction(htEventProps, requestData)\n\n case EventAction.WebviewActionTriggered:\n return new HtEventWebviewActionTriggered(htEventProps, requestData)\n\n case EventAction.RedirectFlow:\n return new HtEventRedirectFlow(htEventProps, requestData)\n\n case EventAction.CaptureUserInput:\n return new HtEventCaptureUserInput(htEventProps, requestData)\n\n default:\n return new HtEvent(htEventProps, requestData)\n }\n}\n"],"names":["HtEvent","HtEventAiAgent","HtEventAiAgentRouter","HtEventBotAction","HtEventConditionalChannel","HtEventConditionalCountry","HtEventConditionalCustom","HtEventConditionalQueueStatus","HtEventCustom","HtEventFallback","HtEventFeedback","HtEventFlow","HtEventHandoff","HtEventHandoffOption","HtEventIntentSmart","HtEventKeyword","HtEventRedirectFlow","HtEventWebviewActionTriggered","HtEventWebviewEnd","HtEventWebviewStep","HtEventCaptureUserInput","EventAction","createHtEvent","requestData","htEventProps"],"mappings":";;;;;;;AAAA,6BAA6B,GAsBN;AAC6D;AACV;AAEnE,SAASsB,aAAaA,CAC3BC,WAAwB,EACxBC,YAA0B;IAE1B,OAAQA,aAAa,MAAM;QACzB,KAAKH,wBAAwB;QAC7B,KAAKA,gCAAgC;QACrC,KAAKA,2BAA2B;QAChC,KAAKA,2BAA2B;YAC9B,OAAO,IAAIX,eAAeA,CAACc,cAAcD;QAE3C,KAAKF,oBAAoB;YACvB,OAAO,IAAIV,WAAWA,CAACa,cAAcD;QAEvC,KAAKF,yBAAyB;YAC5B,OAAO,IAAIR,oBAAoBA,CAACW,cAAcD;QAEhD,KAAKF,0BAA0B;QAC/B,KAAKA,uBAAuB;YAC1B,OAAO,IAAIT,cAAcA,CAACY,cAAcD;QAE1C,KAAKF,mBAAmB;YACtB,OAAO,IAAIN,cAAcA,CAACS,cAAcD;QAE1C,KAAKF,uBAAuB;YAC1B,OAAO,IAAIP,kBAAkBA,CAACU,cAAcD;QAE9C,KAAKF,oBAAoB;YACvB,OAAO,IAAIZ,eAAeA,CAACe,cAAcD;QAE3C,KAAKF,uBAAuB;YAC1B,OAAO,IAAIF,kBAAkBA,CAACK,cAAcD;QAE9C,KAAKF,sBAAsB;YACzB,OAAO,IAAIH,iBAAiBA,CAACM,cAAcD;QAE7C,KAAKF,kBAAkB;YACrB,OAAO,IAAIb,aAAaA,CAACgB,cAAcD;QAEzC,KAAKF,mBAAmB;YACtB,OAAO,IAAIpB,cAAcA,CAACuB,cAAcD;QAE1C,KAAKF,yBAAyB;YAC5B,OAAO,IAAInB,oBAAoBA,CAACsB,cAAcD;QAEhD,KAAKF,8BAA8B;YACjC,OAAO,IAAIhB,yBAAyBA,CAACmB,cAAcD;QAErD,KAAKF,kCAAkC;YACrC,OAAO,IAAId,6BAA6BA,CAACiB,cAAcD;QAEzD,KAAKF,6BAA6B;YAChC,OAAO,IAAIf,wBAAwBA,CAACkB,cAAcD;QAEpD,KAAKF,8BAA8B;YACjC,OAAO,IAAIjB,yBAAyBA,CAACoB,cAAcD;QAErD,KAAKF,qBAAqB;YACxB,OAAO,IAAIlB,gBAAgBA,CAACqB,cAAcD;QAE5C,KAAKF,kCAAkC;YACrC,OAAO,IAAIJ,6BAA6BA,CAACO,cAAcD;QAEzD,KAAKF,wBAAwB;YAC3B,OAAO,IAAIL,mBAAmBA,CAACQ,cAAcD;QAE/C,KAAKF,4BAA4B;YAC/B,OAAO,IAAID,uBAAuBA,CAACI,cAAcD;QAEnD;YACE,OAAO,IAAIvB,OAAOA,CAACwB,cAAcD;IACrC;AACF"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|