import { channel, framer, status as cstatus } from '@synnaxlabs/client'; import { bounds, breaker, MultiSeries, Series, TimeRange, TimeSpan, TimeStamp } from '@synnaxlabs/x'; import { z } from 'zod'; import { CreateOptions } from './factory'; import { AbstractSource, NumberSource, NumberSourceSpec, SeriesSource, SeriesSourceSpec, Spec, StringSource, StringSourceSpec, Telem } from './telem'; /** The slice of a Synnax client that remote telemetry sources consume. */ export interface Client { feed: Pick; channels: { retrieve: (ch: channel.Key | channel.Name) => Promise; }; } /** Reported by remote sources created while the cluster is disconnected. */ export declare const DISCONNECTED_STATUS: cstatus.Crude; export declare const streamChannelValuePropsZ: z.ZodObject<{ channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>; }, z.core.$strip>; export type StreamChannelValueProps = z.infer; export declare class StreamChannelValue extends AbstractSource 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 generation; private valid; private readonly onStatusChange?; constructor(client: Client | null, 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; /** Never rejects: a failure invalidates the read and reaches onStatusChange. */ private read; } declare const channelDataSourcePropsZ: z.ZodObject<{ timeRange: z.ZodUnion, z.ZodPipe, z.ZodTransform>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe, z.ZodTransform>, z.ZodPipe, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>, z.ZodTransform>]>; end: z.ZodUnion, z.ZodPipe, z.ZodTransform>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe, z.ZodTransform>, z.ZodPipe, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>, z.ZodTransform>]>; }, z.core.$strip>, z.ZodTransform>, z.ZodCustom]>; channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>; useIndexOfChannel: z.ZodDefault; }, z.core.$strip>; export type ChannelDataProps = z.input; export declare class ChannelData extends AbstractSource implements SeriesSource { static readonly TYPE = "series-source"; private readonly client; schema: z.ZodObject<{ timeRange: z.ZodUnion, z.ZodPipe, z.ZodTransform>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe, z.ZodTransform>, z.ZodPipe, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>, z.ZodTransform>]>; end: z.ZodUnion, z.ZodPipe, z.ZodTransform>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe, z.ZodTransform>, z.ZodPipe, z.ZodTuple<[z.ZodInt, z.ZodInt], null>, z.ZodTuple<[z.ZodInt, z.ZodInt, z.ZodInt], null>]>, z.ZodTransform>]>; }, z.core.$strip>, z.ZodTransform>, z.ZodCustom]>; channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>; useIndexOfChannel: z.ZodDefault; }, z.core.$strip>; private data; private valid; private generation; private channel; private readonly onStatusChange?; private readonly skipLoading; constructor(client: Client | null, props: unknown, options?: CreateOptions); cleanup(): void; loading(): boolean; value(): [bounds.Bounds, MultiSeries]; /** Never rejects: a failure invalidates the read and reaches onStatusChange. */ private read; } declare const streamChannelDataPropsZ: z.ZodObject<{ channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>; useIndexOfChannel: z.ZodDefault; timeSpan: z.ZodUnion, z.ZodTransform>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodCustom, z.ZodPipe, z.ZodTransform>, z.ZodPipe, z.ZodTransform>]>; keepFor: z.ZodOptional, z.ZodTransform>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodCustom, z.ZodPipe, z.ZodTransform>, z.ZodPipe, z.ZodTransform>]>>; }, z.core.$strip>; export type StreamChannelDataProps = z.input; export declare class StreamChannelData extends AbstractSource 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; private readonly skipLoading; private generation; private readonly breaker; private readonly retryNotifier; private lastFailure?; schema: z.ZodObject<{ channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>; useIndexOfChannel: z.ZodDefault; timeSpan: z.ZodUnion, z.ZodTransform>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodCustom, z.ZodPipe, z.ZodTransform>, z.ZodPipe, z.ZodTransform>]>; keepFor: z.ZodOptional, z.ZodTransform>, z.ZodPipe>, z.ZodPipe>, z.ZodPipe>, z.ZodCustom, z.ZodPipe, z.ZodTransform>, z.ZodPipe, z.ZodTransform>]>>; }, z.core.$strip>; constructor(client: Client | null, props: unknown, options?: CreateOptions, now?: () => TimeStamp, breakerConfig?: breaker.Config); loading(): boolean; value(): [bounds.Bounds, MultiSeries]; /** * Never rejects. A connectivity failure retries under the breaker; a definitive * rejection parks the source. Every distinct failure reaches onStatusChange. */ private read; private attempt; private reportFailure; private pushNew; private gcOutOfRangeData; cleanup(): void; } export declare class StreamChannelStringValue extends AbstractSource implements StringSource { static readonly TYPE = "stream-channel-string-value"; schema: z.ZodObject<{ channel: z.ZodUnion<[z.ZodNumber, z.ZodString]>; }, z.core.$strip>; private readonly client; private removeStreamHandler; private leadingBuffer; private latest; private decodedAt; private generation; private valid; private readonly onStatusChange?; constructor(client: Client | null, props: unknown, options?: CreateOptions); cleanup(): void; value(): string; /** Never rejects: a failure invalidates the read and reaches onStatusChange. */ private read; } export declare class RemoteFactory { type: string; private readonly client; constructor(client: Client | null); 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) => NumberSourceSpec; export declare const streamChannelStringValue: (props: StreamChannelValueProps) => StringSourceSpec; export {}; //# sourceMappingURL=remote.d.ts.map