{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cadencz-com/json-schema/cadencz-com-current-user-response-schema.json",
  "title": "CurrentUserResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cadencz-com-me-api-openapi.yml#/components/schemas/CurrentUserResponse",
  "properties": {
    "user": {
      "$ref": "#/$defs/CurrentUserProfile"
    },
    "workspace": {
      "$ref": "#/$defs/CurrentWorkspaceProfile"
    },
    "workspaces": {
      "items": {
        "$ref": "#/$defs/CurrentWorkspaceProfile"
      },
      "type": "array",
      "title": "Workspaces"
    },
    "role": {
      "type": "string",
      "title": "Role",
      "default": "owner"
    },
    "accountId": {
      "type": "string",
      "title": "Accountid",
      "default": ""
    },
    "permissions": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Permissions",
      "default": []
    },
    "workspaceCap": {
      "type": "integer",
      "title": "Workspacecap",
      "default": 1
    },
    "setupComplete": {
      "type": "boolean",
      "title": "Setupcomplete",
      "default": true
    }
  },
  "type": "object",
  "required": [
    "user",
    "workspace",
    "workspaces"
  ],
  "$defs": {
    "CurrentUserProfile": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "email": {
          "type": "string",
          "title": "Email"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "avatarUrl": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Avatarurl"
        },
        "timezone": {
          "type": "string",
          "title": "Timezone"
        },
        "isAdmin": {
          "type": "boolean",
          "title": "Isadmin",
          "default": false
        },
        "createdAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Createdat"
        }
      },
      "type": "object",
      "required": [
        "id",
        "email",
        "name",
        "avatarUrl",
        "timezone"
      ],
      "title": "CurrentUserProfile"
    },
    "CurrentWorkspaceProfile": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "ownerId": {
          "type": "string",
          "title": "Ownerid"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "handle": {
          "type": "string",
          "title": "Handle"
        },
        "avatarUrl": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Avatarurl"
        }
      },
      "type": "object",
      "required": [
        "id",
        "ownerId",
        "name",
        "handle",
        "avatarUrl"
      ],
      "title": "CurrentWorkspaceProfile"
    }
  }
}