bananareporter
Version:
Easily generate a report from multiple sources
113 lines (112 loc) • 4.16 kB
TypeScript
import { z } from 'zod';
export declare const BananaOutputFileFormat: z.ZodEnum<["json", "jsonl", "csv"]>;
export type BananaOutputFileFormat = z.infer<typeof BananaOutputFileFormat>;
export declare const BananaConfig: z.ZodEffects<z.ZodEffects<z.ZodObject<{
includeRawObject: z.ZodDefault<z.ZodBoolean>;
format: z.ZodEnum<["json", "jsonl", "csv"]>;
out: z.ZodString;
/**
* ISO8601 date range for all the sources,
* can be overridden per source
*/
from: z.ZodString;
to: z.ZodString;
/**
* banana reporter configuration file path
*/
configFileLocation: z.ZodString;
/**
* delay in seconds between every HTTP requests (sources)
*/
delay: z.ZodDefault<z.ZodNumber>;
/**
* where to fetch data
*/
sources: z.ZodArray<z.ZodObject<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">>, "atleastone">;
}, "strip", z.ZodTypeAny, {
format: "json" | "csv" | "jsonl";
from: string;
out: string;
includeRawObject: boolean;
to: string;
configFileLocation: string;
delay: number;
sources: [z.objectOutputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">, ...z.objectOutputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">[]];
}, {
format: "json" | "csv" | "jsonl";
from: string;
out: string;
to: string;
configFileLocation: string;
sources: [z.objectInputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">, ...z.objectInputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">[]];
includeRawObject?: boolean | undefined;
delay?: number | undefined;
}>, {
format: "json" | "csv" | "jsonl";
from: string;
out: string;
includeRawObject: boolean;
to: string;
configFileLocation: string;
delay: number;
sources: [z.objectOutputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">, ...z.objectOutputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">[]];
}, {
format: "json" | "csv" | "jsonl";
from: string;
out: string;
to: string;
configFileLocation: string;
sources: [z.objectInputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">, ...z.objectInputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">[]];
includeRawObject?: boolean | undefined;
delay?: number | undefined;
}>, {
format: "json" | "csv" | "jsonl";
from: string;
out: string;
includeRawObject: boolean;
to: string;
configFileLocation: string;
delay: number;
sources: [z.objectOutputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">, ...z.objectOutputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">[]];
}, {
format: "json" | "csv" | "jsonl";
from: string;
out: string;
to: string;
configFileLocation: string;
sources: [z.objectInputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">, ...z.objectInputType<{
type: z.ZodEnum<["gitlab", "github", "todo.txt", "git-cli"]>;
}, z.ZodTypeAny, "passthrough">[]];
includeRawObject?: boolean | undefined;
delay?: number | undefined;
}>;
export type BananaConfig = z.infer<typeof BananaConfig>;
export declare function loadAndValidateConfig(input: unknown): BananaConfig;