{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trajectory/json-schema/trajectory-onboarding-status-response-schema.json",
  "title": "OnboardingStatusResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trajectory-organizations-api-openapi.yml#/components/schemas/OnboardingStatusResponse",
  "properties": {
    "email": {
      "type": "string",
      "title": "Email",
      "description": "Email of the signed-in user."
    },
    "status": {
      "$ref": "#/$defs/OnboardingStatus",
      "description": "REQUIRED when the user has no organization yet, INVITE_PENDING when an admin invited them and they must accept from the emailed link, COMPLETE when they belong to an organization."
    },
    "display_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Display Name",
      "description": "User's display name, when already set."
    }
  },
  "type": "object",
  "required": [
    "email",
    "status"
  ],
  "$defs": {
    "OnboardingStatus": {
      "type": "string",
      "enum": [
        "ONBOARDING_REQUIRED",
        "ONBOARDING_INVITE_PENDING",
        "ONBOARDING_COMPLETE"
      ],
      "title": "OnboardingStatus"
    }
  }
}