{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/letsship-ai/json-schema/letsship-ai-project-transfer-schema.json",
  "title": "ProjectTransfer",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/letsship-ai-openapi.json#/components/schemas/ProjectTransfer",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "projectId": {
      "type": "string"
    },
    "state": {
      "$ref": "#/$defs/ProjectTransferState"
    },
    "version": {
      "type": "integer"
    },
    "action": {
      "$ref": "#/$defs/ProjectTransferAction"
    },
    "repository": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "from",
        "to"
      ]
    },
    "createdAt": {
      "type": "integer"
    },
    "updatedAt": {
      "type": "integer"
    },
    "checkedAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "deleteAfter": {
      "type": [
        "integer",
        "null"
      ]
    },
    "completedAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "pollAfterSeconds": {
      "type": [
        "integer",
        "null"
      ]
    },
    "failure": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "category": {
          "type": "string",
          "enum": [
            "auth",
            "rate_limit",
            "timeout",
            "validation",
            "infrastructure",
            "agent",
            "unknown"
          ]
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        },
        "code": {
          "type": "string"
        }
      },
      "required": [
        "category",
        "title",
        "description",
        "retryable"
      ]
    },
    "choices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "connectorId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "connectorId",
          "name"
        ]
      }
    }
  },
  "required": [
    "id",
    "projectId",
    "state",
    "version",
    "action",
    "repository",
    "createdAt",
    "updatedAt",
    "checkedAt",
    "deleteAfter",
    "completedAt",
    "pollAfterSeconds",
    "failure",
    "choices"
  ],
  "$defs": {
    "ProjectTransferAction": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "choose_target",
        "wait"
      ],
      "description": "What the founder does next: name their empty repository with SHIP's GitHub App installed on it, or wait while SHIP copies and checks it."
    },
    "ProjectTransferState": {
      "type": "string",
      "enum": [
        "requested",
        "awaiting_target",
        "mirroring",
        "verifying",
        "repointed",
        "archived",
        "done",
        "failed",
        "cancelled"
      ],
      "description": "`requested` before SHIP checks anything. `awaiting_target` while the founder must name their own empty repository. `mirroring` while SHIP copies every branch and tag into it, and `verifying` while SHIP checks that each one has the same commit. `repointed` when the project uses the founder's repository. `archived` when SHIP's own copy is read-only and waits for its delete, and `done` after the delete. `failed` gives the cause in `failure`. `cancelled` when the founder stopped it before the repoint."
    }
  }
}