UNPKG

@brimdata/zealot

Version:

The Javascript Client for Zed Lakes

111 lines (110 loc) 2.52 kB
declare type ID = string; export declare type NoId<T extends object> = Omit<T, "id">; export declare type FieldType = { name: string; type: Type; }; export declare type PrimitiveType = { kind: "primitive"; name: string; }; export declare type RecordType = { id: number; kind: "record"; fields: FieldType[] | null; }; export declare type ArrayType = { id: number; kind: "array"; type: Type; }; export declare type SetType = { id: number; kind: "set"; type: Type; }; export declare type UnionType = { id: number; kind: "union"; types: Type[]; }; export declare type EnumType = { kind: "enum"; symbols: string[]; }; export declare type MapType = { kind: "map"; key_type: Type; val_type: Type; }; export declare type TypeDefType = { kind: "typedef"; name: ID; type: Type; }; export declare type NamedType = { kind: "named"; name: string; id: number; type: Type; }; export declare type ErrorType = { id: number; kind: "error"; type: Type; }; export declare type RefType = { kind: "ref"; id: number; }; export declare type Type = PrimitiveType | RecordType | ArrayType | SetType | UnionType | EnumType | MapType | RefType | NamedType | ErrorType; export declare type Value = string | null | Type | NoId<Type> | Value[]; export declare type ArrayValue = Value[] | null; export declare type SetValue = Value[] | null; export declare type UnionValue = [string, Value]; export declare type RecordValue = Value[]; export declare type EncodedField = { record: Object; path: string | string[]; }; export declare type Object = { type: Type; value: Value; }; export declare type QueryChannelSet = { type: "QueryChannelSet"; value: { channel_id: number; }; }; export declare type QueryChannelEnd = { type: "QueryChannelEnd"; value: { channel_id: number; }; }; export declare type QueryStats = { type: "QueryStats"; value: { start_time: { sec: number; ns: number; }; update_time: { sec: number; ns: number; }; bytes_read: number; bytes_matched: number; records_read: number; recods_matched: number; }; }; export declare type QueryError = { type: "QueryError"; value: { error: string; }; }; export declare type QueryObject = QueryError | QueryChannelSet | QueryChannelEnd | QueryStats | Object; export {};