{
  "openapi": "3.1.0",
  "info": {
    "title": "Haven Trades Base Public Website Actions",
    "version": "1.0.0",
    "description": "Public lead and assistant actions exposed by the MightyMaker website."
  },
  "servers": [{"url": "https://haven-trades-base.mightymax.ai"}],
  "paths": {
    "/pipeline/form-submit": {
      "post": {
        "operationId": "submitServiceRequest",
        "summary": "Submit a service request",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["service_interest", "city", "urgency"],
                "properties": {
                  "slug": {"type": "string"},
                  "name": {"type": "string"},
                  "email": {"type": "string", "format": "email"},
                  "phone": {"type": "string"},
                  "service_interest": {"type": "string"},
                  "city": {"type": "string"},
                  "urgency": {"type": "string"},
                  "message": {"type": "string"}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "Request accepted"}}
      }
    },
    "/pipeline/chat": {
      "post": {
        "operationId": "askServiceAssistant",
        "summary": "Send a message to the service assistant",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["message"],
                "properties": {
                  "slug": {"type": "string"},
                  "session_id": {"type": "string"},
                  "message": {"type": "string"},
                  "history": {"type": "array", "items": {"type": "object"}}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "Assistant response"}}
      }
    }
  }
}
