import { Config, ContextResponse, SummaryResponse, SummaryFormat, AnalyticsConfigResponse, AnalyticsResponse, RelativeTimePeriod } from '../types'; /** * Summaries response from API (multiple summaries) */ export interface SummariesResponse { summaries: SummaryResponse[]; } /** * Custom error class for API errors */ export declare class WeavableApiError extends Error { statusCode: number; details?: Array<{ message: unknown; }> | undefined; constructor(message: string, statusCode: number, details?: Array<{ message: unknown; }> | undefined); } /** * Fetch config for a connection * GET /rest/config?connectionId=X */ export declare function fetchConfig(baseUrl: string, connectionId: string, token: string): Promise; /** * Fetch or create a context * GET /rest/context?connectionId=X&fromDateIso=Y&timeZone=Z */ export declare function fetchContext(baseUrl: string, connectionId: string, fromDateIso: string, timeZone: string, token: string): Promise; /** * Fetch multiple summaries for a context * GET /rest/summaries?contextId=X&presets=Y,Z&format=W */ export declare function fetchSummaries(baseUrl: string, contextId: string, presets: string[], format: SummaryFormat, token: string): Promise; /** * Fetch analytics configurations for a connection * GET /rest/analytics/config?connectionId=X */ export declare function fetchAnalyticsConfig(baseUrl: string, connectionId: string, token: string, preset?: string): Promise; /** * Execute analytics and get visualization result * GET /rest/analytics?connectionId=X&analyticsId=Y&timePeriod=Z&userIanaZone=W&includeDelta=V¶m.= * * `parameters` is a flat map of insight-specific parameter overrides for the single insight * being fetched (e.g. `{ lookAheadDays: 30 }`). Each entry is sent on the wire as * `param.=` and coerced/validated server-side against the insight's declared schema. */ export declare function fetchAnalytics(baseUrl: string, connectionId: string, analyticsId: string, timePeriod: RelativeTimePeriod, userIanaZone: string | undefined, includeDelta: boolean | undefined, token: string, parameters?: Record): Promise;