{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/webanto-com/json-schema/webanto-com-catalog-item-schema.json",
  "title": "CatalogItem",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/webanto-com-openapi.json#/components/schemas/CatalogItem",
  "allOf": [
    {
      "$ref": "#/$defs/CatalogItemUpsert"
    },
    {
      "type": "object",
      "required": [
        "id",
        "status",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "archived"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  ],
  "$defs": {
    "CatalogItemUpsert": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "name",
        "sku",
        "unitAmount"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "product",
            "service"
          ]
        },
        "name": {
          "type": "string",
          "minLength": 2,
          "maxLength": 160
        },
        "description": {
          "type": "string",
          "maxLength": 5000,
          "default": ""
        },
        "sku": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "currency": {
          "const": "USD",
          "default": "USD"
        },
        "unitAmount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100000000
        },
        "imageUrl": {
          "type": "string",
          "format": "uri",
          "maxLength": 2048
        }
      }
    }
  }
}