{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aura-historia-com/json-schema/aura-historia-com-oauth-client-consent-metadata-data-schema.json",
  "title": "OAuthClientConsentMetadataData",
  "description": "Minimal secret-free OAuth client metadata returned to an authenticated user before consent.\n`client_id`, URLs, redirect URIs, and allowed scopes come from the persisted registration. Redirect URIs are returned as registered and must not be treated as a wildcard allowlist. `scope` contains allowed scopes only, not scopes the user has granted; an empty set is `[]`. This schema intentionally excludes client secrets, secret hashes or short-token material, bearer tokens, authorization codes, verifiers, timestamps, and audit data.\n",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aura-historia-com-openapi.yml#/components/schemas/OAuthClientConsentMetadataData",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "client_id",
    "client_name",
    "tos_uri",
    "policy_uri",
    "client_uri",
    "logo_uri",
    "redirect_uris",
    "scope"
  ],
  "properties": {
    "client_id": {
      "type": "string",
      "description": "Canonical OAuthClient ID (`oc_` TypeID)."
    },
    "client_name": {
      "type": "string",
      "description": "Display name stored for the OAuth client."
    },
    "tos_uri": {
      "type": "string",
      "format": "uri",
      "description": "Terms-of-service URL stored for the OAuth client."
    },
    "policy_uri": {
      "type": "string",
      "format": "uri",
      "description": "Privacy-policy URL stored for the OAuth client."
    },
    "client_uri": {
      "type": "string",
      "format": "uri",
      "description": "Homepage URL stored for the OAuth client."
    },
    "logo_uri": {
      "type": "string",
      "format": "uri",
      "description": "Logo URL stored for the OAuth client."
    },
    "redirect_uris": {
      "type": "array",
      "uniqueItems": true,
      "description": "Exact registered redirect URLs, including their registered query strings and other URI components.",
      "items": {
        "type": "string",
        "format": "uri"
      }
    },
    "scope": {
      "type": "array",
      "uniqueItems": true,
      "description": "Allowed OAuth scopes; this does not mean that the user has granted them. Empty registrations return `[]`.",
      "items": {
        "$ref": "#/$defs/AccessTokenScopeData"
      }
    }
  },
  "$defs": {
    "AccessTokenScopeData": {
      "type": "string",
      "enum": [
        "auctions:read",
        "auctions:write",
        "listing-sources:read",
        "parties:read",
        "parties:write",
        "partnership-applications:read",
        "partnership-applications:write",
        "partnerships:read",
        "partnerships:write",
        "admin-overview:read",
        "search-filters:read",
        "notifications:read",
        "notifications:write",
        "product-listings:read",
        "product-listings:write",
        "listing-sources:write",
        "users:read",
        "users:write",
        "access-tokens:read",
        "access-tokens:write",
        "search-filters:write",
        "watchlist:read",
        "watchlist:write"
      ],
      "description": "Aura Historia access-token and OAuth scope string.\nThe value is one of the capabilities supported by the canonical access-token and OAuth flows.\n"
    }
  }
}