import { AuthClient } from "../auth/auth-client.js"; export type LastValuePayload = { topic: string; value: unknown; values?: Record | null; uom?: string | null; timestamp?: string | null; dataGroup?: string | null; ageMs?: number | null; source: string; }; export type CatchAllTimeField = "auto" | "timestamp" | "interval"; export type CatchAllAggregate = "avg" | "min" | "max" | "last" | "sum" | "count"; export type RangeQueryOptions = { table?: string; from?: string; to?: string; timeField?: CatchAllTimeField; limit?: number; maxPoints?: number; bucketMs?: number; aggregate?: CatchAllAggregate; column?: string; summaryOnly?: boolean; dedupe?: boolean; }; export type RangeColumn = { name: string; type?: string; }; export type RangeStats = Record & { raw?: { columns?: RangeColumn[]; }; }; export type RangePayload = { data: Row[]; stats?: RangeStats | null; }; export type BatchRangeTopicPayload = { topic: string; error?: string | null; data: Row[]; stats?: RangeStats | null; }; export type BatchRangeResponsePayload = { results: BatchRangeTopicPayload[]; stats?: Record | null; }; export declare class RangeResult { readonly data: Row[]; readonly stats?: RangeStats | null; constructor(payload: RangePayload); static fromMapping(value: Record): RangeResult; get columns(): RangeColumn[]; toRecords(): Array>; toObject(): RangePayload; } export declare class BatchRangeTopicResult extends RangeResult { readonly topic: string; readonly error?: string | null; constructor(payload: BatchRangeTopicPayload); static fromMapping(value: Record): BatchRangeTopicResult; toObject(): BatchRangeTopicPayload; } export declare class BatchRangeResponse { readonly results: BatchRangeTopicResult[]; readonly stats?: Record | null; constructor(payload: BatchRangeResponsePayload); static fromMapping(value: Record): BatchRangeResponse; get byTopic(): Record>; toObject(): BatchRangeResponsePayload; } export declare class LastValueResult { readonly topic: string; readonly value: unknown; readonly values?: Record | null; readonly uom?: string | null; readonly timestamp?: string | null; readonly dataGroup?: string | null; readonly ageMs?: number | null; readonly source: string; constructor(payload: LastValuePayload); static fromMapping(value: Record): LastValueResult; get hit(): boolean; toObject(): LastValuePayload; } export declare class ClientError extends Error { readonly statusCode?: number; constructor(message: string, statusCode?: number); } export type UnsClientOptions = { apiBasePath?: string; token?: string; timeoutMs?: number; authClient?: AuthClient; }; export type RequestOptions = { baseUrl?: string; authorize?: boolean; }; export declare class UnsClient { private readonly apiBasePath; private readonly baseUrl; private readonly apiUrl; private readonly timeoutMs; private readonly authClient?; private manualAccessToken?; constructor(baseUrl: string, options?: UnsClientOptions); setToken(token?: string): void; ensureToken(): Promise; get(endpoint: string, params?: Record, options?: RequestOptions): Promise; getData(endpoint: string, params?: Record, options?: RequestOptions): Promise; post(endpoint: string, body?: Record, options?: RequestOptions): Promise>; lastValue(topics: string | string[], options?: { token?: string; }): Promise | null>; getAttributeData(topicPath: string, options?: RangeQueryOptions & { token?: string; }): Promise | null>; history(topics: string | string[], options?: RangeQueryOptions & { token?: string; }): Promise | null>; private requestJson; private request; private buildUrl; private stringifyQueryParams; private buildQuerySuffix; private static normalizeBasePath; } //# sourceMappingURL=datahub-client.d.ts.map