{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/latitude-so/json-schema/latitude-so-export-dataset-rows-body-schema.json",
  "title": "ExportDatasetRowsBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/latitude-so-datasets-api-openapi.yml#/components/schemas/ExportDatasetRowsBody",
  "type": "object",
  "properties": {
    "selection": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "selected"
              ]
            },
            "rowIds": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "minItems": 1
            }
          },
          "required": [
            "mode",
            "rowIds"
          ]
        },
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "all"
              ]
            }
          },
          "required": [
            "mode"
          ]
        },
        {
          "type": "object",
          "properties": {
            "mode": {
              "type": "string",
              "enum": [
                "allExcept"
              ]
            },
            "rowIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "mode",
            "rowIds"
          ]
        }
      ],
      "description": "Rows to export. Defaults to `{ mode: \"all\" }` when omitted."
    },
    "recipient": {
      "type": "string",
      "format": "email",
      "description": "Email address to send the download link to when the export is too large for the synchronous path. Must belong to a member of the requesting organization. Ignored when the export fits the synchronous path; required for the async email flow."
    }
  }
}