import { JSONObject, MultiLineString } from "./primitives"; import { MarkdownCell, RawCell } from "./v4"; declare const VALID_MIMETYPES: { text: string; latex: string; png: string; jpeg: string; svg: string; html: string; javascript: string; json: string; pdf: string; }; declare type MimeTypeKey = keyof typeof VALID_MIMETYPES; declare type MimePayload = { [P in MimeTypeKey]?: MultiLineString; }; interface MimeOutput extends MimePayload { output_type: T; prompt_number?: number; metadata: object; } export declare type ExecuteResult = MimeOutput<"pyout">; export declare type DisplayData = MimeOutput<"display_data">; export interface ErrorOutput { output_type: "error" | "pyerr"; ename: string; evalue: string; traceback: string[]; } export interface StreamOutput { output_type: "stream"; stream: string; text: MultiLineString; } export declare type Output = ExecuteResult | DisplayData | StreamOutput | ErrorOutput; export interface HeadingCell { cell_type: "heading"; metadata: JSONObject; source: MultiLineString; level: number; } export interface CodeCell { cell_type: "code"; language: string; collapsed: boolean; metadata: JSONObject; input: MultiLineString; prompt_number: number; outputs: Output[]; } export declare type Cell = RawCell | MarkdownCell | HeadingCell | CodeCell; export interface Worksheet { cells: Cell[]; metadata: object; } export interface NotebookV3 { worksheets: Worksheet[]; metadata: object; nbformat: 3; nbformat_minor: number; } export declare function fromJS(notebook: NotebookV3): any; export declare function isNotebookV3(value: any): value is NotebookV3; export {};