@botonic/plugin-hubtype-analytics
Version:
Plugin for tracking in the Hubtype backend to see the results in the Hubtype Dashbord
33 lines (30 loc) • 970 B
text/typescript
import {
EventAction,
EventConditionalCustom,
EventType,
RequestData,
} from '../types'
import { HtEvent } from './ht-event'
export class HtEventConditionalCustom extends HtEvent {
flow_thread_id: string
flow_id: string
flow_name: string
flow_node_id: string
flow_node_content_id: string
flow_node_is_meaningful: boolean
conditional_variable: string
variable_format: string
constructor(event: EventConditionalCustom, requestData: RequestData) {
super(event, requestData)
this.type = EventType.BotEvent
this.action = EventAction.ConditionalCustom
this.flow_thread_id = event.flowThreadId
this.flow_id = event.flowId
this.flow_name = event.flowName
this.flow_node_id = event.flowNodeId
this.flow_node_content_id = event.flowNodeContentId
this.conditional_variable = event.conditionalVariable
this.flow_node_is_meaningful = event.flowNodeIsMeaningful
this.variable_format = event.variableFormat
}
}