import { Content } from '@tiptap/react'; import { default as default_2 } from 'react'; import { DrawerProps } from '@antscorp/antsomi-ui'; import { Editor } from '@tiptap/react'; import { ForwardRefExoticComponent } from 'react'; import { HTMLContent } from '@tiptap/react'; import { JSONContent } from '@tiptap/react'; import { JSX as JSX_2 } from 'react/jsx-runtime'; import { MemoExoticComponent } from 'react'; import { ReactNode } from 'react'; import { RefAttributes } from 'react'; import { ReportAreaChartData } from '@antscorp/antsomi-charts'; import { ReportBarChartData } from '@antscorp/antsomi-charts'; import { ReportHeatmapData } from '@antscorp/antsomi-charts'; import { ReportPieChartData } from '@antscorp/antsomi-charts'; import { ReportScatterChartData } from '@antscorp/antsomi-charts'; import { ReportScoreCardData } from '@antscorp/antsomi-charts'; import { ReportSunburstChartData } from '@antscorp/antsomi-charts'; import { z } from 'zod'; declare type ChartActions = Partial<{ onGetInsight?: OnGetInsightFunction; buttonAddChartProps?: Partial<{ show: boolean; tooltip: string; onSelectPosition: SelectChartRenderPositionFn; onClick: ClickChartRenderPositionFn; }>; }>; declare type ChartFormatedData = LineChartData['data'] | ReportPieChartData | ReportBarChartData | ReportAreaChartData | ReportHeatmapData | ReportScatterChartData | ReportSunburstChartData | ReportScoreCardData; declare type ChartNodeViewAttrs = z.infer; declare const ChartNodeViewAttrsSchema: z.ZodUnion>; identifier: z.ZodLiteral<"PIE_CHART">; dimension: z.ZodPipe, z.ZodTransform>; metric: z.ZodPipe, z.ZodTransform>; dateRange: z.ZodPipe, z.ZodTransform>; }, z.core.$strip>, z.ZodTransform<{ dateRangeDimension: string[]; identifier: "PIE_CHART"; dimension: string[]; metric: string[]; title?: string | undefined; }, { identifier: "PIE_CHART"; dimension: string[]; metric: string[]; dateRange: string[]; title?: string | undefined; }>>, z.ZodPipe>; identifier: z.ZodLiteral<"BAR_CHART">; dimension: z.ZodPipe, z.ZodTransform>; metric: z.ZodPipe, z.ZodTransform>; dateRange: z.ZodPipe, z.ZodTransform>; }, z.core.$strip>, z.ZodTransform<{ dateRangeDimension: string[]; identifier: "BAR_CHART"; dimension: string[]; metric: string[]; title?: string | undefined; }, { identifier: "BAR_CHART"; dimension: string[]; metric: string[]; dateRange: string[]; title?: string | undefined; }>>, z.ZodPipe>; identifier: z.ZodLiteral<"LINE_CHART">; dimension: z.ZodPipe, z.ZodTransform>; metric: z.ZodPipe, z.ZodTransform>; dateRange: z.ZodPipe, z.ZodTransform>; }, z.core.$strip>, z.ZodTransform<{ timeDimension: string[]; identifier: "LINE_CHART"; dimension: string[]; metric: string[]; title?: string | undefined; }, { identifier: "LINE_CHART"; dimension: string[]; metric: string[]; dateRange: string[]; title?: string | undefined; }>>, z.ZodPipe>; identifier: z.ZodLiteral<"AREA_CHART">; dimension: z.ZodPipe, z.ZodTransform>; metric: z.ZodPipe, z.ZodTransform>; dateRange: z.ZodPipe, z.ZodTransform>; timeRange: z.ZodPipe, z.ZodTransform>; }, z.core.$strip>, z.ZodTransform<{ timeDimension: string[]; dateRangeDimension: string[]; identifier: "AREA_CHART"; dimension: string[]; metric: string[]; title?: string | undefined; }, { identifier: "AREA_CHART"; dimension: string[]; metric: string[]; dateRange: string[]; timeRange: string[]; title?: string | undefined; }>>, z.ZodPipe>; identifier: z.ZodLiteral<"TREE_MAP">; dimension: z.ZodPipe, z.ZodTransform>; metric: z.ZodPipe, z.ZodTransform>; dateRange: z.ZodPipe, z.ZodTransform>; }, z.core.$strip>, z.ZodTransform<{ dateRangeDimension: string[]; identifier: "TREE_MAP"; dimension: string[]; metric: string[]; title?: string | undefined; }, { identifier: "TREE_MAP"; dimension: string[]; metric: string[]; dateRange: string[]; title?: string | undefined; }>>, z.ZodPipe>; identifier: z.ZodLiteral<"SUNBURST_CHART">; dimension: z.ZodPipe, z.ZodTransform>; metric: z.ZodPipe, z.ZodTransform>; dateRange: z.ZodPipe, z.ZodTransform>; }, z.core.$strip>, z.ZodTransform<{ dateRangeDimension: string[]; identifier: "SUNBURST_CHART"; dimension: string[]; metric: string[]; title?: string | undefined; }, { identifier: "SUNBURST_CHART"; dimension: string[]; metric: string[]; dateRange: string[]; title?: string | undefined; }>>, z.ZodPipe>; identifier: z.ZodLiteral<"SCATTER_CHART">; dimension: z.ZodPipe, z.ZodTransform>; metricX: z.ZodPipe, z.ZodTransform>; metricY: z.ZodPipe, z.ZodTransform>; bubleSize: z.ZodPipe, z.ZodTransform>; dateRange: z.ZodPipe, z.ZodTransform>; }, z.core.$strip>, z.ZodTransform<{ dateRangeDimension: string[]; metric: string[]; identifier: "SCATTER_CHART"; dimension: string[]; metricX: string[]; metricY: string[]; bubleSize: string[]; title?: string | undefined; }, { identifier: "SCATTER_CHART"; dimension: string[]; metricX: string[]; metricY: string[]; bubleSize: string[]; dateRange: string[]; title?: string | undefined; }>>, z.ZodPipe>; identifier: z.ZodLiteral<"HEAT_MAP">; dimension: z.ZodPipe, z.ZodTransform>; metric: z.ZodPipe, z.ZodTransform>; rowDimension: z.ZodPipe, z.ZodTransform>; columnDimension: z.ZodPipe, z.ZodTransform>; dateRange: z.ZodPipe, z.ZodTransform>; }, z.core.$strip>, z.ZodTransform<{ dateRangeDimension: string[]; identifier: "HEAT_MAP"; dimension: string[]; metric: string[]; rowDimension: string[]; columnDimension: string[]; title?: string | undefined; }, { identifier: "HEAT_MAP"; dimension: string[]; metric: string[]; rowDimension: string[]; columnDimension: string[]; dateRange: string[]; title?: string | undefined; }>>, z.ZodPipe>; identifier: z.ZodLiteral<"SCORE_CARD">; metric: z.ZodPipe, z.ZodTransform>; dateRange: z.ZodPipe, z.ZodTransform>; }, z.core.$strip>, z.ZodTransform<{ dimension: never[]; dateRangeDimension: string[]; identifier: "SCORE_CARD"; metric: string[]; title?: string | undefined; }, { identifier: "SCORE_CARD"; metric: string[]; dateRange: string[]; title?: string | undefined; }>>]>; export declare const ChatInput: default_2.ForwardRefExoticComponent>; declare type ChatInputProps = { content?: Content; className?: string; isLoading?: boolean; children?: default_2.ReactNode; disabled?: boolean; slotStart?: default_2.ReactNode; slotEnd?: (defaultContent: ReactNode, editor: Editor) => ReactNode; onSubmit?: ({ json, html, text }: { json: JSONContent; html: HTMLContent; text: string; }) => void; }; declare type ChatInputRef = { focus: () => undefined | boolean; }; declare type ClickChartRenderPositionFn = (info: { attrs: ChartNodeViewAttrs; dataSourceId: Datasource['id']; }) => void; export declare const ConversationAnalytic: MemoExoticComponent<(props: ConversationAnalyticProps) => JSX_2.Element>; declare type ConversationAnalyticProps = { children?: ReactNode; zIndex?: number; drawerProps?: Pick; }; export declare const ConversationAnalyticProvider: (props: ConversationAnalyticProviderProps) => JSX_2.Element; export declare type ConversationAnalyticProviderProps = { children: ReactNode; message?: Partial<{ chart: ChartActions; }>; }; declare type Datasource = z.infer; declare const DataSourceSchema: z.ZodObject<{ connector: z.ZodObject<{ id: z.ZodCoercedNumber; name: z.ZodCoercedString; type: z.ZodCoercedNumber; icon: z.ZodPipe>, z.ZodTransform>; logo: z.ZodOptional, z.ZodTransform>; }, z.core.$strip>>; }, z.core.$strip>; isOwner: z.ZodOptional>; ctime: z.ZodCoercedDate; utime: z.ZodCoercedDate; id: z.ZodCoercedNumber; name: z.ZodCoercedString; status: z.ZodCoercedNumber; }, z.core.$strip>; export declare const DatasourceSelect: ForwardRefExoticComponent>; export declare type DatasourceSelectProps = { placement?: 'top' | 'left' | 'topLeft' | 'rightBottom'; selected?: Datasource['id']; usedIds?: Datasource['id'][]; onSelect?: (id: Datasource['id']) => void; className?: string; }; export declare type DatasourceSelectRef = { toggle: (open?: boolean) => void; }; /** * Line Chart types */ declare type LineChartData = { data: Record[]; arrYAxis: { color: string; isActive: boolean; key: string; label: string; name: string; yAxisId: string; }[]; coordinateAxis: Record; }; declare type Message = z.infer; declare const MessageSchema: z.ZodUnion; conversationId: z.ZodCoercedString; sender: z.ZodUnion, z.ZodLiteral<"assistant">]>; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; content: z.ZodUnion; help: z.ZodCoercedString; status: z.ZodUnion, z.ZodLiteral<"warning">, z.ZodLiteral<"success">]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodCoercedString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"request_data_source">; userSelected: z.ZodCoercedBoolean; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"select_data_source">; dataSourceId: z.ZodCoercedNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"chart">; text: z.ZodCoercedString; }, z.core.$strip>]>; status: z.ZodOptional>; isTemp: z.ZodOptional>; agentId: z.ZodLiteral<"general">; }, z.core.$strip>, z.ZodObject<{ id: z.ZodCoercedString; conversationId: z.ZodCoercedString; sender: z.ZodUnion, z.ZodLiteral<"assistant">]>; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; content: z.ZodUnion; help: z.ZodCoercedString; status: z.ZodUnion, z.ZodLiteral<"warning">, z.ZodLiteral<"success">]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodCoercedString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"request_data_source">; userSelected: z.ZodCoercedBoolean; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"select_data_source">; dataSourceId: z.ZodCoercedNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"chart">; text: z.ZodCoercedString; }, z.core.$strip>]>; status: z.ZodOptional>; isTemp: z.ZodOptional>; agentId: z.ZodLiteral<"visualizer">; dataSourceId: z.ZodNullable>; }, z.core.$strip>, z.ZodObject<{ id: z.ZodCoercedString; conversationId: z.ZodCoercedString; sender: z.ZodUnion, z.ZodLiteral<"assistant">]>; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; content: z.ZodUnion; help: z.ZodCoercedString; status: z.ZodUnion, z.ZodLiteral<"warning">, z.ZodLiteral<"success">]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodCoercedString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"request_data_source">; userSelected: z.ZodCoercedBoolean; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"select_data_source">; dataSourceId: z.ZodCoercedNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"chart">; text: z.ZodCoercedString; }, z.core.$strip>]>; status: z.ZodOptional>; isTemp: z.ZodOptional>; agentId: z.ZodLiteral<"writer">; }, z.core.$strip>, z.ZodObject<{ id: z.ZodCoercedString; conversationId: z.ZodCoercedString; sender: z.ZodUnion, z.ZodLiteral<"assistant">]>; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; content: z.ZodUnion; help: z.ZodCoercedString; status: z.ZodUnion, z.ZodLiteral<"warning">, z.ZodLiteral<"success">]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodCoercedString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"request_data_source">; userSelected: z.ZodCoercedBoolean; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"select_data_source">; dataSourceId: z.ZodCoercedNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"chart">; text: z.ZodCoercedString; }, z.core.$strip>]>; status: z.ZodOptional>; isTemp: z.ZodOptional>; agentId: z.ZodLiteral<"journey_creator">; }, z.core.$strip>, z.ZodObject<{ id: z.ZodCoercedString; conversationId: z.ZodCoercedString; sender: z.ZodUnion, z.ZodLiteral<"assistant">]>; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; content: z.ZodUnion; help: z.ZodCoercedString; status: z.ZodUnion, z.ZodLiteral<"warning">, z.ZodLiteral<"success">]>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodCoercedString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"request_data_source">; userSelected: z.ZodCoercedBoolean; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"select_data_source">; dataSourceId: z.ZodCoercedNumber; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"chart">; text: z.ZodCoercedString; }, z.core.$strip>]>; status: z.ZodOptional>; isTemp: z.ZodOptional>; agentId: z.ZodLiteral<"summarizer">; }, z.core.$strip>]>; declare type OnGetInsightFunction = (params: { attrs: ChartNodeViewAttrs; data: ChartFormatedData; }) => Promise; declare type SelectChartRenderPositionFn = (info: { pos: { x: number; y: number; }; attrs: ChartNodeViewAttrs; dataSourceId: Datasource['id']; }) => void; export { } declare module 'react' { interface CSSProperties { '--list-height'?: number; '--bar-delay'?: number; '--bar-color'?: string; } } declare module 'react' { interface CSSProperties { '--chart_identifier'?: string; } }