import { bounds, MultiSeries, Series, TimeRange, TimeSpan, TimeStamp } from '@synnaxlabs/x';
import { z } from 'zod';
import { CreateOptions } from './factory';
import { AbstractSource, NumberSource, NumberSourceSpec, SeriesSource, SeriesSourceSpec, Spec, Telem } from './telem';
import { client } from '../client';
export declare const streamChannelValuePropsZ: z.ZodObject<{
    channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
}, z.core.$strip>;
export type StreamChannelValueProps = z.infer<typeof streamChannelValuePropsZ>;
export declare class StreamChannelValue extends AbstractSource<typeof streamChannelValuePropsZ> implements NumberSource {
    static readonly TYPE = "stream-channel-value";
    schema: z.ZodObject<{
        channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
    }, z.core.$strip>;
    private readonly client;
    private removeStreamHandler;
    private leadingBuffer;
    private valid;
    private readonly onStatusChange?;
    constructor(client: client.Client, props: unknown, options?: CreateOptions);
    /** @returns the leading series buffer for testing purposes. */
    get testingOnlyLeadingBuffer(): Series | null;
    /** @returns the internal valid flag for testing purposes */
    get testingOnlyValid(): boolean;
    cleanup(): void;
    value(): number;
    private read;
}
declare const channelDataSourcePropsZ: z.ZodObject<{
    timeRange: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
        start: z.ZodUnion<readonly [z.ZodCustom<TimeStamp, TimeStamp>, z.ZodPipe<z.ZodObject<{
            value: z.ZodBigInt;
        }, z.core.$strip>, z.ZodTransform<TimeStamp, {
            value: bigint;
        }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeStamp, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeStamp, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeStamp, bigint>>, z.ZodPipe<z.ZodDate, z.ZodTransform<TimeStamp, Date>>, z.ZodPipe<z.ZodCustom<TimeSpan, TimeSpan>, z.ZodTransform<TimeStamp, TimeSpan>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>, z.ZodTransform<TimeStamp, [number, number] | [number] | [number, number, number]>>]>;
        end: z.ZodUnion<readonly [z.ZodCustom<TimeStamp, TimeStamp>, z.ZodPipe<z.ZodObject<{
            value: z.ZodBigInt;
        }, z.core.$strip>, z.ZodTransform<TimeStamp, {
            value: bigint;
        }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeStamp, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeStamp, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeStamp, bigint>>, z.ZodPipe<z.ZodDate, z.ZodTransform<TimeStamp, Date>>, z.ZodPipe<z.ZodCustom<TimeSpan, TimeSpan>, z.ZodTransform<TimeStamp, TimeSpan>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>, z.ZodTransform<TimeStamp, [number, number] | [number] | [number, number, number]>>]>;
    }, z.core.$strip>, z.ZodTransform<TimeRange, {
        start: TimeStamp;
        end: TimeStamp;
    }>>, z.ZodCustom<TimeRange, TimeRange>]>;
    channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
    useIndexOfChannel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, z.core.$strip>;
export type ChannelDataProps = z.input<typeof channelDataSourcePropsZ>;
export declare class ChannelData extends AbstractSource<typeof channelDataSourcePropsZ> implements SeriesSource {
    static readonly TYPE = "series-source";
    private readonly client;
    schema: z.ZodObject<{
        timeRange: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
            start: z.ZodUnion<readonly [z.ZodCustom<TimeStamp, TimeStamp>, z.ZodPipe<z.ZodObject<{
                value: z.ZodBigInt;
            }, z.core.$strip>, z.ZodTransform<TimeStamp, {
                value: bigint;
            }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeStamp, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeStamp, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeStamp, bigint>>, z.ZodPipe<z.ZodDate, z.ZodTransform<TimeStamp, Date>>, z.ZodPipe<z.ZodCustom<TimeSpan, TimeSpan>, z.ZodTransform<TimeStamp, TimeSpan>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>, z.ZodTransform<TimeStamp, [number, number] | [number] | [number, number, number]>>]>;
            end: z.ZodUnion<readonly [z.ZodCustom<TimeStamp, TimeStamp>, z.ZodPipe<z.ZodObject<{
                value: z.ZodBigInt;
            }, z.core.$strip>, z.ZodTransform<TimeStamp, {
                value: bigint;
            }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeStamp, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeStamp, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeStamp, bigint>>, z.ZodPipe<z.ZodDate, z.ZodTransform<TimeStamp, Date>>, z.ZodPipe<z.ZodCustom<TimeSpan, TimeSpan>, z.ZodTransform<TimeStamp, TimeSpan>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodTuple<[z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>, z.ZodTransform<TimeStamp, [number, number] | [number] | [number, number, number]>>]>;
        }, z.core.$strip>, z.ZodTransform<TimeRange, {
            start: TimeStamp;
            end: TimeStamp;
        }>>, z.ZodCustom<TimeRange, TimeRange>]>;
        channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
        useIndexOfChannel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    }, z.core.$strip>;
    private data;
    private valid;
    private channel;
    private readonly onStatusChange?;
    constructor(client: client.ReadClient & client.ChannelClient, props: unknown, options?: CreateOptions);
    cleanup(): void;
    value(): [bounds.Bounds, MultiSeries];
    private read;
}
declare const streamChannelDataPropsZ: z.ZodObject<{
    channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
    useIndexOfChannel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    timeSpan: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
        value: z.ZodBigInt;
    }, z.core.$strip>, z.ZodTransform<TimeSpan, {
        value: bigint;
    }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeSpan, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeSpan, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeSpan, bigint>>, z.ZodCustom<TimeSpan, TimeSpan>, z.ZodPipe<z.ZodCustom<TimeStamp, TimeStamp>, z.ZodTransform<TimeSpan, TimeStamp>>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').Rate, import('@synnaxlabs/x').Rate>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').Rate>>]>;
    keepFor: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
        value: z.ZodBigInt;
    }, z.core.$strip>, z.ZodTransform<TimeSpan, {
        value: bigint;
    }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeSpan, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeSpan, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeSpan, bigint>>, z.ZodCustom<TimeSpan, TimeSpan>, z.ZodPipe<z.ZodCustom<TimeStamp, TimeStamp>, z.ZodTransform<TimeSpan, TimeStamp>>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').Rate, import('@synnaxlabs/x').Rate>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').Rate>>]>>;
}, z.core.$strip>;
export type StreamChannelDataProps = z.input<typeof streamChannelDataPropsZ>;
export declare class StreamChannelData extends AbstractSource<typeof streamChannelDataPropsZ> implements SeriesSource {
    static readonly TYPE = "dynamic-series-source";
    private readonly client;
    private readonly data;
    private readonly now;
    private readonly onStatusChange?;
    private channel;
    private stopStreaming?;
    private valid;
    schema: z.ZodObject<{
        channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
        useIndexOfChannel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
        timeSpan: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
            value: z.ZodBigInt;
        }, z.core.$strip>, z.ZodTransform<TimeSpan, {
            value: bigint;
        }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeSpan, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeSpan, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeSpan, bigint>>, z.ZodCustom<TimeSpan, TimeSpan>, z.ZodPipe<z.ZodCustom<TimeStamp, TimeStamp>, z.ZodTransform<TimeSpan, TimeStamp>>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').Rate, import('@synnaxlabs/x').Rate>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').Rate>>]>;
        keepFor: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
            value: z.ZodBigInt;
        }, z.core.$strip>, z.ZodTransform<TimeSpan, {
            value: bigint;
        }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeSpan, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeSpan, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeSpan, bigint>>, z.ZodCustom<TimeSpan, TimeSpan>, z.ZodPipe<z.ZodCustom<TimeStamp, TimeStamp>, z.ZodTransform<TimeSpan, TimeStamp>>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').Rate, import('@synnaxlabs/x').Rate>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').Rate>>]>>;
    }, z.core.$strip>;
    constructor(client: client.Client, props: unknown, options?: CreateOptions, now?: () => TimeStamp);
    value(): [bounds.Bounds, MultiSeries];
    private read;
    private gcOutOfRangeData;
    cleanup(): void;
}
export declare class RemoteFactory implements RemoteFactory {
    type: string;
    private readonly client;
    constructor(client: client.Client);
    create(spec: Spec, options?: CreateOptions): Telem | null;
}
export declare const channelData: (props: ChannelDataProps) => SeriesSourceSpec;
export declare const streamChannelData: (props: StreamChannelDataProps) => SeriesSourceSpec;
export declare const streamChannelValue: (props: Omit<StreamChannelValueProps, "units">) => NumberSourceSpec;
export {};
//# sourceMappingURL=remote.d.ts.map