import { DataBricksBase, ConstructorProps } from './index'; import { Library } from './libraries'; import { JobTask, CronSchedule, NewCluster } from './jobs'; export declare enum RunLifeCycleState { PENDING = "PENDING", RUNNING = "RUNNING", TERMINATING = "TERMINATING", TERMINATED = "TERMINATED", SKIPPED = "SKIPPED", INTERNAL_ERROR = "INTERNAL_ERROR" } export declare enum RunResultState { SUCCESS = "SUCCESS", FAILED = "FAILED", TIMEDOUT = "TIMEDOUT", CANCELED = "CANCELED" } export declare enum TriggerType { PERIODIC = "PERIODIC", ONE_TIME = "ONE_TIME", RETRY = "RETRY" } export declare enum ViewType { NOTEBOOK = "NOTEBOOK", DASHBOARD = "DASHBOARD" } export declare enum ViewsToExport { CODE = "CODE", DASHBOARDS = "DASHBOARDS", ALL = "ALL" } export declare type ViewItem = { content: string; name: string; type: ViewType; }; export declare type ClusterInstance = { cluster_id?: string; spark_context_id?: string; }; export declare type ParamPair = { key: string; value: string; }; export declare type Run = { job_id: number; run_id: number; creator_user_name: string; number_in_job: number; original_attempt_run_id: number; state: RunState; schedule: CronSchedule; cluster_instance: ClusterInstance; overriding_parameters: RunParameters; start_time: number; setup_duration: number; execution_duration: number; cleanup_duration: number; trigger: TriggerType; }; export declare type RunParameters = { jar_params?: string[]; notebook_params?: { [key: string]: string; }; python_params?: string[]; spark_submit_params?: string[]; }; export declare type RunState = { life_cycle_state: RunLifeCycleState; result_state: RunResultState; state_message: string; }; export declare type NotebookOutput = { result: string; truncated: boolean; }; export default class Runs extends DataBricksBase { RunLifecycleState: typeof RunLifeCycleState; RunResultState: typeof RunResultState; TriggerType: typeof TriggerType; ViewType: typeof ViewType; ViewsToExport: typeof ViewsToExport; constructor(args: ConstructorProps); submit(param: ({ existing_cluster_id: string; } | { new_cluster: NewCluster; }) & JobTask & { run_name: string; libraries: Library[]; timeout_seconds: number; }): Promise<{ run_id: number; }>; list(param: ({ active_only: boolean; } | { completed_only: boolean; }) & { job_id?: number; offset?: number; limit?: number; }): Promise; get(param: { run_id: number; }): Promise; export(param: { run_id: number; views_to_export?: ViewsToExport; }): Promise<{ views: ViewItem[]; }>; cancel(param: { run_id: number; }): Promise; getOutput(param: { run_id: number; }): Promise<({ notebook_output: NotebookOutput; } | { error: string; }) & { metadata: Run; }>; delete(param: { run_id: number; }): Promise; }