{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fusehealth-com/json-schema/fusehealth-com-build-checklist-schema.json",
  "title": "BuildChecklist",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fusehealth-com-onboarding-api-openapi.yml#/components/schemas/BuildChecklist",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "sandbox",
        "live"
      ]
    },
    "readyToSell": {
      "type": "boolean"
    },
    "complete": {
      "type": "boolean",
      "description": "readyToSell, and every required patient-portal item is done (logo, reply-to email, a verified custom domain when one is set, support AI on with a published help doc, and each program's after-purchase care set up)."
    },
    "summary": {
      "type": "object",
      "properties": {
        "done": {
          "type": "integer"
        },
        "todo": {
          "type": "integer"
        },
        "blocked": {
          "type": "integer"
        },
        "optional": {
          "type": "integer"
        },
        "portal": {
          "type": "integer"
        },
        "waitingOnFuse": {
          "type": "integer"
        }
      }
    },
    "sections": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/BuildChecklistItem"
            }
          }
        }
      }
    },
    "nextBest": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BuildChecklistItem"
      }
    }
  },
  "$defs": {
    "BuildChecklistItem": {
      "type": "object",
      "required": [
        "id",
        "status",
        "headline"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Stable item id, e.g. `programs.at_least_one` or `program.<programId>.ready`."
        },
        "status": {
          "type": "string",
          "enum": [
            "done",
            "todo",
            "blocked",
            "optional",
            "portal",
            "waiting_on_fuse",
            "not_applicable"
          ]
        },
        "headline": {
          "type": "string"
        },
        "detail": {
          "type": "string"
        },
        "fixWith": {
          "type": "object",
          "description": "Either `{ tool, args?, when? }` (an AI connector tool; `when` is `after_go_live` when the tool works only once the brand is live) or `{ portal, when }` (a brand portal page; `when` is `now` or `after_go_live`).",
          "properties": {
            "tool": {
              "type": "string"
            },
            "args": {
              "type": "object",
              "additionalProperties": true
            },
            "portal": {
              "type": "string"
            },
            "when": {
              "type": "string",
              "enum": [
                "now",
                "after_go_live"
              ]
            }
          }
        },
        "blockers": {
          "type": "array",
          "description": "For a program's readiness item, the checks that stop it being published, with the readiness check's own messages.",
          "items": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        },
        "guide": {
          "type": "string"
        }
      }
    }
  }
}