import type { StreamIO } from "../data"; import type { BlobType, BooleanType, ConstFunction, DictType, EastFunction, EastType, IntegerType, PatchType, StringType } from "../east"; import type { Assertion } from "../task"; import type { ModulePath } from '../template'; /** @internal */ export type WriteableDefaultConfig = { default_type: "none"; } | { default_type: "file"; path: string; } | { default_type: "value"; value: ConstFunction; }; /** @internal */ export type WriteableSourceTaskDescription = { task_type: "source"; source_type: "writeable"; module: ModulePath; name: string; inputs: Record; input_assertions: Assertion[]; output_assertions: Assertion[]; outputs: { output: StreamIO; }; }; /** @internal */ export type PatchSourceTaskDescription = { task_type: "source"; source_type: "patch"; module: ModulePath; name: string; inputs: { base: StreamIO; patch: StreamIO>; }; outputs: { output: StreamIO; conflicts: StreamIO>; }; }; /** @internal */ export type ClockSourceTaskDescription = { task_type: "source"; source_type: "clock"; module: ModulePath; name: string; cron: string; value: EastFunction; inputs: Record; input_assertions: Assertion[]; output_assertions: Assertion[]; outputs: { output: StreamIO; }; }; /** @internal */ export type ElaraSourceTaskDescription = { task_type: "source"; source_type: "elara"; module: ModulePath; name: string; cron?: string | undefined; workspace: string; stream: string; type: T; inputs: Record; outputs: { output: StreamIO; }; }; /** @internal */ export type HttpMethod = "GET" | "POST" | "PUT" | "DELETE"; /** @internal */ export type ApiSourceTaskDescription = { task_type: "source"; source_type: "api"; module: ModulePath; name: string; cron?: string | undefined; request_url: EastFunction; request_body?: EastFunction | undefined; request_headers?: EastFunction> | undefined; request_retry?: EastFunction | undefined; request_next?: EastFunction | undefined; request_delay?: EastFunction | undefined; inputs: Record; input_assertions: Assertion[]; output_assertions: Assertion[]; outputs: { output: StreamIO; }; }; /** @internal */ export type FtpSourceTaskDescription = { task_type: "source"; source_type: "ftp"; module: ModulePath; name: string; cron?: string | undefined; ftp_uri: EastFunction; ftp_username?: EastFunction | undefined; ftp_password?: EastFunction | undefined; ftp_key?: EastFunction | undefined; ftp_port?: EastFunction | undefined; inputs: Record; input_assertions: Assertion[]; output_assertions: Assertion[]; outputs: { output: StreamIO; }; }; /** @internal */ export type S3SourceTaskDescription = { task_type: "source"; source_type: "s3"; module: ModulePath; name: string; cron?: string | undefined; /** The aws region. */ s3_region: EastFunction; /** The bucket name containing the object. */ s3_bucket: EastFunction; /** Key of the object to get. */ s3_key: EastFunction; /** AWS access key ID */ s3_access_key_id: EastFunction; /** AWS secret access key */ s3_secret_access_key: EastFunction; inputs: Record; input_assertions: Assertion[]; output_assertions: Assertion[]; outputs: { output: StreamIO; }; }; /** @internal */ export type SourceTaskDescription = WriteableSourceTaskDescription | PatchSourceTaskDescription | ClockSourceTaskDescription | ElaraSourceTaskDescription | ApiSourceTaskDescription | FtpSourceTaskDescription | S3SourceTaskDescription;