{
  "openapi": "3.0.0",
  "info": {
    "title": "Timber SPA API",
    "version": "1.0.0"
  },
  "paths": {
    "/api/contact": {
      "post": {
        "summary": "Wyślij zapytanie o ofertę / beczkę do Timber SPA",
        "description": "Zapewnia walidację strukturalną żądania Zod-em i przekazuje powiadomienie.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactPayload"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Zapytanie prawidłowo przyjęte i procesowane",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Błąd formatu zapytania"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ContactPayload": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Jan Kowalski"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "jan@example.com"
          },
          "phone": {
            "type": "string",
            "example": "+48 123 456 789"
          },
          "message": {
            "type": "string",
            "example": "Dzień dobry, jestem zainteresowany beczką z hydromasażem..."
          },
          "website": {
            "type": "string",
            "description": "Honeypot field for bot detection",
            "example": ""
          },
          "_gotcha": {
            "type": "string",
            "description": "Honeypot field",
            "example": ""
          },
          "token": {
            "type": "string",
            "description": "Cloudflare Turnstile token"
          }
        },
        "required": [
          "name",
          "email",
          "message"
        ]
      }
    }
  }
}