export declare type Node = BlockNode | InlineNode;
export declare type BlockNode = Root | Paragraph | Heading | Block | List | ListItem | Blockquote | Code | ThematicBreak;
export declare type BlockNodeWithCustomStyle = Paragraph | Heading;
export declare type BlockNodeTypeWithCustomStyle = ParagraphType | HeadingType;
export declare type InlineNode = Span | Link | ItemLink | InlineItem | InlineBlock;
export declare type NodeWithMeta = Link | ItemLink;
export declare type RootType = 'root';
/**
 * Every `dast` document MUST start with a `root` node.
 *
 * ```json
 * {
 *   "type": "root",
 *   "children": [
 *     {
 *       "type": "heading",
 *       "level": 1,
 *       "children": [
 *         {
 *           "type": "span",
 *           "value": "Title"
 *         }
 *       ]
 *     },
 *     {
 *       "type": "paragraph",
 *       "children": [
 *         {
 *           "type": "span",
 *           "value": "A simple paragraph!"
 *         }
 *       ]
 *     }
 *   ]
 * }
 * ```
 */
export declare type Root = {
    type: RootType;
    children: Array<Paragraph | Heading | List | Code | Blockquote | Block | ThematicBreak>;
};
export declare type ParagraphType = 'paragraph';
/**
 * A `paragraph` node represents a unit of textual content.
 *
 * ```json
 * {
 *   "type": "paragraph",
 *   "children": [
 *     {
 *       "type": "span",
 *       "value": "A simple paragraph!"
 *     }
 *   ]
 * }
 * ```
 */
export declare type Paragraph = {
    type: ParagraphType;
    /** Custom style applied to the node. Styles can be configured using the Plugin SDK */
    style?: string;
    children: Array<InlineNode>;
};
export declare type HeadingType = 'heading';
/**
 * An `heading` node represents a heading of a section. Using the `level` attribute you
 * can control the rank of the heading.
 *
 * ```json
 * {
 *   "type": "heading",
 *   "level": 2,
 *   "children": [
 *     {
 *       "type": "span",
 *       "value": "An h2 heading!"
 *     }
 *   ]
 * }
 * ```
 */
export declare type Heading = {
    type: HeadingType;
    level: 1 | 2 | 3 | 4 | 5 | 6;
    /** Custom style applied to the node. Styles can be configured using the Plugin SDK */
    style?: string;
    children: Array<InlineNode>;
};
export declare type ListType = 'list';
/**
 * A `list` node represents a list of items. Unordered lists must have its `style` field
 * set to `bulleted`, while ordered lists, instead, have its `style` field set to `numbered`.
 *
 * ```json
 * {
 *   "type": "list",
 *   "style": "bulleted",
 *   "children": [
 *     {
 *       "type": "listItem",
 *       "children": [
 *         {
 *           "type": "paragraph",
 *           "children": [
 *             {
 *               "type": "span",
 *               "value": "This is a list item!"
 *             }
 *           ]
 *         }
 *       ]
 *     }
 *   ]
 * }
 * ```
 */
export declare type List = {
    type: ListType;
    style: 'bulleted' | 'numbered';
    children: Array<ListItem>;
};
export declare type ListItemType = 'listItem';
/**
 * A `listItem` node represents an item in a list.
 *
 * ```json
 * {
 *   "type": "listItem",
 *   "children": [
 *     {
 *       "type": "paragraph",
 *       "children": [
 *         {
 *           "type": "span",
 *           "value": "This is a list item!"
 *         }
 *       ]
 *     }
 *   ]
 * }
 * ```
 */
export declare type ListItem = {
    type: ListItemType;
    children: Array<Paragraph | List>;
};
export declare type ThematicBreakType = 'thematicBreak';
/**
 * A `thematicBreak` node represents a thematic break between paragraph-level elements:
 * for example, a change of scene in a story, or a shift of topic within a section.
 *
 * ```json
 * {
 *   "type": "thematicBreak"
 * }
 * ```
 */
export declare type ThematicBreak = {
    type: ThematicBreakType;
};
export declare type CodeType = 'code';
/**
 * A `code` node represents a block of preformatted text, such as computer code.
 *
 * ```json
 * {
 *   "type": "code",
 *   "language": "javascript",
 *   "highlight": [1],
 *   "code": "function greetings() {\n  console.log('Hi!');\n}"
 * }
 * ```
 */
export declare type Code = {
    type: CodeType;
    /** The language of computer code being marked up (ie. `"javascript"`) */
    language?: string;
    /** A zero-based array of line numbers to highlight (ie. `[0, 1, 3]`)*/
    highlight?: Array<number>;
    /** The marked up computer code */
    code: string;
};
export declare type BlockquoteType = 'blockquote';
/**
 * A `blockquote` node is a containter that represents text which is an extended quotation.
 *
 * ```json
 * {
 *   "type": "blockquote",
 *   "attribution": "Oscar Wilde",
 *   "children": [
 *     {
 *       "type": "paragraph",
 *       "children": [
 *         {
 *           "type": "span",
 *           "value": "Be yourself; everyone else is taken."
 *         }
 *       ]
 *     }
 *   ]
 * }
 * ```
 */
export declare type Blockquote = {
    type: BlockquoteType;
    /** Attribution for the quote (ie `"Mark Smith"`) */
    attribution?: string;
    children: Array<Paragraph>;
};
export declare type BlockType = 'block';
/**
 * Similarly to [Modular Content](https://www.datocms.com/docs/content-modelling/modular-content) fields,
 * you can also embed block records into Structured Text. A `block` node stores a reference to a
 * DatoCMS block record embedded inside the `dast` document.
 *
 * This type of node can only be put as a direct child of the [`root`](#root) node.
 *
 * ```json
 * {
 *   "type": "block",
 *   "item": "1238455312"
 * }
 * ```
 */
export declare type Block = {
    type: BlockType;
    /** The DatoCMS block record ID */
    item: string;
};
export declare type InlineBlockType = 'inlineBlock';
/**
 * ```json
 * {
 *   "type": "inlineBlock",
 *   "item": "1238455312"
 * }
 * ```
 */
export declare type InlineBlock = {
    type: InlineBlockType;
    /** The DatoCMS block record ID */
    item: string;
};
export declare type SpanType = 'span';
export declare type DefaultMark = 'strong' | 'code' | 'emphasis' | 'underline' | 'strikethrough' | 'highlight';
/** Supported marks for `span` nodes */
export declare type Mark = DefaultMark | string;
/**
 * A `span` node represents a text node. It might optionally contain decorators called `marks`. It is worth
 * mentioning that you can use the `\n` newline character to express line breaks.
 *
 * ```json
 * {
 *   "type": "span",
 *   "marks": ["highlight", "emphasis"],
 *   "value": "Some random text here, move on!"
 * }
 * ```
 */
export declare type Span = {
    type: SpanType;
    /**
     * Array of decorators for the current chunk of text.
     * Default marks: `strong`, `code`, `emphasis`, `underline`, `strikethrough` and `highlight`. Additional custom marks can be defined via plugin.
     */
    marks?: Mark[];
    value: string;
};
export declare type MetaEntry = {
    id: string;
    value: string;
};
export declare type LinkType = 'link';
/**
 * A `link` node represents a normal hyperlink. It might optionally contain a number of additional
 * custom information under the `meta` key. You can also link to DatoCMS records using
 * the [`itemLink`](#itemLink) node.
 *
 * ```json
 * {
 *   "type": "link",
 *   "url": "https://www.datocms.com/",
 *   "meta": [
 *     { "id": "rel", "value": "nofollow" },
 *     { "id": "target", "value": "_blank" }
 *   ],
 *   "children": [
 *     {
 *       "type": "span",
 *       "value": "The best CMS in town"
 *     }
 *   ]
 * }
 * ```
 */
export declare type Link = {
    type: LinkType;
    /**
     * The actual URL where the link points to. Can be any string, no specific format is enforced.
     */
    url: string;
    /**
     * Array of tuples containing custom meta-information for the link.
     */
    meta?: Array<MetaEntry>;
    children: Array<Span>;
};
export declare type ItemLinkType = 'itemLink';
/**
 * An `itemLink` node is similar to a [`link`](#link) node node, but instead of
 * linking a portion of text to a URL, it links the document to another record
 * present in the same DatoCMS project.
 *
 * It might optionally contain a number of additional custom information under
 * the `meta` key.
 *
 * If you want to link to a DatoCMS record without having to specify some
 * inner content, then please use the [`inlineItem`](#inlineItem) node.
 *
 * ```json
 * {
 *   "type": "itemLink",
 *   "item": "38945648",
 *   "meta": [
 *     { "id": "rel", "value": "nofollow" },
 *     { "id": "target", "value": "_blank" }
 *   ],
 *   "children": [
 *     {
 *       "type": "span",
 *       "value": "Matteo Giaccone"
 *     }
 *   ]
 * }
 * ```
 */
export declare type ItemLink = {
    type: ItemLinkType;
    /** The linked DatoCMS record ID */
    item: string;
    /**
     * Array of tuples containing custom meta-information for the link.
     */
    meta?: Array<MetaEntry>;
    children: Array<Span>;
};
export declare type InlineItemType = 'inlineItem';
/**
 * An `inlineItem`, similarly to [`itemLink`](#itemLink), links the document to
 * another record but does not specify any inner content (children).
 *
 * It can be used in situations where it is up to the frontend to decide how to present the
 * record (ie. a widget, or an `<a>` tag pointing to the URL of the record with a text that
 * is the title of the linked record).
 *
 * ```json
 * {
 *   "type": "inlineItem",
 *   "item": "74619345"
 * }
 * ```
 */
export declare type InlineItem = {
    type: InlineItemType;
    /** The DatoCMS record ID */
    item: string;
};
export declare type WithChildrenNode = Exclude<Node, Code | Span | Block | InlineBlock | InlineItem | ThematicBreak>;
/**
 * A Structured Text `dast`-compatible value, composed by the `dast` document
 * itself and the `schema` attribute.
 */
export declare type Document = {
    schema: 'dast';
    document: Root;
};
export declare type NodeType = ParagraphType | HeadingType | LinkType | ItemLinkType | InlineItemType | BlockType | InlineBlockType | ListType | ListItemType | BlockquoteType | CodeType | RootType | SpanType | ThematicBreakType;
/**
 * Structured Text enables authors to create rich text content, on par with
 * traditional editors.
 *
 * Additionally, it allows records and Media Area assets to be linked dynamically
 * and embedded within the flow of the text.
 */
export declare type StructuredText<BlockRecord extends Record = Record, LinkRecord extends Record = Record, InlineBlockRecord extends Record = Record> = {
    /**
     * A DatoCMS "dast" document
     *
     * https://www.datocms.com/docs/structured-text/dast
     */
    value: Document | unknown;
    /** Blocks associated with the Structured Text */
    blocks?: BlockRecord[];
    /** Inline blocks associated with the Structured Text */
    inlineBlocks?: InlineBlockRecord[];
    /** Links associated with the Structured Text */
    links?: LinkRecord[];
};
export declare type TypesafeStructuredText<BlockRecord extends Record = Record, LinkRecord extends Record = Record, InlineBlockRecord extends Record = Record> = {
    /**
     * A DatoCMS "dast" document
     *
     * https://www.datocms.com/docs/structured-text/dast
     */
    value: Document;
    /** Blocks associated with the Structured Text */
    blocks?: BlockRecord[];
    /** Inline blocks associated with the Structured Text */
    inlineBlocks?: InlineBlockRecord[];
    /** Links associated with the Structured Text */
    links?: LinkRecord[];
};
export declare type Record = {
    __typename: string;
    id: string;
} & {
    [prop: string]: unknown;
};
