import { Ord } from 'fp-ts/lib/Ord'; import { Ordering } from 'fp-ts/lib/Ordering'; import * as t from 'io-ts'; import { EventsSortOrder, NodeStatus } from '../types'; export declare class EnumType extends t.Type { readonly _tag: 'EnumType'; enumObject: object; constructor(e: object, name?: string); } export declare const createEnumType: (e: object, name?: string | undefined) => EnumType; export declare const OffsetsResponse: t.ReadonlyC>>>; toReplicate: t.RecordC, t.NumberC>; }>>; export declare type OffsetsResponse = t.TypeOf; declare type Tags = string[]; declare type TagsOnWire = string[] | undefined; declare const Tags: t.Type; export declare const EventIO: t.TypeC<{ offset: t.Type; stream: t.Type; timestamp: t.Type; lamport: t.Type; appId: t.Type; tags: t.Type; payload: t.UnknownC; }>; export declare type Event = t.TypeOf; export declare const _compareEvents: (a: Event, b: Event) => Ordering; export declare const MonotonicEventIO: t.IntersectionC<[t.TypeC<{ offset: t.Type; stream: t.Type; timestamp: t.Type; lamport: t.Type; appId: t.Type; tags: t.Type; payload: t.UnknownC; }>, t.TypeC<{ type: t.LiteralC<"event">; caughtUp: t.BooleanC; }>]>; export declare const DiagnosticIO: t.TypeC<{ type: t.LiteralC<"diagnostic">; severity: t.KeyofC<{ warning: number; error: number; }>; message: t.StringC; }>; export declare const OffsetsIO: t.TypeC<{ type: t.LiteralC<"offsets">; offsets: t.ReadonlyC>>; }>; export declare const TimeTravelIO: t.TypeC<{ type: t.LiteralC<"timeTravel">; newStart: t.ReadonlyC; offset: t.Type; stream: t.Type; }>>; }>; export declare const SubscribeMonotonicResponseIO: t.UnionC<[t.IntersectionC<[t.TypeC<{ offset: t.Type; stream: t.Type; timestamp: t.Type; lamport: t.Type; appId: t.Type; tags: t.Type; payload: t.UnknownC; }>, t.TypeC<{ type: t.LiteralC<"event">; caughtUp: t.BooleanC; }>]>, t.TypeC<{ type: t.LiteralC<"diagnostic">; severity: t.KeyofC<{ warning: number; error: number; }>; message: t.StringC; }>, t.TypeC<{ type: t.LiteralC<"offsets">; offsets: t.ReadonlyC>>; }>, t.TypeC<{ type: t.LiteralC<"timeTravel">; newStart: t.ReadonlyC; offset: t.Type; stream: t.Type; }>>; }>]>; export declare type SubscribeMonotonicResponseIO = t.TypeOf; export declare const Event: { ord: Ord<{ offset: number; stream: string; timestamp: number; lamport: number; appId: string; tags: Tags; payload: unknown; }>; }; /** * A number of events, not necessarily from the same source */ export declare const Events: t.ArrayC; stream: t.Type; timestamp: t.Type; lamport: t.Type; appId: t.Type; tags: t.Type; payload: t.UnknownC; }>>; export declare type Events = t.TypeOf; /** * A number of generated events, that are going to be written to the store. */ export declare const UnstoredEvent: t.ReadonlyC; payload: t.UnknownC; }>>; export declare type UnstoredEvent = t.TypeOf; export declare const UnstoredEvents: t.ReadonlyArrayC; payload: t.UnknownC; }>>>; export declare type UnstoredEvents = t.TypeOf; export declare const EventsSortOrders: EnumType; export declare type EventsSortOrders = t.TypeOf; /** * Connectivity status type. */ export declare enum ConnectivityStatusType { FullyConnected = "FullyConnected", PartiallyConnected = "PartiallyConnected", NotConnected = "NotConnected" } /** * The IO-TS type parser for ConnectivityStatus. * @public */ export declare const ConnectivityStatus: t.UnionC<[t.ReadonlyC; inCurrentStatusForMs: t.NumberC; }>>, t.ReadonlyC; inCurrentStatusForMs: t.NumberC; specialsDisconnected: t.ReadonlyArrayC; swarmConnectivityLevel: t.NumberC; eventsToRead: t.NumberC; eventsToSend: t.NumberC; }>>, t.ReadonlyC; inCurrentStatusForMs: t.NumberC; eventsToRead: t.NumberC; eventsToSend: t.NumberC; }>>]>; /** * Current connectivity of the underlying Actyx node. * @public */ export declare type ConnectivityStatus = t.TypeOf; /** Hook to run on store connection being closed. */ export declare type StoreConnectionClosedHook = () => void; /** Configuration for the WebSocket store connection. */ export declare type WsStoreConfig = { /** url of the destination */ url: string; /** protocol of the destination */ protocol?: string; /** Hook, when the connection to the store is closed */ onStoreConnectionClosed?: StoreConnectionClosedHook; /** retry interval to establish the connection */ reconnectTimeout?: number; }; export declare const NodeStatusIo: EnumType; export declare const SwarmState: t.TypeC<{ peersStatus: t.RecordC, EnumType>; }>; export declare const NodeInfo: t.TypeC<{ connectedNodes: t.NumberC; uptime: t.TypeC<{ secs: t.NumberC; nanos: t.NumberC; }>; version: t.StringC; swarmState: t.UnionC<[t.UndefinedC, t.TypeC<{ peersStatus: t.RecordC, EnumType>; }>]>; }>; export declare type NodeInfo = t.TypeOf; export {};