import { GetStatisticsRequest as GetStatisticsRequest$1, GetStatisticsResponse as GetStatisticsResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** * Aggregated AI Site-Chat statistics for a site. * * Statistics include daily KPI rows for recent activity and period KPI rows for comparison windows, such as the last 30 days and the previous 30 days. */ interface Statistics { /** * Site ID the statistics are scoped to. * @format GUID */ id?: string; /** * Typed daily statistics. * * Deprecated. Use `dailyKpis` instead. * @maxSize 30 * @deprecated Typed daily statistics. * * Deprecated. Use `dailyKpis` instead. * @replacedBy daily_kpis * @targetRemovalDate 2026-02-03 */ dailies?: Daily[]; /** * Typed period statistics. * * Deprecated. Use `periodKpis` instead. * @maxSize 10 * @deprecated Typed period statistics. * * Deprecated. Use `periodKpis` instead. * @replacedBy period_kpis * @targetRemovalDate 2026-02-03 */ timespans?: Timespan[]; /** * Daily KPI rows for the last 30 days. * * Each row contains the fields requested in `dailyFields`, or all default daily KPI fields if `dailyFields` isn't provided. * @maxSize 30 */ dailyKpis?: Record[] | null; /** * Period KPI rows for comparison windows. * * Each row contains the fields requested in `byPeriodFields`, or all default period KPI fields if `byPeriodFields` isn't provided. * @maxSize 10 */ periodKpis?: Record[] | null; } interface Daily { /** Date the daily statistics are for. */ date?: Date | null; /** Number of conversations on this date. */ conversations?: string | null; /** * Number of messages on this date. * * Deprecated. * @deprecated */ messages?: string | null; /** Number of unique visitors on this date. */ visitors?: string | null; /** Number of product items shown or recommended in AI Site-Chat on this date. */ exposedItems?: string | null; /** Number of orders associated with AI Site-Chat activity on this date. */ orders?: string | null; /** Chat handler the daily statistics are grouped by. */ chatHandler?: ChatHandlerWithLiterals; /** Number of conversations that received a response on this date. */ repliedConversationsCount?: string | null; } declare enum ChatHandler { /** Unknown handler. */ UNKNOWN_HANDLER = "UNKNOWN_HANDLER", /** AI assistant. */ AI = "AI", /** Wix user, such as a site owner or contributor. */ WIX_USER = "WIX_USER" } /** @enumType */ type ChatHandlerWithLiterals = ChatHandler | 'UNKNOWN_HANDLER' | 'AI' | 'WIX_USER'; interface Timespan { /** Comparison period the statistics are aggregated for. */ period?: PeriodWithLiterals; /** Number of conversations in this period. */ conversations?: string | null; /** * Number of messages in this period. * * Deprecated. * @deprecated */ messages?: string | null; /** Number of unique visitors in this period. */ visitors?: string | null; /** Number of product items shown or recommended in AI Site-Chat in this period. */ exposedItems?: string | null; /** Number of orders associated with AI Site-Chat activity in this period. */ orders?: string | null; /** Chat handler the period statistics are grouped by. */ chatHandler?: ChatHandlerWithLiterals; /** Number of conversations that received a response in this period. */ repliedConversationsCount?: string | null; /** Median response time in seconds. */ medianResponseTimeSecondsP50?: string | null; /** Median first response time in seconds. */ medianFirstResponseTimeSecondsP50?: string | null; } declare enum Period { /** Unknown period. */ UNKNOWN_PERIOD = "UNKNOWN_PERIOD", /** Rolling 30-day period from the current date. */ LAST_30_DAYS = "LAST_30_DAYS", /** The 30-day period before `LAST_30_DAYS`. */ PREVIOUS_30_DAYS = "PREVIOUS_30_DAYS" } /** @enumType */ type PeriodWithLiterals = Period | 'UNKNOWN_PERIOD' | 'LAST_30_DAYS' | 'PREVIOUS_30_DAYS'; interface GetStatisticsRequest { /** * Daily KPI fields to return in `statistics.dailyKpis`. * * Supported values: `kpi_date`, `mode`, `conversations_count`, `visitors_distinct_count`, `exposed_items_count`, `total_orders_count`, `replied_conversations_count`, `response_time_seconds_p50`, `first_response_time_seconds_p50`. * * Default: All supported daily KPI fields. */ dailyFields?: string[]; /** * Period KPI fields to return in `statistics.periodKpis`. * * Supported values: `period`, `mode`, `conversations_count`, `visitors_distinct_count`, `exposed_items_count`, `total_orders_count`, `replied_conversations_count`, `response_time_seconds_p50`, `first_response_time_seconds_p50`. * * Default: All supported period KPI fields. */ byPeriodFields?: string[]; } interface GetStatisticsResponse { /** Aggregated AI Site-Chat statistics for the authenticated site. */ statistics?: Statistics; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function getStatistics(): __PublicMethodMetaInfo<'GET', {}, GetStatisticsRequest$1, GetStatisticsRequest, GetStatisticsResponse$1, GetStatisticsResponse>; export { ChatHandler as ChatHandlerOriginal, type ChatHandlerWithLiterals as ChatHandlerWithLiteralsOriginal, type Daily as DailyOriginal, type GetStatisticsRequest as GetStatisticsRequestOriginal, type GetStatisticsResponse as GetStatisticsResponseOriginal, Period as PeriodOriginal, type PeriodWithLiterals as PeriodWithLiteralsOriginal, type Statistics as StatisticsOriginal, type Timespan as TimespanOriginal, type __PublicMethodMetaInfo, getStatistics };