{
  "openapi": "3.1.0",
  "info": {
    "title": "Clearsweep API",
    "version": "1.0.0",
    "description": "Facts-only, read-only, keyless API over what Clearsweep checks and what it cannot find. There is no account on this product and nothing here touches a real scan — a scan's findings never leave the phone, by design."
  },
  "servers": [
    {
      "url": "https://inlet-clearsweep.pages.dev"
    }
  ],
  "paths": {
    "/api/v1/methods": {
      "get": {
        "operationId": "listMethods",
        "summary": "Every check Clearsweep runs, with what it finds and what it misses",
        "responses": {
          "200": {
            "description": "All methods",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "methods": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "wifi",
                              "ble",
                              "magnetometer",
                              "infrared",
                              "lens",
                              "net_mode",
                              "net_portal",
                              "net_dns",
                              "net_gateway",
                              "net_isolation",
                              "net_smart",
                              "net_arp"
                            ]
                          },
                          "label": {
                            "type": "string"
                          },
                          "mechanism": {
                            "type": "string"
                          },
                          "finds": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "misses": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "What this check cannot find. Never empty."
                          },
                          "needsHumanEyes": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "label",
                          "mechanism",
                          "finds",
                          "misses",
                          "needsHumanEyes"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/methods/{id}": {
      "get": {
        "operationId": "getMethod",
        "summary": "One check's detail by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "wifi",
                "ble",
                "magnetometer",
                "infrared",
                "lens",
                "net_mode",
                "net_portal",
                "net_dns",
                "net_gateway",
                "net_isolation",
                "net_smart",
                "net_arp"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The method",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "enum": [
                        "wifi",
                        "ble",
                        "magnetometer",
                        "infrared",
                        "lens",
                        "net_mode",
                        "net_portal",
                        "net_dns",
                        "net_gateway",
                        "net_isolation",
                        "net_smart",
                        "net_arp"
                      ]
                    },
                    "label": {
                      "type": "string"
                    },
                    "mechanism": {
                      "type": "string"
                    },
                    "finds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "misses": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "What this check cannot find. Never empty."
                    },
                    "needsHumanEyes": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "mechanism",
                    "finds",
                    "misses",
                    "needsHumanEyes"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Unknown method id"
          }
        }
      }
    },
    "/api/v1/platforms": {
      "get": {
        "operationId": "listPlatforms",
        "summary": "Platforms Clearsweep ships on, and their status",
        "responses": {
          "200": {
            "description": "Platforms",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "platforms": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "android",
                              "ios"
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "available",
                              "planned"
                            ]
                          },
                          "notes": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/privacy": {
      "get": {
        "operationId": "getPrivacyStatement",
        "summary": "Clearsweep's real privacy statement, the same words served at /privacy",
        "responses": {
          "200": {
            "description": "The privacy statement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "bodyHtml": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/search": {
      "get": {
        "operationId": "search",
        "summary": "Search Clearsweep's public pages and check registry (connector shape)",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/fetch": {
      "get": {
        "operationId": "fetch",
        "summary": "Fetch one document by the id a /api/v1/search result returned",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The document"
          },
          "404": {
            "description": "Unknown id"
          }
        }
      }
    }
  }
}
