{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/latitude-so/json-schema/latitude-so-oauth-key-list-schema.json",
  "title": "OAuthKeyList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/latitude-so-oauth-keys-api-openapi.yml#/components/schemas/OAuthKeyList",
  "type": "object",
  "properties": {
    "oauthKeys": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OAuthKey"
      }
    }
  },
  "required": [
    "oauthKeys"
  ],
  "$defs": {
    "OAuthKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Stable OAuth key identifier."
        },
        "clientId": {
          "type": "string",
          "description": "Identifier of the OAuth client the key was issued to."
        },
        "clientName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Display name of the OAuth client."
        },
        "clientIcon": {
          "type": [
            "string",
            "null"
          ],
          "description": "Icon URL of the OAuth client."
        },
        "userId": {
          "type": "string",
          "description": "Identifier of the user the key belongs to."
        },
        "userName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Display name of the user. `null` until the user completes onboarding."
        },
        "userEmail": {
          "type": "string",
          "description": "Email of the user."
        },
        "lastActivityAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "ISO-8601 timestamp of the last refresh on the key. `null` if the key has never been used."
        },
        "connectedAt": {
          "type": "string",
          "description": "ISO-8601 timestamp at which the key was connected."
        },
        "disabled": {
          "type": "boolean",
          "description": "Whether the key has been disabled."
        }
      },
      "required": [
        "id",
        "clientId",
        "clientName",
        "clientIcon",
        "userId",
        "userName",
        "userEmail",
        "lastActivityAt",
        "connectedAt",
        "disabled"
      ]
    }
  }
}