{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beecargo-net/json-schema/beecargo-net-file-upload-request-schema.json",
  "title": "FileUploadRequest",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beecargo-net-openapi.json#/components/schemas/FileUploadRequest",
  "allOf": [
    {
      "type": "object",
      "required": [
        "file"
      ],
      "properties": {
        "file": {
          "type": "string",
          "format": "binary"
        },
        "folderId": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    {
      "$ref": "#/$defs/PublishFields"
    }
  ],
  "$defs": {
    "PublishFields": {
      "type": "object",
      "properties": {
        "visibility": {
          "type": "string",
          "enum": [
            "unlisted",
            "public"
          ]
        },
        "direct": {
          "type": "boolean",
          "description": "Pro: start download when the /d share opens"
        },
        "retention": {
          "type": "string",
          "enum": [
            "ttl",
            "forever"
          ]
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time",
          "description": "Exact expiry when retention is ttl"
        },
        "ttl": {
          "type": "string",
          "description": "Keep-time preset from now, such as 1h, 24h, or 7d"
        },
        "once": {
          "type": "boolean",
          "description": "When true, the share can be downloaded only once"
        },
        "maxDownloads": {
          "type": "integer",
          "minimum": 1,
          "description": "Max downloads (ignored when once is true)"
        },
        "protect": {
          "type": "boolean",
          "description": "Create unlock code and private delivery link"
        },
        "handoffMessage": {
          "type": "string",
          "maxLength": 480,
          "description": "Optional delivery-link note"
        },
        "runId": {
          "type": "string",
          "maxLength": 120,
          "description": "Optional pipeline id; list later via GET /files/list?runId="
        },
        "openShare": {
          "type": "boolean",
          "description": "Authenticated: open a growable multi-file Shipment; response shortId is the share link. Use shareShortId on later uploads."
        },
        "shareShortId": {
          "type": "string",
          "minLength": 4,
          "maxLength": 16,
          "description": "Authenticated: attach this upload to an existing growable Shipment from a prior openShare"
        }
      }
    }
  }
}