{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/itsbaba-com/json-schema/itsbaba-com-account-terms-upserted-schema.json",
  "title": "AccountTermsUpserted",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/itsbaba-com-account-terms-api-openapi.yml#/components/schemas/AccountTermsUpserted",
  "type": "object",
  "properties": {
    "terms": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AccountTerm"
      }
    },
    "count": {
      "type": "integer"
    }
  },
  "required": [
    "terms",
    "count"
  ],
  "$defs": {
    "AccountTerm": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "term": {
          "type": "string",
          "description": "Kept exactly as written in every protected translation."
        },
        "translations": {
          "type": "object",
          "properties": {
            "he": {
              "type": "string"
            },
            "en": {
              "type": "string"
            },
            "ru": {
              "type": "string"
            }
          },
          "description": "Optional required rendering per target language. When set for the target, it replaces the term; otherwise the term is kept verbatim."
        },
        "note": {
          "type": [
            "string",
            "null"
          ],
          "description": "Your own note, up to 500 characters."
        },
        "created_at": {
          "type": "string",
          "description": "ISO 8601 timestamp."
        }
      },
      "required": [
        "id",
        "term",
        "translations",
        "note",
        "created_at"
      ]
    }
  }
}