{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aura-historia-com/json-schema/aura-historia-com-own-access-token-data-schema.json",
  "title": "OwnAccessTokenData",
  "description": "Secret-free metadata for an access token owned by the authenticated user.\nList, get, and update responses omit the bearer token entirely; the plaintext is only returned by the create operation.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aura-historia-com-user-account-api-openapi.yml#/components/schemas/OwnAccessTokenData",
  "type": "object",
  "required": [
    "userId",
    "accessTokenId",
    "name",
    "scopes",
    "origin"
  ],
  "properties": {
    "userId": {
      "type": "string",
      "description": "User who owns the access token."
    },
    "accessTokenId": {
      "type": "string",
      "description": "Unique identifier of the access token."
    },
    "name": {
      "type": "string",
      "maxLength": 128,
      "description": "User-defined display name of the access token."
    },
    "scopes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AccessTokenScopeData"
      },
      "uniqueItems": true,
      "description": "Granted access-token scopes. An empty scope set is returned as an empty array."
    },
    "origin": {
      "type": "string",
      "description": "Origin recorded by the access-token model."
    },
    "expires": {
      "type": "string",
      "format": "date-time",
      "description": "Optional RFC3339 expiration timestamp; omitted when the token does not expire and returned for expired and current tokens."
    }
  },
  "$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"
    }
  }
}