{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/craaft-io/json-schema/craaft-io-import-preview-schema.json",
  "title": "ImportPreview",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/craaft-io-openapi.yml#/components/schemas/ImportPreview",
  "type": "object",
  "required": [
    "source",
    "name",
    "columns",
    "totals",
    "assignees",
    "access",
    "warnings"
  ],
  "properties": {
    "source": {
      "type": "string",
      "enum": [
        "trello",
        "csv",
        "jira",
        "asana",
        "craaft"
      ]
    },
    "name": {
      "type": "string",
      "maxLength": 200
    },
    "columns": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "title",
          "isDone",
          "cards"
        ],
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 80
          },
          "isDone": {
            "type": "boolean"
          },
          "cards": {
            "type": "integer"
          }
        }
      }
    },
    "totals": {
      "type": "object",
      "required": [
        "cards",
        "archived",
        "comments",
        "checklistItems",
        "tags"
      ],
      "properties": {
        "cards": {
          "type": "integer"
        },
        "archived": {
          "type": "integer"
        },
        "comments": {
          "type": "integer"
        },
        "checklistItems": {
          "type": "integer"
        },
        "tags": {
          "type": "integer"
        }
      }
    },
    "assignees": {
      "type": "object",
      "required": [
        "matched",
        "unmatched"
      ],
      "properties": {
        "matched": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "source",
              "userId",
              "name"
            ],
            "properties": {
              "source": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          }
        },
        "unmatched": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "access": {
      "type": "array",
      "description": "Matched assignees the import adds to the new private board as\ncontributors: everyone matched except you and the workspace\nowners and admins, who already see every board.\n",
      "items": {
        "type": "object",
        "required": [
          "userId",
          "name"
        ],
        "properties": {
          "userId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    },
    "csv": {
      "type": "object",
      "description": "Present only for CSV sources (generic, Jira and Asana)",
      "properties": {
        "headers": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "mapping": {
          "type": "object",
          "description": "The mapping in use, as sent or as suggested",
          "additionalProperties": {
            "type": "string"
          }
        },
        "sample": {
          "type": "array",
          "description": "The first 3 data rows",
          "items": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}