@brimdata/zealot
Version:
The Javascript Client for Zed Lakes
50 lines (49 loc) • 1.48 kB
TypeScript
export declare type ClientOpts = {
auth: string | null;
};
export declare type ResponseFormat = "arrows" | "csv" | "json" | "ndjson" | "vng" | "zeek" | "zjson" | "zng" | "zson";
export declare type QueryOpts = {
format: ResponseFormat;
controlMessages: boolean;
signal?: AbortSignal;
timeout?: number;
};
export declare type CreatePoolOpts = {
key: string | string[];
order: "asc" | "desc";
};
export declare type Pool = {
id: string;
name: string;
threshold: bigint;
ts: Date;
layout: {
order: "desc" | "asc";
keys: string[][];
};
};
export declare type Branch = {
ts: Date;
name: string;
commit: string;
};
export declare type CreatePoolResp = {
pool: Pool;
branch: Branch;
};
export interface IdObj {
id: string;
}
export declare type LoadOpts = {
pool: string | IdObj;
branch: string;
message: {
author: string;
body: string;
};
signal?: AbortSignal;
format?: LoadFormat;
};
export declare type LoadFormat = "auto" | "arrows" | "csv" | "json" | "line" | "parquet" | "vng" | "zeek" | "zjson" | "zng" | "zson";
export declare type LoadContentType = "*/*" | "application/vnd.apache.arrow.stream" | "text/csv" | "application/json" | "application/x-line" | "application/x-parquet" | "application/x-vng" | "application/x-zeek" | "application/x-zjson" | "application/x-zng" | "application/x-zson";
export declare type WebFetch = typeof window.fetch;