{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getcheapgames-com/json-schema/getcheapgames-com-gcg-accounts-schemas-sign-in-out-schema.json",
  "title": "SignInOut",
  "description": "`ok` with the user and the cookies set, or `totp` with a challenge to answer.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getcheapgames-com-auth-api-openapi.yml#/components/schemas/gcg__accounts__schemas__SignInOut",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ok",
        "totp"
      ],
      "title": "Status"
    },
    "user": {
      "anyOf": [
        {
          "$ref": "#/$defs/MeOut"
        },
        {
          "type": "null"
        }
      ]
    },
    "challenge": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Challenge"
    }
  },
  "type": "object",
  "required": [
    "status"
  ],
  "$defs": {
    "MeOut": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "username": {
          "type": "string",
          "title": "Username"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Email"
        },
        "emailVerified": {
          "type": "boolean",
          "title": "Emailverified"
        },
        "twoFactor": {
          "type": "boolean",
          "title": "Twofactor"
        },
        "methods": {
          "$ref": "#/$defs/MethodsOut"
        },
        "platforms": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Platforms"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "title": "Createdat"
        }
      },
      "type": "object",
      "required": [
        "id",
        "username",
        "email",
        "emailVerified",
        "twoFactor",
        "methods",
        "platforms",
        "createdAt"
      ],
      "title": "MeOut",
      "description": "The signed-in account, as `/api/account/me` and every sign-in answer it."
    },
    "MethodsOut": {
      "properties": {
        "password": {
          "type": "boolean",
          "title": "Password"
        },
        "google": {
          "type": "boolean",
          "title": "Google"
        },
        "steam": {
          "type": "boolean",
          "title": "Steam"
        },
        "epic": {
          "type": "boolean",
          "title": "Epic"
        }
      },
      "type": "object",
      "required": [
        "password",
        "google",
        "steam",
        "epic"
      ],
      "title": "MethodsOut",
      "description": "The ways this account can sign in."
    }
  }
}