import { client } from '../client';
import { AbstractSource, Spec, NumberSource, Telem, SeriesSourceSpec, NumberSourceSpec, SeriesSource } from './telem';
import { z } from 'zod';
import { bounds, TimeRange, Series, TimeSpan, TimeStamp } from '@synnaxlabs/x';

export declare const streamChannelValuePropsZ: z.ZodObject<{
    channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
}, "strip", z.ZodTypeAny, {
    channel: string | number;
}, {
    channel: string | number;
}>;
export type StreamChannelValueProps = z.infer<typeof streamChannelValuePropsZ>;
export declare class StreamChannelValue extends AbstractSource<typeof streamChannelValuePropsZ> implements NumberSource {
    private readonly client;
    private removeStreamHandler;
    private channelKey;
    static readonly TYPE = "stream-channel-value";
    schema: z.ZodObject<{
        channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
    }, "strip", z.ZodTypeAny, {
        channel: string | number;
    }, {
        channel: string | number;
    }>;
    private leadingBuffer;
    private valid;
    constructor(client: client.Client, props: unknown);
    /** @returns the leading series buffer for testing purposes. */
    get testingOnlyLeadingBuffer(): Series | null;
    /** @returns the internal valid flag for testing purposes */
    get testingOnlyValid(): boolean;
    cleanup(): Promise<void>;
    value(): Promise<number>;
    read(): Promise<void>;
    private updateStreamHandler;
}
declare const channelDataSourcePropsZ: z.ZodObject<{
    timeRange: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
        start: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
            value: z.ZodBigInt;
        }, "strip", z.ZodTypeAny, {
            value: bigint;
        }, {
            value: bigint;
        }>, TimeStamp, {
            value: bigint;
        }>, z.ZodEffects<z.ZodString, TimeStamp, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeStamp, Number>, z.ZodEffects<z.ZodNumber, TimeStamp, number>, z.ZodType<TimeStamp, z.ZodTypeDef, TimeStamp>]>;
        end: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
            value: z.ZodBigInt;
        }, "strip", z.ZodTypeAny, {
            value: bigint;
        }, {
            value: bigint;
        }>, TimeStamp, {
            value: bigint;
        }>, z.ZodEffects<z.ZodString, TimeStamp, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeStamp, Number>, z.ZodEffects<z.ZodNumber, TimeStamp, number>, z.ZodType<TimeStamp, z.ZodTypeDef, TimeStamp>]>;
    }, "strip", z.ZodTypeAny, {
        start: TimeStamp;
        end: TimeStamp;
    }, {
        start: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
            value: bigint;
        }) | (number & {
            value: bigint;
        }) | (Number & {
            value: bigint;
        }) | ({
            value: bigint;
        } & string) | ({
            value: bigint;
        } & number) | ({
            value: bigint;
        } & Number) | ({
            value: bigint;
        } & {
            value: bigint;
        });
        end: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
            value: bigint;
        }) | (number & {
            value: bigint;
        }) | (Number & {
            value: bigint;
        }) | ({
            value: bigint;
        } & string) | ({
            value: bigint;
        } & number) | ({
            value: bigint;
        } & Number) | ({
            value: bigint;
        } & {
            value: bigint;
        });
    }>, TimeRange, {
        start: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
            value: bigint;
        }) | (number & {
            value: bigint;
        }) | (Number & {
            value: bigint;
        }) | ({
            value: bigint;
        } & string) | ({
            value: bigint;
        } & number) | ({
            value: bigint;
        } & Number) | ({
            value: bigint;
        } & {
            value: bigint;
        });
        end: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
            value: bigint;
        }) | (number & {
            value: bigint;
        }) | (Number & {
            value: bigint;
        }) | ({
            value: bigint;
        } & string) | ({
            value: bigint;
        } & number) | ({
            value: bigint;
        } & Number) | ({
            value: bigint;
        } & {
            value: bigint;
        });
    }>, z.ZodType<TimeRange, z.ZodTypeDef, TimeRange>]>;
    channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
    useIndexOfChannel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
    channel: string | number;
    timeRange: TimeRange;
    useIndexOfChannel: boolean;
}, {
    channel: string | number;
    timeRange: (TimeRange | {
        start: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
            value: bigint;
        }) | (number & {
            value: bigint;
        }) | (Number & {
            value: bigint;
        }) | ({
            value: bigint;
        } & string) | ({
            value: bigint;
        } & number) | ({
            value: bigint;
        } & Number) | ({
            value: bigint;
        } & {
            value: bigint;
        });
        end: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
            value: bigint;
        }) | (number & {
            value: bigint;
        }) | (Number & {
            value: bigint;
        }) | ({
            value: bigint;
        } & string) | ({
            value: bigint;
        } & number) | ({
            value: bigint;
        } & Number) | ({
            value: bigint;
        } & {
            value: bigint;
        });
    }) & (TimeRange | {
        start: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
            value: bigint;
        }) | (number & {
            value: bigint;
        }) | (Number & {
            value: bigint;
        }) | ({
            value: bigint;
        } & string) | ({
            value: bigint;
        } & number) | ({
            value: bigint;
        } & Number) | ({
            value: bigint;
        } & {
            value: bigint;
        });
        end: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
            value: bigint;
        }) | (number & {
            value: bigint;
        }) | (Number & {
            value: bigint;
        }) | ({
            value: bigint;
        } & string) | ({
            value: bigint;
        } & number) | ({
            value: bigint;
        } & Number) | ({
            value: bigint;
        } & {
            value: bigint;
        });
    } | undefined);
    useIndexOfChannel?: boolean | undefined;
}>;
export type ChannelDataProps = z.input<typeof channelDataSourcePropsZ>;
export declare class ChannelData extends AbstractSource<typeof channelDataSourcePropsZ> implements ChannelData {
    static readonly TYPE = "series-source";
    private readonly client;
    private data;
    private valid;
    schema: z.ZodObject<{
        timeRange: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
            start: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
                value: z.ZodBigInt;
            }, "strip", z.ZodTypeAny, {
                value: bigint;
            }, {
                value: bigint;
            }>, TimeStamp, {
                value: bigint;
            }>, z.ZodEffects<z.ZodString, TimeStamp, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeStamp, Number>, z.ZodEffects<z.ZodNumber, TimeStamp, number>, z.ZodType<TimeStamp, z.ZodTypeDef, TimeStamp>]>;
            end: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
                value: z.ZodBigInt;
            }, "strip", z.ZodTypeAny, {
                value: bigint;
            }, {
                value: bigint;
            }>, TimeStamp, {
                value: bigint;
            }>, z.ZodEffects<z.ZodString, TimeStamp, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeStamp, Number>, z.ZodEffects<z.ZodNumber, TimeStamp, number>, z.ZodType<TimeStamp, z.ZodTypeDef, TimeStamp>]>;
        }, "strip", z.ZodTypeAny, {
            start: TimeStamp;
            end: TimeStamp;
        }, {
            start: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
                value: bigint;
            }) | (number & {
                value: bigint;
            }) | (Number & {
                value: bigint;
            }) | ({
                value: bigint;
            } & string) | ({
                value: bigint;
            } & number) | ({
                value: bigint;
            } & Number) | ({
                value: bigint;
            } & {
                value: bigint;
            });
            end: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
                value: bigint;
            }) | (number & {
                value: bigint;
            }) | (Number & {
                value: bigint;
            }) | ({
                value: bigint;
            } & string) | ({
                value: bigint;
            } & number) | ({
                value: bigint;
            } & Number) | ({
                value: bigint;
            } & {
                value: bigint;
            });
        }>, TimeRange, {
            start: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
                value: bigint;
            }) | (number & {
                value: bigint;
            }) | (Number & {
                value: bigint;
            }) | ({
                value: bigint;
            } & string) | ({
                value: bigint;
            } & number) | ({
                value: bigint;
            } & Number) | ({
                value: bigint;
            } & {
                value: bigint;
            });
            end: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
                value: bigint;
            }) | (number & {
                value: bigint;
            }) | (Number & {
                value: bigint;
            }) | ({
                value: bigint;
            } & string) | ({
                value: bigint;
            } & number) | ({
                value: bigint;
            } & Number) | ({
                value: bigint;
            } & {
                value: bigint;
            });
        }>, z.ZodType<TimeRange, z.ZodTypeDef, TimeRange>]>;
        channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
        useIndexOfChannel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    }, "strip", z.ZodTypeAny, {
        channel: string | number;
        timeRange: TimeRange;
        useIndexOfChannel: boolean;
    }, {
        channel: string | number;
        timeRange: (TimeRange | {
            start: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
                value: bigint;
            }) | (number & {
                value: bigint;
            }) | (Number & {
                value: bigint;
            }) | ({
                value: bigint;
            } & string) | ({
                value: bigint;
            } & number) | ({
                value: bigint;
            } & Number) | ({
                value: bigint;
            } & {
                value: bigint;
            });
            end: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
                value: bigint;
            }) | (number & {
                value: bigint;
            }) | (Number & {
                value: bigint;
            }) | ({
                value: bigint;
            } & string) | ({
                value: bigint;
            } & number) | ({
                value: bigint;
            } & Number) | ({
                value: bigint;
            } & {
                value: bigint;
            });
        }) & (TimeRange | {
            start: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
                value: bigint;
            }) | (number & {
                value: bigint;
            }) | (Number & {
                value: bigint;
            }) | ({
                value: bigint;
            } & string) | ({
                value: bigint;
            } & number) | ({
                value: bigint;
            } & Number) | ({
                value: bigint;
            } & {
                value: bigint;
            });
            end: string | number | Number | TimeStamp | (string & Number) | (string & TimeStamp) | (number & Number) | (number & TimeStamp) | (Number & string) | (Number & number) | (Number & TimeStamp) | (TimeStamp & string) | (TimeStamp & number) | (TimeStamp & Number) | (string & {
                value: bigint;
            }) | (number & {
                value: bigint;
            }) | (Number & {
                value: bigint;
            }) | ({
                value: bigint;
            } & string) | ({
                value: bigint;
            } & number) | ({
                value: bigint;
            } & Number) | ({
                value: bigint;
            } & {
                value: bigint;
            });
        } | undefined);
        useIndexOfChannel?: boolean | undefined;
    }>;
    constructor(client: client.ReadClient & client.ChannelClient, props: unknown);
    cleanup(): Promise<void>;
    value(): Promise<[bounds.Bounds, Series[]]>;
    private readFixed;
}
declare const streamChannelDataPropsZ: z.ZodObject<{
    channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
    useIndexOfChannel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    timeSpan: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
        value: z.ZodBigInt;
    }, "strip", z.ZodTypeAny, {
        value: bigint;
    }, {
        value: bigint;
    }>, TimeSpan, {
        value: bigint;
    }>, z.ZodEffects<z.ZodString, TimeSpan, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeSpan, Number>, z.ZodEffects<z.ZodNumber, TimeSpan, number>, z.ZodType<TimeSpan, z.ZodTypeDef, TimeSpan>]>;
    keepFor: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
        value: z.ZodBigInt;
    }, "strip", z.ZodTypeAny, {
        value: bigint;
    }, {
        value: bigint;
    }>, TimeSpan, {
        value: bigint;
    }>, z.ZodEffects<z.ZodString, TimeSpan, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeSpan, Number>, z.ZodEffects<z.ZodNumber, TimeSpan, number>, z.ZodType<TimeSpan, z.ZodTypeDef, TimeSpan>]>>;
}, "strip", z.ZodTypeAny, {
    channel: string | number;
    useIndexOfChannel: boolean;
    timeSpan: TimeSpan;
    keepFor?: TimeSpan | undefined;
}, {
    channel: string | number;
    timeSpan: string | number | Number | TimeSpan | (string & Number) | (number & Number) | (Number & string) | (Number & number) | {
        value: bigint;
    } | (string & TimeSpan) | (string & {
        value: bigint;
    }) | (number & TimeSpan) | (number & {
        value: bigint;
    }) | (Number & TimeSpan) | (Number & {
        value: bigint;
    }) | (TimeSpan & string) | (TimeSpan & number) | (TimeSpan & Number) | ({
        value: bigint;
    } & string) | ({
        value: bigint;
    } & number) | ({
        value: bigint;
    } & Number);
    useIndexOfChannel?: boolean | undefined;
    keepFor?: string | number | Number | TimeSpan | {
        value: bigint;
    } | undefined;
}>;
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 stopStreaming?;
    private valid;
    schema: z.ZodObject<{
        channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
        useIndexOfChannel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
        timeSpan: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
            value: z.ZodBigInt;
        }, "strip", z.ZodTypeAny, {
            value: bigint;
        }, {
            value: bigint;
        }>, TimeSpan, {
            value: bigint;
        }>, z.ZodEffects<z.ZodString, TimeSpan, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeSpan, Number>, z.ZodEffects<z.ZodNumber, TimeSpan, number>, z.ZodType<TimeSpan, z.ZodTypeDef, TimeSpan>]>;
        keepFor: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
            value: z.ZodBigInt;
        }, "strip", z.ZodTypeAny, {
            value: bigint;
        }, {
            value: bigint;
        }>, TimeSpan, {
            value: bigint;
        }>, z.ZodEffects<z.ZodString, TimeSpan, string>, z.ZodEffects<z.ZodType<Number, z.ZodTypeDef, Number>, TimeSpan, Number>, z.ZodEffects<z.ZodNumber, TimeSpan, number>, z.ZodType<TimeSpan, z.ZodTypeDef, TimeSpan>]>>;
    }, "strip", z.ZodTypeAny, {
        channel: string | number;
        useIndexOfChannel: boolean;
        timeSpan: TimeSpan;
        keepFor?: TimeSpan | undefined;
    }, {
        channel: string | number;
        timeSpan: string | number | Number | TimeSpan | (string & Number) | (number & Number) | (Number & string) | (Number & number) | {
            value: bigint;
        } | (string & TimeSpan) | (string & {
            value: bigint;
        }) | (number & TimeSpan) | (number & {
            value: bigint;
        }) | (Number & TimeSpan) | (Number & {
            value: bigint;
        }) | (TimeSpan & string) | (TimeSpan & number) | (TimeSpan & Number) | ({
            value: bigint;
        } & string) | ({
            value: bigint;
        } & number) | ({
            value: bigint;
        } & Number);
        useIndexOfChannel?: boolean | undefined;
        keepFor?: string | number | Number | TimeSpan | {
            value: bigint;
        } | undefined;
    }>;
    constructor(client: client.Client, props: unknown);
    value(): Promise<[bounds.Bounds, Series[]]>;
    private read;
    private updateStreamHandler;
    private gcOutOfRangeData;
    cleanup(): Promise<void>;
}
export declare class RemoteFactory implements RemoteFactory {
    type: string;
    private readonly client;
    constructor(client: client.Client);
    create(spec: Spec): 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