# This file is generated by scripts/generate_schemas.py
components:
  schemas:
    Cell:
      properties:
        code_hash:
          nullable: true
          type: string
        console:
          items:
            oneOf:
            - $ref: '#/components/schemas/StreamOutput'
            - $ref: '#/components/schemas/StreamMediaOutput'
          type: array
        id:
          type: string
        outputs:
          items:
            oneOf:
            - $ref: '#/components/schemas/ErrorOutput'
            - $ref: '#/components/schemas/DataOutput'
          type: array
      required:
      - id
      - code_hash
      - outputs
      - console
      type: object
    DataOutput:
      properties:
        data:
          additionalProperties: {}
          type: object
        type:
          enum:
          - data
          type: string
      required:
      - type
      - data
      type: object
    ErrorOutput:
      properties:
        ename:
          type: string
        evalue:
          type: string
        traceback:
          items:
            type: string
          type: array
        type:
          enum:
          - error
          type: string
      required:
      - type
      - ename
      - evalue
      - traceback
      type: object
    NotebookSessionMetadata:
      properties:
        marimo_version:
          nullable: true
          type: string
        script_metadata_hash:
          nullable: true
          type: string
      required:
      - marimo_version
      - script_metadata_hash
      type: object
    NotebookSessionV1:
      properties:
        cells:
          items:
            $ref: '#/components/schemas/Cell'
          type: array
        metadata:
          $ref: '#/components/schemas/NotebookSessionMetadata'
        version:
          type: string
      required:
      - version
      - metadata
      - cells
      type: object
    StreamMediaOutput:
      properties:
        data:
          type: string
        mimetype:
          enum:
          - application/json
          - application/vnd.marimo+error
          - application/vnd.marimo+traceback
          - application/vnd.marimo+mimebundle
          - application/vnd.vega.v5+json
          - application/vnd.vegalite.v5+json
          - application/vnd.vega.v6+json
          - application/vnd.vegalite.v6+json
          - application/vnd.jupyter.widget-view+json
          - image/png
          - image/svg+xml
          - image/tiff
          - image/avif
          - image/bmp
          - image/gif
          - image/jpeg
          - video/mp4
          - video/mpeg
          - text/html
          - text/plain
          - text/password
          - text/markdown
          - text/latex
          - text/csv
          type: string
        name:
          enum:
          - media
          type: string
        type:
          enum:
          - streamMedia
          type: string
      required:
      - type
      - name
      - data
      - mimetype
      type: object
    StreamOutput:
      properties:
        mimetype:
          enum:
          - application/json
          - application/vnd.marimo+error
          - application/vnd.marimo+traceback
          - application/vnd.marimo+mimebundle
          - application/vnd.vega.v5+json
          - application/vnd.vegalite.v5+json
          - application/vnd.vega.v6+json
          - application/vnd.vegalite.v6+json
          - application/vnd.jupyter.widget-view+json
          - image/png
          - image/svg+xml
          - image/tiff
          - image/avif
          - image/bmp
          - image/gif
          - image/jpeg
          - video/mp4
          - video/mpeg
          - text/html
          - text/plain
          - text/password
          - text/markdown
          - text/latex
          - text/csv
          nullable: true
          type: string
        name:
          enum:
          - stdout
          - stderr
          type: string
        text:
          type: string
        type:
          enum:
          - stream
          type: string
      required:
      - type
      - name
      - text
      - mimetype
      type: object
    TimeMetadata:
      properties:
        completed:
          nullable: true
          type: string
        duration:
          nullable: true
          type: number
        started:
          nullable: true
          type: string
      required:
      - started
      - completed
      - duration
      type: object
info:
  title: marimo
openapi: 3.0.0
