{
  "openapi": "3.1.0",
  "info": {
    "title": "AskAniela",
    "description": "Per-rule spam-policy and page-quality scores. Guide, concepts and rules catalog: documentation site built from `docs/site/` (`uv run mkdocs serve`).",
    "version": "0.1.0"
  },
  "paths": {
    "/v1/auth/cookie/login": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Auth:Cookie.Login",
        "operationId": "auth_cookie_login_v1_auth_cookie_login_post",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_auth_cookie_login_v1_auth_cookie_login_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                },
                "examples": {
                  "LOGIN_BAD_CREDENTIALS": {
                    "summary": "Bad credentials or the user is inactive.",
                    "value": {
                      "detail": "LOGIN_BAD_CREDENTIALS"
                    }
                  },
                  "LOGIN_USER_NOT_VERIFIED": {
                    "summary": "The user is not verified.",
                    "value": {
                      "detail": "LOGIN_USER_NOT_VERIFIED"
                    }
                  }
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/cookie/logout": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Auth:Cookie.Logout",
        "operationId": "auth_cookie_logout_v1_auth_cookie_logout_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "204": {
            "description": "No Content"
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      }
    },
    "/v1/auth/jwt/login": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Auth:Jwt.Login",
        "operationId": "auth_jwt_login_v1_auth_jwt_login_post",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_auth_jwt_login_v1_auth_jwt_login_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BearerResponse"
                },
                "example": {
                  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiOTIyMWZmYzktNjQwZi00MzcyLTg2ZDMtY2U2NDJjYmE1NjAzIiwiYXVkIjoiZmFzdGFwaS11c2VyczphdXRoIiwiZXhwIjoxNTcxNTA0MTkzfQ.M10bjOe45I5Ncu_uXvOmVV8QxnL-nZfcH96U90JaocI",
                  "token_type": "bearer"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                },
                "examples": {
                  "LOGIN_BAD_CREDENTIALS": {
                    "summary": "Bad credentials or the user is inactive.",
                    "value": {
                      "detail": "LOGIN_BAD_CREDENTIALS"
                    }
                  },
                  "LOGIN_USER_NOT_VERIFIED": {
                    "summary": "The user is not verified.",
                    "value": {
                      "detail": "LOGIN_USER_NOT_VERIFIED"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/jwt/logout": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Auth:Jwt.Logout",
        "operationId": "auth_jwt_logout_v1_auth_jwt_logout_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      }
    },
    "/v1/auth/forgot-password": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Reset:Forgot Password",
        "operationId": "reset_forgot_password_v1_auth_forgot_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_reset_forgot_password_v1_auth_forgot_password_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/reset-password": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Reset:Reset Password",
        "operationId": "reset_reset_password_v1_auth_reset_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Body_reset_reset_password_v1_auth_reset_password_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                },
                "examples": {
                  "RESET_PASSWORD_BAD_TOKEN": {
                    "summary": "Bad or expired token.",
                    "value": {
                      "detail": "RESET_PASSWORD_BAD_TOKEN"
                    }
                  },
                  "RESET_PASSWORD_INVALID_PASSWORD": {
                    "summary": "Password validation failed.",
                    "value": {
                      "detail": {
                        "code": "RESET_PASSWORD_INVALID_PASSWORD",
                        "reason": "Password should be at least 3 characters"
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/register": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Register Route",
        "description": "#400: zawsze 202 z tą samą treścią; konto aktywne dopiero po linku z e-maila.",
        "operationId": "register_route_v1_auth_register_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterAccepted"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/confirm": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Confirm Route",
        "operationId": "confirm_route_v1_auth_confirm_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailConfirm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegisterAccepted"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "List Users",
        "operationId": "list_users_v1_users_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UserRead"
                  },
                  "type": "array",
                  "title": "Response List Users V1 Users Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "users"
        ],
        "summary": "Create User",
        "operationId": "create_user_v1_users_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdminUserCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      }
    },
    "/v1/users/{user_id}/role": {
      "patch": {
        "tags": [
          "users"
        ],
        "summary": "Set Role",
        "operationId": "set_role_v1_users__user_id__role_patch",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "User Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RoleUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "Users:Current User",
        "operationId": "users_current_user_v1_users_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      },
      "patch": {
        "tags": [
          "users"
        ],
        "summary": "Users:Patch Current User",
        "operationId": "users_patch_current_user_v1_users_me_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                },
                "examples": {
                  "UPDATE_USER_EMAIL_ALREADY_EXISTS": {
                    "summary": "A user with this email already exists.",
                    "value": {
                      "detail": "UPDATE_USER_EMAIL_ALREADY_EXISTS"
                    }
                  },
                  "UPDATE_USER_INVALID_PASSWORD": {
                    "summary": "Password validation failed.",
                    "value": {
                      "detail": {
                        "code": "UPDATE_USER_INVALID_PASSWORD",
                        "reason": "Password should beat least 3 characters"
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      }
    },
    "/v1/users/{id}": {
      "get": {
        "tags": [
          "users"
        ],
        "summary": "Users:User",
        "operationId": "users_user_v1_users__id__get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "403": {
            "description": "Not a superuser."
          },
          "404": {
            "description": "The user does not exist."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "users"
        ],
        "summary": "Users:Patch User",
        "operationId": "users_patch_user_v1_users__id__patch",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserRead"
                }
              }
            }
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "403": {
            "description": "Not a superuser."
          },
          "404": {
            "description": "The user does not exist."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "UPDATE_USER_EMAIL_ALREADY_EXISTS": {
                    "summary": "A user with this email already exists.",
                    "value": {
                      "detail": "UPDATE_USER_EMAIL_ALREADY_EXISTS"
                    }
                  },
                  "UPDATE_USER_INVALID_PASSWORD": {
                    "summary": "Password validation failed.",
                    "value": {
                      "detail": {
                        "code": "UPDATE_USER_INVALID_PASSWORD",
                        "reason": "Password should beat least 3 characters"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "users"
        ],
        "summary": "Users:Delete User",
        "operationId": "users_delete_user_v1_users__id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing token or inactive user."
          },
          "403": {
            "description": "Not a superuser."
          },
          "404": {
            "description": "The user does not exist."
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orgs": {
      "get": {
        "tags": [
          "organizations"
        ],
        "summary": "My Orgs",
        "operationId": "my_orgs_v1_orgs_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/OrgRead"
                  },
                  "type": "array",
                  "title": "Response My Orgs V1 Orgs Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "organizations"
        ],
        "summary": "Create",
        "operationId": "create_v1_orgs_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrgCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      }
    },
    "/v1/orgs/current": {
      "get": {
        "tags": [
          "organizations"
        ],
        "summary": "Current",
        "operationId": "current_v1_orgs_current_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgRead"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      }
    },
    "/v1/orgs/{org_id}/members": {
      "get": {
        "tags": [
          "organizations"
        ],
        "summary": "Members",
        "operationId": "members_v1_orgs__org_id__members_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Org Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrgMemberRead"
                  },
                  "title": "Response Members V1 Orgs  Org Id  Members Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "organizations"
        ],
        "summary": "Add Member",
        "operationId": "add_member_v1_orgs__org_id__members_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Org Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrgMemberAdd"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrgMemberRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orgs/{org_id}/members/{user_id}": {
      "patch": {
        "tags": [
          "organizations"
        ],
        "summary": "Change Role",
        "operationId": "change_role_v1_orgs__org_id__members__user_id__patch",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Org Id"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "User Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrgMemberUpdate"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "organizations"
        ],
        "summary": "Remove Member",
        "operationId": "remove_member_v1_orgs__org_id__members__user_id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "org_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Org Id"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "User Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects": {
      "get": {
        "tags": [
          "projects"
        ],
        "summary": "List Projects",
        "operationId": "list_projects_v1_projects_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ProjectRead"
                  },
                  "type": "array",
                  "title": "Response List Projects V1 Projects Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "projects"
        ],
        "summary": "Create Project",
        "operationId": "create_project_v1_projects_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      }
    },
    "/v1/projects/{project_id}": {
      "get": {
        "tags": [
          "projects"
        ],
        "summary": "Get Project",
        "operationId": "get_project_v1_projects__project_id__get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "projects"
        ],
        "summary": "Rename Project",
        "operationId": "rename_project_v1_projects__project_id__patch",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "projects"
        ],
        "summary": "Delete Project",
        "operationId": "delete_project_v1_projects__project_id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{project_id}/members": {
      "get": {
        "tags": [
          "projects"
        ],
        "summary": "List Members",
        "operationId": "list_members_v1_projects__project_id__members_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MemberRead"
                  },
                  "title": "Response List Members V1 Projects  Project Id  Members Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "projects"
        ],
        "summary": "Add Member",
        "operationId": "add_member_v1_projects__project_id__members_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MemberAdd"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{project_id}/members/{user_id}": {
      "delete": {
        "tags": [
          "projects"
        ],
        "summary": "Remove Member",
        "operationId": "remove_member_v1_projects__project_id__members__user_id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "User Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{project_id}/keys": {
      "get": {
        "tags": [
          "api keys"
        ],
        "summary": "List Project Keys",
        "operationId": "list_project_keys_v1_projects__project_id__keys_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyRead"
                  },
                  "title": "Response List Project Keys V1 Projects  Project Id  Keys Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "api keys"
        ],
        "summary": "Create Project Key",
        "operationId": "create_project_key_v1_projects__project_id__keys_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreated"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/projects/{project_id}/keys/{key_id}": {
      "delete": {
        "tags": [
          "api keys"
        ],
        "summary": "Revoke Project Key",
        "operationId": "revoke_project_key_v1_projects__project_id__keys__key_id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Project Id"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Key Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/keys": {
      "get": {
        "tags": [
          "api keys"
        ],
        "summary": "List Keys",
        "operationId": "list_keys_v1_keys_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyRead"
                  },
                  "type": "array",
                  "title": "Response List Keys V1 Keys Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "api keys"
        ],
        "summary": "Create Key",
        "operationId": "create_key_v1_keys_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiKeyCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreated"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      }
    },
    "/v1/keys/{key_id}/rotate": {
      "post": {
        "tags": [
          "api keys"
        ],
        "summary": "Rotate Key",
        "operationId": "rotate_key_v1_keys__key_id__rotate_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Key Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ApiKeyRotate"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyCreated"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/keys/{key_id}": {
      "delete": {
        "tags": [
          "api keys"
        ],
        "summary": "Revoke Key",
        "operationId": "revoke_key_v1_keys__key_id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Key Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/keys/leaks": {
      "post": {
        "tags": [
          "api keys"
        ],
        "summary": "Report Leak",
        "description": "Bez uwierzytelnienia (skanery sekretów). Ta sama odpowiedź niezależnie od trafień.",
        "operationId": "report_leak_v1_keys_leaks_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeakReport"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeakAccepted"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/judge": {
      "post": {
        "summary": "Judge",
        "operationId": "judge_v1_judge_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JudgeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JudgeReport"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/rules": {
      "get": {
        "summary": "Rules",
        "operationId": "rules_v1_rules_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "items": {
                        "$ref": "#/components/schemas/RuleBrief"
                      },
                      "type": "array"
                    },
                    {
                      "items": {
                        "$ref": "#/components/schemas/Rule"
                      },
                      "type": "array"
                    }
                  ],
                  "title": "Response Rules V1 Rules Get"
                }
              }
            }
          },
          "4XX": {
            "description": "Client Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      }
    },
    "/v1/judge/batch": {
      "post": {
        "summary": "Judge Batch",
        "operationId": "judge_batch_v1_judge_batch_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/jobs": {
      "post": {
        "tags": [
          "jobs"
        ],
        "summary": "Create",
        "operationId": "create_v1_jobs_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobCreate"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobAccepted"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      },
      "get": {
        "tags": [
          "jobs"
        ],
        "summary": "Jobs",
        "operationId": "jobs_v1_jobs_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JobRead"
                  },
                  "title": "Response Jobs V1 Jobs Get"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/jobs/{job_id}": {
      "get": {
        "tags": [
          "jobs"
        ],
        "summary": "Job",
        "operationId": "job_v1_jobs__job_id__get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobRead"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/jobs/{job_id}/results": {
      "get": {
        "tags": [
          "jobs"
        ],
        "summary": "Results",
        "description": "Wynik każdej pozycji z URL-em; pełny raport: GET /v1/reports/{report_id}.",
        "operationId": "results_v1_jobs__job_id__results_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/JobResultItem"
                  },
                  "title": "Response Results V1 Jobs  Job Id  Results Get"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/audits/site/preview": {
      "post": {
        "tags": [
          "audits"
        ],
        "summary": "Site Preview",
        "description": "Krok 1 (#119): sitemap, `urls` albo import `items` [{url, html?}] -> liczba URL-i, wzorce, `preview_id`\n(ważny tylko dla tego samego użytkownika/klucza i projektu).",
        "operationId": "site_preview_v1_audits_site_preview_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteSource"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SitePreview"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/audits/site/estimate": {
      "post": {
        "tags": [
          "audits"
        ],
        "summary": "Site Estimate",
        "description": "Krok 2 (#119): wybór (scope, pages, strategia, preset, js) -> koszt USD i czas; bez zlecenia.",
        "operationId": "site_estimate_v1_audits_site_estimate_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteAuditCreate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Estimate"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/audits/site": {
      "post": {
        "tags": [
          "audits"
        ],
        "summary": "Site",
        "description": "Sitemap (robots.txt, indeksy) -> wzorce URL -> próba (~1/3 najnowszych + warstwowo, seed) -> zadanie.",
        "operationId": "site_v1_audits_site_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SiteAuditCreate"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditAccepted"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/audits": {
      "get": {
        "tags": [
          "audits"
        ],
        "summary": "Audits",
        "operationId": "audits_v1_audits_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AuditRead"
                  },
                  "title": "Response Audits V1 Audits Get"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/audits/{audit_id}": {
      "get": {
        "tags": [
          "audits"
        ],
        "summary": "Audit",
        "description": "Postęp (z zadania), `brief` i raport zbiorczy: ryzyko per polityka, wzorce URL, najgorsze strony, werdykt.",
        "operationId": "audit_v1_audits__audit_id__get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "audit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Audit Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditRead"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/audits/{audit_id}/export.html": {
      "get": {
        "tags": [
          "audits"
        ],
        "summary": "Export Html",
        "operationId": "export_html_v1_audits__audit_id__export_html_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "audit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Audit Id"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "en",
              "title": "Lang"
            }
          },
          {
            "name": "detail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(findings|full)$",
              "description": "findings (default): only pages/rules at or above the threshold; full: all tables and pages (#147).",
              "default": "findings",
              "title": "Detail"
            },
            "description": "findings (default): only pages/rules at or above the threshold; full: all tables and pages (#147)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/audits/{audit_id}/export.pdf": {
      "get": {
        "tags": [
          "audits"
        ],
        "summary": "Export Pdf",
        "operationId": "export_pdf_v1_audits__audit_id__export_pdf_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "audit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Audit Id"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "en",
              "title": "Lang"
            }
          },
          {
            "name": "detail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(findings|full)$",
              "description": "findings (default): only pages/rules at or above the threshold; full: all tables and pages (#147).",
              "default": "findings",
              "title": "Detail"
            },
            "description": "findings (default): only pages/rules at or above the threshold; full: all tables and pages (#147)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/audits/{audit_id}/export.csv": {
      "get": {
        "tags": [
          "audits"
        ],
        "summary": "Export Csv",
        "description": "findings (domyślnie, #147): wiersz na trafienie (reguła >= progu) stron z naruszeniami, na końcu `title`,\n`summary` reguły w języku `lang` (#168); full: wiersz na stronę (report_id, url, wzorzec, poziomy, najwyższa reguła).",
        "operationId": "export_csv_v1_audits__audit_id__export_csv_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "audit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Audit Id"
            }
          },
          {
            "name": "detail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(findings|full)$",
              "description": "findings (default): only pages/rules at or above the threshold; full: all tables and pages (#147).",
              "default": "findings",
              "title": "Detail"
            },
            "description": "findings (default): only pages/rules at or above the threshold; full: all tables and pages (#147)."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "en",
              "title": "Lang"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/reports": {
      "get": {
        "summary": "Reports",
        "operationId": "reports_v1_reports_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "url",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Url"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportSummary"
                  },
                  "title": "Response Reports V1 Reports Get"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/reports/{report_id}": {
      "get": {
        "summary": "Report",
        "operationId": "report_v1_reports__report_id__get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoredReport"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/tiers": {
      "get": {
        "tags": [
          "upgrades"
        ],
        "summary": "Tiers",
        "description": "Tabela poziomów (dane `features/tiers/tiers.yaml`) z ceną w USD.",
        "operationId": "tiers_v1_tiers_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TierTable"
                }
              }
            }
          },
          "4XX": {
            "description": "Client Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "5XX": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{report_id}/upgrade/estimate": {
      "post": {
        "tags": [
          "upgrades"
        ],
        "summary": "Report Estimate",
        "description": "Cena i czas dopłaty bez wykonania (USD = cena celu − zapłacone + pobranie + dodatek Intent).",
        "operationId": "report_estimate_v1_reports__report_id__upgrade_estimate_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpgradeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeEstimate"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/reports/{report_id}/upgrade": {
      "post": {
        "tags": [
          "upgrades"
        ],
        "summary": "Report Upgrade",
        "description": "Dopłata do poziomu/kategorii: tylko brakujące reguły i kroki, ten sam `rep_`. 409 upgrade_unavailable, 429.",
        "operationId": "report_upgrade_v1_reports__report_id__upgrade_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpgradeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeResult"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/audits/{audit_id}/upgrade/estimate": {
      "post": {
        "tags": [
          "upgrades"
        ],
        "summary": "Audit Estimate",
        "operationId": "audit_estimate_v1_audits__audit_id__upgrade_estimate_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "audit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Audit Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditUpgradeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditUpgradeEstimate"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/audits/{audit_id}/upgrade": {
      "post": {
        "tags": [
          "upgrades"
        ],
        "summary": "Audit Upgrade",
        "description": "Dopłata stron audytu w tle (wszystkie, `page_ids` albo `flagged`). Jedna rezerwacja całości, zwrot nieudanych.",
        "operationId": "audit_upgrade_v1_audits__audit_id__upgrade_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "audit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Audit Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuditUpgradeRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpgradeRun"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      },
      "get": {
        "tags": [
          "upgrades"
        ],
        "summary": "Audit Upgrade Status",
        "operationId": "audit_upgrade_status_v1_audits__audit_id__upgrade_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "audit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Audit Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/UpgradeRun"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "title": "Response Audit Upgrade Status V1 Audits  Audit Id  Upgrade Get"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/reports/{report_id}/export.html": {
      "get": {
        "summary": "Export Html",
        "description": "Samodzielny HTML: CSS inline, bez zasobów zewnętrznych (działa offline).",
        "operationId": "export_html_v1_reports__report_id__export_html_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(en|pl)$",
              "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (before #479); the language chosen at order time always wins.",
              "default": "en",
              "title": "Lang"
            },
            "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (before #479); the language chosen at order time always wins."
          },
          {
            "name": "detail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(findings|full)$",
              "description": "findings (default): only rules at or above the threshold; full: all rules (#147).",
              "default": "findings",
              "title": "Detail"
            },
            "description": "findings (default): only rules at or above the threshold; full: all rules (#147)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{report_id}/export.pdf": {
      "get": {
        "summary": "Export Pdf",
        "operationId": "export_pdf_v1_reports__report_id__export_pdf_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(en|pl)$",
              "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (before #479); the language chosen at order time always wins.",
              "default": "en",
              "title": "Lang"
            },
            "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (before #479); the language chosen at order time always wins."
          },
          {
            "name": "detail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(findings|full)$",
              "description": "findings (default): only rules at or above the threshold; full: all rules (#147).",
              "default": "findings",
              "title": "Detail"
            },
            "description": "findings (default): only rules at or above the threshold; full: all rules (#147)."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/intent/{report_id}/export.html": {
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Intent Export Html",
        "operationId": "intent_export_html_v1_intent__report_id__export_html_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(en|pl)$",
              "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (before #479); the language chosen at order time always wins.",
              "default": "en",
              "title": "Lang"
            },
            "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (before #479); the language chosen at order time always wins."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/intent/{report_id}/export.pdf": {
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Intent Export Pdf",
        "operationId": "intent_export_pdf_v1_intent__report_id__export_pdf_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(en|pl)$",
              "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (before #479); the language chosen at order time always wins.",
              "default": "en",
              "title": "Lang"
            },
            "description": "Fallback language (en | pl) only for reports without a stored `report_lang` (before #479); the language chosen at order time always wins."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/intent/{report_id}/export.csv": {
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Intent Export Csv",
        "operationId": "intent_export_csv_v1_intent__report_id__export_csv_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/intent/batches/{batch_id}/export.csv": {
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Intent Batch Csv",
        "operationId": "intent_batch_csv_v1_intent_batches__batch_id__export_csv_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "batch_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Batch Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/intent": {
      "post": {
        "tags": [
          "intent"
        ],
        "summary": "Create Intent",
        "description": "Search intent report for one phrase and market. Charged per phrase (tier `basic`). With `freshness=auto`\n(default) search results up to `max_age_days` old (default 3) are reused and cost less or nothing;\n`freshness=fresh` always fetches new results at the full price. `premium` and `compare` are coming soon.",
        "operationId": "create_intent_v1_intent_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 60,
              "minimum": 0,
              "description": "Wait up to N seconds",
              "default": 0,
              "title": "Wait"
            },
            "description": "Wait up to N seconds"
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentRead"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      },
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Intent History",
        "operationId": "intent_history_v1_intent_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "batch_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Batch Id"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/IntentSummary"
                  },
                  "title": "Response Intent History V1 Intent Get"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/intent/batch": {
      "post": {
        "tags": [
          "intent"
        ],
        "summary": "Create Intent Batch",
        "description": "Many phrases at once (duplicates run once). Each phrase becomes its own report with the batch id.",
        "operationId": "create_intent_batch_v1_intent_batch_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntentBatchRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentBatchAccepted"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/intent/batch/csv": {
      "post": {
        "tags": [
          "intent"
        ],
        "summary": "Create Intent Batch Csv",
        "description": "Phrases from a CSV file: a `query` column (optional `market`, `device`), or phrase and market without a header.",
        "operationId": "create_intent_batch_csv_v1_intent_batch_csv_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_intent_batch_csv_v1_intent_batch_csv_post"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentBatchAccepted"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/intent/{report_id}": {
      "get": {
        "tags": [
          "intent"
        ],
        "summary": "Intent Report",
        "operationId": "intent_report_v1_intent__report_id__get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentRead"
                }
              }
            }
          },
          "4XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Client Error"
          },
          "5XX": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "Server Error"
          }
        }
      }
    },
    "/v1/reports/{report_id}/feedback": {
      "post": {
        "tags": [
          "feedback"
        ],
        "summary": "Create Feedback",
        "operationId": "create_feedback_v1_reports__report_id__feedback_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/feedback": {
      "get": {
        "tags": [
          "feedback"
        ],
        "summary": "List Feedback",
        "operationId": "list_feedback_v1_feedback_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "rule_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Rule Id"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/FeedbackLabel"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Label"
            }
          },
          {
            "name": "report_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Report Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FeedbackRead"
                  },
                  "title": "Response List Feedback V1 Feedback Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/invites": {
      "get": {
        "tags": [
          "invites"
        ],
        "summary": "List Invites",
        "operationId": "list_invites_v1_invites_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/InviteRead"
                  },
                  "type": "array",
                  "title": "Response List Invites V1 Invites Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "invites"
        ],
        "summary": "Create",
        "operationId": "create_v1_invites_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteCreated"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      }
    },
    "/v1/invites/{invite_id}": {
      "delete": {
        "tags": [
          "invites"
        ],
        "summary": "Revoke",
        "operationId": "revoke_v1_invites__invite_id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "invite_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Invite Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{report_id}/shares": {
      "post": {
        "tags": [
          "sharing"
        ],
        "summary": "Share Report",
        "description": "Public read-only link to a report. The `link` (token) is shown once; only its SHA-256 is stored.",
        "operationId": "share_report_v1_reports__report_id__shares_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ShareCreate"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareCreated"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "sharing"
        ],
        "summary": "Report Shares",
        "operationId": "report_shares_v1_reports__report_id__shares_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShareRead"
                  },
                  "title": "Response Report Shares V1 Reports  Report Id  Shares Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports/{report_id}/shares/{share_id}": {
      "delete": {
        "tags": [
          "sharing"
        ],
        "summary": "Revoke Report Share",
        "operationId": "revoke_report_share_v1_reports__report_id__shares__share_id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          },
          {
            "name": "share_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Share Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/audits/{audit_id}/shares": {
      "post": {
        "tags": [
          "sharing"
        ],
        "summary": "Share Audit",
        "description": "Public read-only link to a site audit (findings only).",
        "operationId": "share_audit_v1_audits__audit_id__shares_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "audit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Audit Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ShareCreate"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareCreated"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "sharing"
        ],
        "summary": "Audit Shares",
        "operationId": "audit_shares_v1_audits__audit_id__shares_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "audit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Audit Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShareRead"
                  },
                  "title": "Response Audit Shares V1 Audits  Audit Id  Shares Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/audits/{audit_id}/shares/{share_id}": {
      "delete": {
        "tags": [
          "sharing"
        ],
        "summary": "Revoke Audit Share",
        "operationId": "revoke_audit_share_v1_audits__audit_id__shares__share_id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "audit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Audit Id"
            }
          },
          {
            "name": "share_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Share Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/share-links": {
      "get": {
        "tags": [
          "sharing"
        ],
        "summary": "Share Links",
        "description": "All share links in the selected project (X-Project-ID / ?project_id) or in all visible projects.",
        "operationId": "share_links_v1_share_links_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 200,
              "title": "Limit"
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShareRead"
                  },
                  "title": "Response Share Links V1 Share Links Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/share-links/{share_id}": {
      "delete": {
        "tags": [
          "sharing"
        ],
        "summary": "Revoke Link",
        "operationId": "revoke_link_v1_share_links__share_id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "share_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Share Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "sharing"
        ],
        "summary": "Share Password",
        "description": "Set, change (`password`) or remove (`null`) the link password. Existing unlock cookies stop working.",
        "operationId": "share_password_v1_share_links__share_id__patch",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "share_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Share Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SharePassword"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/intent/{report_id}/shares": {
      "post": {
        "tags": [
          "sharing"
        ],
        "summary": "Share Intent",
        "description": "Public read-only link to a search intent report (#194).",
        "operationId": "share_intent_v1_intent__report_id__shares_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/ShareCreate"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareCreated"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "sharing"
        ],
        "summary": "Intent Shares",
        "operationId": "intent_shares_v1_intent__report_id__shares_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ShareRead"
                  },
                  "title": "Response Intent Shares V1 Intent  Report Id  Shares Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/intent/{report_id}/shares/{share_id}": {
      "delete": {
        "tags": [
          "sharing"
        ],
        "summary": "Revoke Intent Share",
        "operationId": "revoke_intent_share_v1_intent__report_id__shares__share_id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          },
          {
            "name": "share_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Share Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "tags": [
          "usage"
        ],
        "summary": "Usage",
        "description": "Projekt: `?project_id=`/`X-Project-ID`, klucz API - jego projekt, inaczej domyślny projekt użytkownika.",
        "operationId": "usage_v1_usage_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Project public id, prj_… (or X-Project-ID header)",
              "title": "Project Id"
            },
            "description": "Project public id, prj_… (or X-Project-ID header)"
          },
          {
            "name": "X-Project-ID",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Project-Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks": {
      "get": {
        "tags": [
          "webhooks"
        ],
        "summary": "List Endpoints",
        "operationId": "list_endpoints_v1_webhooks_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/EndpointRead"
                  },
                  "type": "array",
                  "title": "Response List Endpoints V1 Webhooks Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "webhooks"
        ],
        "summary": "Create Endpoint",
        "operationId": "create_endpoint_v1_webhooks_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EndpointCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ]
      }
    },
    "/v1/webhooks/{endpoint_id}": {
      "delete": {
        "tags": [
          "webhooks"
        ],
        "summary": "Delete Endpoint",
        "operationId": "delete_endpoint_v1_webhooks__endpoint_id__delete",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Endpoint Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{endpoint_id}/secret": {
      "get": {
        "tags": [
          "webhooks"
        ],
        "summary": "Get Secret",
        "operationId": "get_secret_v1_webhooks__endpoint_id__secret_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Endpoint Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EndpointSecret"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{endpoint_id}/test": {
      "post": {
        "tags": [
          "webhooks"
        ],
        "summary": "Send Test",
        "operationId": "send_test_v1_webhooks__endpoint_id__test_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Endpoint Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/{endpoint_id}/deliveries": {
      "get": {
        "tags": [
          "webhooks"
        ],
        "summary": "Deliveries",
        "operationId": "deliveries_v1_webhooks__endpoint_id__deliveries_get",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Endpoint Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeliveryRead"
                  },
                  "title": "Response Deliveries V1 Webhooks  Endpoint Id  Deliveries Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks/deliveries/{delivery_id}/redeliver": {
      "post": {
        "tags": [
          "webhooks"
        ],
        "summary": "Redeliver",
        "operationId": "redeliver_v1_webhooks_deliveries__delivery_id__redeliver_post",
        "security": [
          {
            "APIKeyCookie": []
          },
          {
            "OAuth2PasswordBearer": []
          }
        ],
        "parameters": [
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Delivery Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryRead"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "tags": [
          "status"
        ],
        "summary": "Get Status",
        "description": "Stan usługi: `level` up|warming|busy|degraded, komunikat (EN/PL wg `Accept-Language` albo `?lang=`),\nszacowany czas zimnego startu `eta_s`, aktywne komunikaty. `scope` = moduł (judge, audit, intent, api).",
        "operationId": "get_status_v1_status_get",
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Scope"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicStatus"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/public/leads": {
      "post": {
        "tags": [
          "public"
        ],
        "summary": "Create Lead",
        "operationId": "create_lead_v1_public_leads_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadAccepted"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Health",
        "operationId": "health_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Health Health Get"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ActionItem": {
        "properties": {
          "rule_id": {
            "type": "string",
            "title": "Rule Id"
          },
          "category": {
            "type": "string",
            "title": "Category"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "fix": {
            "type": "string",
            "title": "Fix",
            "default": ""
          },
          "pages": {
            "items": {
              "$ref": "#/components/schemas/ActionPage"
            },
            "type": "array",
            "title": "Pages"
          }
        },
        "type": "object",
        "required": [
          "rule_id",
          "category",
          "title",
          "pages"
        ],
        "title": "ActionItem",
        "description": "„Najważniejsze do zrobienia” (#473): jedna reguła z trafieniem -> co zrobić + strony. Kolejność liczy kod\n(liczba stron, waga kategorii spam > quality > helpful, najwyższy wynik); tekst `fix` z katalogu reguł."
      },
      "ActionPage": {
        "properties": {
          "report_id": {
            "type": "string",
            "title": "Report Id"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "action": {
            "type": "string",
            "title": "Action",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "report_id",
          "url"
        ],
        "title": "ActionPage"
      },
      "AdminUserCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "title": "Password"
          },
          "role": {
            "$ref": "#/components/schemas/Role",
            "default": "user"
          }
        },
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "title": "AdminUserCreate",
        "description": "POST /v1/users (admin), gdy rejestracja publiczna jest zamknięta."
      },
      "AnswerType": {
        "type": "string",
        "enum": [
          "binary",
          "choice"
        ],
        "title": "AnswerType",
        "description": "Format odpowiedzi (#157): binary = jeden token 0/1; choice = jedna litera z `options`."
      },
      "ApiKeyCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/gspamjudge__features__apikeys__contracts__Scope"
            },
            "type": "array",
            "minItems": 1,
            "title": "Scopes"
          },
          "rate_limit": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100000.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Rate Limit",
            "description": "Requests per minute; None = server default"
          },
          "owner_type": {
            "$ref": "#/components/schemas/OwnerType",
            "description": "project | user | org (POST /v1/keys)",
            "default": "project"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id",
            "description": "Project public id (prj_…) for owner_type=project on POST /v1/keys"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At",
            "description": "Expiry (UTC); default now + 90 days, max 1 year"
          },
          "expires_in_days": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 365.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires In Days",
            "description": "Alternative to expires_at (panel form)"
          },
          "never_expires": {
            "type": "boolean",
            "title": "Never Expires",
            "description": "Organization keys only, organization owner/admin only",
            "default": false
          },
          "allowed_ips": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Allowed Ips",
            "description": "IPv4/IPv6 addresses or CIDR ranges; empty = any address"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ApiKeyCreate"
      },
      "ApiKeyCreated": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "owner_type": {
            "$ref": "#/components/schemas/OwnerType",
            "default": "project"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "display": {
            "type": "string",
            "title": "Display"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/gspamjudge__features__apikeys__contracts__Scope"
            },
            "type": "array",
            "title": "Scopes"
          },
          "rate_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rate Limit"
          },
          "allowed_ips": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Allowed Ips",
            "default": []
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "last_used_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used Ip"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "revoke_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoke Reason"
          },
          "rotated_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rotated From"
          },
          "key": {
            "type": "string",
            "title": "Key"
          }
        },
        "type": "object",
        "required": [
          "id",
          "project_id",
          "name",
          "prefix",
          "display",
          "scopes",
          "rate_limit",
          "created_at",
          "key"
        ],
        "title": "ApiKeyCreated",
        "description": "Odpowiedź na utworzenie/rotację: `key` pokazujemy dokładnie raz; w bazie jest tylko jego HMAC."
      },
      "ApiKeyRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "owner_type": {
            "$ref": "#/components/schemas/OwnerType",
            "default": "project"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "owner_user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owner User Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "prefix": {
            "type": "string",
            "title": "Prefix"
          },
          "display": {
            "type": "string",
            "title": "Display"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/gspamjudge__features__apikeys__contracts__Scope"
            },
            "type": "array",
            "title": "Scopes"
          },
          "rate_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rate Limit"
          },
          "allowed_ips": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Allowed Ips",
            "default": []
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "last_used_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used Ip"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "revoke_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoke Reason"
          },
          "rotated_from": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rotated From"
          }
        },
        "type": "object",
        "required": [
          "id",
          "project_id",
          "name",
          "prefix",
          "display",
          "scopes",
          "rate_limit",
          "created_at"
        ],
        "title": "ApiKeyRead",
        "description": "Klucz bez sekretu. `prefix` identyfikuje klucz w UI (`gsj_live_<prefix>_…`).\n`revoked_at` w przyszłości = zaplanowane odwołanie (stary klucz po rotacji, okres łaski)."
      },
      "ApiKeyRotate": {
        "properties": {
          "grace_hours": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 720.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Grace Hours",
            "description": "Old key keeps working this long; default 168 (7 days)"
          }
        },
        "type": "object",
        "title": "ApiKeyRotate"
      },
      "AuditAccepted": {
        "properties": {
          "audit_id": {
            "type": "string",
            "title": "Audit Id"
          },
          "job_id": {
            "type": "string",
            "title": "Job Id"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          },
          "patterns": {
            "type": "integer",
            "title": "Patterns"
          }
        },
        "type": "object",
        "required": [
          "audit_id",
          "job_id",
          "pages",
          "patterns"
        ],
        "title": "AuditAccepted"
      },
      "AuditBrief": {
        "properties": {
          "level": {
            "type": "string",
            "title": "Level"
          },
          "quality_level": {
            "type": "string",
            "title": "Quality Level"
          },
          "helpful_level": {
            "type": "string",
            "title": "Helpful Level",
            "default": "unknown"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categories"
          },
          "hits": {
            "type": "integer",
            "title": "Hits"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          },
          "policies": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Policies"
          },
          "progress": {
            "$ref": "#/components/schemas/AuditProgress"
          }
        },
        "type": "object",
        "required": [
          "level",
          "quality_level",
          "hits",
          "pages",
          "policies",
          "progress"
        ],
        "title": "AuditBrief",
        "description": "Skrót zapisany w `audits.summary` po zakończeniu: historia i lista bez wczytywania raportów."
      },
      "AuditKind": {
        "type": "string",
        "enum": [
          "batch",
          "job",
          "site"
        ],
        "title": "AuditKind"
      },
      "AuditProgress": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "done": {
            "type": "integer",
            "title": "Done"
          },
          "failed": {
            "type": "integer",
            "title": "Failed"
          },
          "errors": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Errors",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "status",
          "total",
          "done",
          "failed"
        ],
        "title": "AuditProgress"
      },
      "AuditRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "kind": {
            "$ref": "#/components/schemas/AuditKind"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "progress": {
            "$ref": "#/components/schemas/AuditProgress"
          },
          "report_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Report Ids"
          },
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SamplePlan"
              },
              {
                "type": "null"
              }
            ]
          },
          "brief": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AuditBrief"
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AuditSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "report_lang": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Lang"
          }
        },
        "type": "object",
        "required": [
          "id",
          "project_id",
          "kind",
          "title",
          "created_at",
          "progress",
          "report_ids"
        ],
        "title": "AuditRead"
      },
      "AuditSummary": {
        "properties": {
          "pages": {
            "type": "integer",
            "title": "Pages"
          },
          "counts": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Counts"
          },
          "level": {
            "type": "string",
            "title": "Level"
          },
          "quality_level": {
            "type": "string",
            "title": "Quality Level"
          },
          "helpful_level": {
            "type": "string",
            "title": "Helpful Level",
            "default": "unknown"
          },
          "note": {
            "type": "string",
            "title": "Note"
          },
          "policies": {
            "items": {
              "$ref": "#/components/schemas/PolicyRisk"
            },
            "type": "array",
            "title": "Policies"
          },
          "patterns": {
            "items": {
              "$ref": "#/components/schemas/PatternRisk"
            },
            "type": "array",
            "title": "Patterns"
          },
          "worst": {
            "items": {
              "$ref": "#/components/schemas/PageRisk"
            },
            "type": "array",
            "title": "Worst"
          },
          "pages_list": {
            "items": {
              "$ref": "#/components/schemas/PageRisk"
            },
            "type": "array",
            "title": "Pages List"
          },
          "findings": {
            "items": {
              "$ref": "#/components/schemas/PageFindings"
            },
            "type": "array",
            "title": "Findings",
            "default": []
          },
          "clean": {
            "items": {
              "$ref": "#/components/schemas/PageRisk"
            },
            "type": "array",
            "title": "Clean",
            "default": []
          },
          "scales": {
            "items": {
              "$ref": "#/components/schemas/ScaleAggregate"
            },
            "type": "array",
            "title": "Scales",
            "default": []
          },
          "pq_patterns": {
            "items": {
              "$ref": "#/components/schemas/PatternScale"
            },
            "type": "array",
            "title": "Pq Patterns",
            "default": []
          },
          "pq_low_pages": {
            "items": {
              "$ref": "#/components/schemas/ScalePage"
            },
            "type": "array",
            "title": "Pq Low Pages",
            "default": []
          },
          "actions": {
            "items": {
              "$ref": "#/components/schemas/ActionItem"
            },
            "type": "array",
            "title": "Actions",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "pages",
          "counts",
          "level",
          "quality_level",
          "note",
          "policies",
          "patterns",
          "worst",
          "pages_list"
        ],
        "title": "AuditSummary"
      },
      "AuditUpgradeEstimate": {
        "properties": {
          "audit_id": {
            "type": "string",
            "title": "Audit Id"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          },
          "unavailable": {
            "type": "integer",
            "title": "Unavailable",
            "default": 0
          },
          "seconds": {
            "type": "integer",
            "title": "Seconds"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/UpgradeEstimate"
            },
            "type": "array",
            "title": "Items",
            "default": []
          },
          "cost_usd": {
            "type": "number",
            "title": "Cost Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "audit_id",
          "pages",
          "seconds",
          "cost_usd"
        ],
        "title": "AuditUpgradeEstimate"
      },
      "AuditUpgradeRequest": {
        "properties": {
          "market": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Market",
            "description": "Market `language-COUNTRY`, e.g. pl-PL (default en-US)"
          },
          "location_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location Code",
            "description": "Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market`"
          },
          "language_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Language Code",
            "description": "language_code from the supported markets list, e.g. pl; overrides the language of `market`"
          },
          "tier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "lite",
                  "basic",
                  "premium"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tier"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "spam",
                    "quality",
                    "helpful"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categories"
          },
          "query": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Query"
          },
          "page_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Page Ids",
            "description": "rep_… wybrane strony; brak = wszystkie"
          },
          "flagged": {
            "type": "boolean",
            "title": "Flagged",
            "description": "Tylko strony z trafieniem spam/jakość >= MEDIUM",
            "default": false
          }
        },
        "type": "object",
        "title": "AuditUpgradeRequest"
      },
      "Balance": {
        "properties": {
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "balance_usd": {
            "type": "number",
            "title": "Balance Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "balance_usd"
        ],
        "title": "Balance",
        "description": "Saldo PAYG orgu w USD (`balance_usd`); `expires_at` = najbliższe wygaśnięcie."
      },
      "BatchItemResult": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index"
          },
          "report": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JudgeReport"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "index"
        ],
        "title": "BatchItemResult"
      },
      "BatchRequest": {
        "properties": {
          "modes": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Category"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modes",
            "description": "Audit modes (#334): spam (Google spam policies), quality (page quality), helpful (helpful content). Narrows `rules` (or the whole catalogue); empty or all three = no narrowing."
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/IngestInput"
            },
            "type": "array",
            "title": "Items"
          },
          "rules": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rules"
          },
          "explain": {
            "type": "boolean",
            "title": "Explain",
            "default": false
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "report_lang": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "en",
                  "pl"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Lang",
            "description": "Report language (#479): en | pl; titles, what to do, exports and share link. Empty = Accept-Language, else en"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "BatchRequest"
      },
      "BatchResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/BatchItemResult"
            },
            "type": "array",
            "title": "Results"
          }
        },
        "type": "object",
        "required": [
          "results"
        ],
        "title": "BatchResponse"
      },
      "BearerResponse": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token"
          },
          "token_type": {
            "type": "string",
            "title": "Token Type"
          }
        },
        "type": "object",
        "required": [
          "access_token",
          "token_type"
        ],
        "title": "BearerResponse"
      },
      "Body_auth_cookie_login_v1_auth_cookie_login_post": {
        "properties": {
          "grant_type": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^password$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grant Type"
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "password": {
            "type": "string",
            "format": "password",
            "title": "Password"
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "default": ""
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "format": "password",
            "title": "Client Secret"
          }
        },
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "title": "Body_auth_cookie_login_v1_auth_cookie_login_post"
      },
      "Body_auth_jwt_login_v1_auth_jwt_login_post": {
        "properties": {
          "grant_type": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^password$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grant Type"
          },
          "username": {
            "type": "string",
            "title": "Username"
          },
          "password": {
            "type": "string",
            "format": "password",
            "title": "Password"
          },
          "scope": {
            "type": "string",
            "title": "Scope",
            "default": ""
          },
          "client_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Id"
          },
          "client_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "format": "password",
            "title": "Client Secret"
          }
        },
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "title": "Body_auth_jwt_login_v1_auth_jwt_login_post"
      },
      "Body_create_intent_batch_csv_v1_intent_batch_csv_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "description": "CSV: query[,market[,device]]"
          },
          "market": {
            "type": "string",
            "title": "Market",
            "default": "en-US"
          },
          "tier": {
            "type": "string",
            "title": "Tier",
            "default": "basic"
          },
          "freshness": {
            "type": "string",
            "enum": [
              "auto",
              "fresh"
            ],
            "title": "Freshness",
            "default": "auto"
          },
          "max_age_days": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 7.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Age Days"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "report_lang": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "en",
                  "pl"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Lang",
            "description": "Report language (#479): en | pl"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_create_intent_batch_csv_v1_intent_batch_csv_post"
      },
      "Body_reset_forgot_password_v1_auth_forgot_password_post": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "Body_reset_forgot_password_v1_auth_forgot_password_post"
      },
      "Body_reset_reset_password_v1_auth_reset_password_post": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          },
          "password": {
            "type": "string",
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "token",
          "password"
        ],
        "title": "Body_reset_reset_password_v1_auth_reset_password_post"
      },
      "Category": {
        "type": "string",
        "enum": [
          "spam",
          "quality",
          "helpful"
        ],
        "title": "Category",
        "description": "Sekcja raportu i wybór audytu (#156): osobny poziom ryzyka na kategorię."
      },
      "ChoiceBar": {
        "properties": {
          "letter": {
            "type": "string",
            "title": "Letter"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "pct": {
            "type": "integer",
            "title": "Pct"
          },
          "prob_text": {
            "type": "string",
            "title": "Prob Text"
          },
          "modal": {
            "type": "boolean",
            "title": "Modal",
            "default": false
          },
          "concern": {
            "type": "boolean",
            "title": "Concern",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "letter",
          "label",
          "pct",
          "prob_text"
        ],
        "title": "ChoiceBar",
        "description": "Segment paska rozkładu reguły choice (#157)."
      },
      "DeliveryRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "endpoint_id": {
            "type": "string",
            "title": "Endpoint Id"
          },
          "event": {
            "type": "string",
            "title": "Event"
          },
          "delivery": {
            "type": "string",
            "title": "Delivery",
            "description": "X-GSPAMJUDGE-Delivery header value (receivers deduplicate on it)"
          },
          "status_code": {
            "type": "integer",
            "title": "Status Code",
            "description": "Receiver HTTP status; 0 = no connection or address rejected"
          },
          "ok": {
            "type": "boolean",
            "title": "Ok"
          },
          "attempts": {
            "type": "integer",
            "title": "Attempts"
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "title": "At"
          },
          "redelivery_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redelivery Of"
          }
        },
        "type": "object",
        "required": [
          "id",
          "endpoint_id",
          "event",
          "delivery",
          "status_code",
          "ok",
          "attempts",
          "at"
        ],
        "title": "DeliveryRead"
      },
      "Detectability": {
        "type": "string",
        "enum": [
          "P",
          "P+",
          "O"
        ],
        "title": "Detectability"
      },
      "ElementShare": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "share": {
            "type": "number",
            "title": "Share"
          }
        },
        "type": "object",
        "required": [
          "code",
          "share"
        ],
        "title": "ElementShare"
      },
      "EmailConfirm": {
        "properties": {
          "token": {
            "type": "string",
            "title": "Token"
          }
        },
        "type": "object",
        "required": [
          "token"
        ],
        "title": "EmailConfirm",
        "description": "POST /v1/auth/confirm (#400): token z linku w e-mailu."
      },
      "EndpointCreate": {
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "title": "Url",
            "description": "https only (http and private addresses only in dev)"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id",
            "description": "Project public id (prj_…); None = all projects of the org"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "type": "array",
            "minItems": 1,
            "title": "Events"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "EndpointCreate"
      },
      "EndpointRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "type": "array",
            "title": "Events"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "events",
          "created_at"
        ],
        "title": "EndpointRead"
      },
      "EndpointSecret": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "secret": {
            "type": "string",
            "title": "Secret"
          }
        },
        "type": "object",
        "required": [
          "id",
          "secret"
        ],
        "title": "EndpointSecret"
      },
      "ErrorBody": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "details": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Details"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          }
        },
        "type": "object",
        "required": [
          "code",
          "message",
          "request_id"
        ],
        "title": "ErrorBody"
      },
      "ErrorModel": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "detail"
        ],
        "title": "ErrorModel"
      },
      "ErrorResponse": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          }
        },
        "type": "object",
        "required": [
          "error"
        ],
        "title": "ErrorResponse",
        "description": "Jedyny kształt błędu wszystkich odpowiedzi /v1 (#46, ADR 0015)."
      },
      "Estimate": {
        "properties": {
          "selected": {
            "type": "integer",
            "title": "Selected"
          },
          "with_html": {
            "type": "integer",
            "title": "With Html",
            "default": 0
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categories"
          },
          "rules": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rules"
          },
          "seconds": {
            "type": "integer",
            "title": "Seconds"
          },
          "cost_usd": {
            "type": "number",
            "title": "Cost Usd",
            "readOnly": true
          },
          "cost_per_page_usd": {
            "type": "number",
            "title": "Cost Per Page Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "selected",
          "pages",
          "seconds",
          "cost_usd",
          "cost_per_page_usd"
        ],
        "title": "Estimate",
        "description": "Szacunek audytu: koszt w USD (`cost_usd`, `cost_per_page_usd`) i czas."
      },
      "Event": {
        "type": "string",
        "enum": [
          "job.finished",
          "ping"
        ],
        "title": "Event"
      },
      "Evidence": {
        "properties": {
          "quotes": {
            "items": {
              "$ref": "#/components/schemas/Quote"
            },
            "type": "array",
            "title": "Quotes",
            "default": []
          },
          "none": {
            "type": "boolean",
            "title": "None",
            "default": false
          },
          "supported": {
            "type": "boolean",
            "title": "Supported",
            "default": false
          },
          "prompt_ver": {
            "type": "string",
            "title": "Prompt Ver",
            "default": ""
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "facts_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Facts Kind"
          },
          "facts": {
            "items": {
              "$ref": "#/components/schemas/Fact"
            },
            "type": "array",
            "title": "Facts",
            "default": []
          },
          "facts_missing": {
            "type": "boolean",
            "title": "Facts Missing",
            "default": false
          },
          "fix": {
            "type": "string",
            "title": "Fix",
            "default": ""
          },
          "fix_lang": {
            "type": "string",
            "title": "Fix Lang",
            "default": ""
          }
        },
        "type": "object",
        "title": "Evidence"
      },
      "Example": {
        "properties": {
          "text": {
            "type": "string",
            "title": "Text"
          },
          "answer": {
            "type": "integer",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Answer"
          },
          "source": {
            "type": "string",
            "title": "Source",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "text",
          "answer"
        ],
        "title": "Example"
      },
      "Fact": {
        "properties": {
          "kind": {
            "type": "string",
            "title": "Kind"
          },
          "anchor": {
            "type": "string",
            "title": "Anchor",
            "default": ""
          },
          "href": {
            "type": "string",
            "title": "Href",
            "default": ""
          },
          "rel": {
            "type": "string",
            "title": "Rel",
            "default": ""
          },
          "external": {
            "type": "boolean",
            "title": "External",
            "default": false
          },
          "in_content": {
            "type": "boolean",
            "title": "In Content",
            "default": false
          },
          "qualified": {
            "type": "boolean",
            "title": "Qualified",
            "default": false
          },
          "text": {
            "type": "string",
            "title": "Text",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "kind"
        ],
        "title": "Fact",
        "description": "Element strony wyciągnięty kodem z `Document` (#482), bez modelu: link, ukryty fragment, sygnał skryptu."
      },
      "FeedbackCreate": {
        "properties": {
          "rule_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Rule Id",
            "description": "None = report-level problem"
          },
          "label": {
            "$ref": "#/components/schemas/FeedbackLabel"
          },
          "comment": {
            "type": "string",
            "maxLength": 4000,
            "title": "Comment",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "label"
        ],
        "title": "FeedbackCreate",
        "description": "Wejście z panelu/API. Kontekst (wersje, score_raw, projekt) serwer bierze z zapisanego raportu."
      },
      "FeedbackLabel": {
        "type": "string",
        "enum": [
          "false_positive",
          "false_negative",
          "unclear",
          "problem"
        ],
        "title": "FeedbackLabel"
      },
      "FeedbackRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "report_id": {
            "type": "string",
            "title": "Report Id"
          },
          "rule_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rule Id"
          },
          "rule_ver": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rule Ver"
          },
          "prompt_ver": {
            "type": "string",
            "title": "Prompt Ver"
          },
          "score_raw": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score Raw"
          },
          "submitted_by": {
            "type": "string",
            "title": "Submitted By"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "label": {
            "$ref": "#/components/schemas/FeedbackLabel"
          },
          "comment": {
            "type": "string",
            "title": "Comment"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "report_id",
          "rule_id",
          "rule_ver",
          "prompt_ver",
          "score_raw",
          "submitted_by",
          "project_id",
          "label",
          "comment",
          "created_at"
        ],
        "title": "FeedbackRead"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "IngestInput": {
        "properties": {
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "html": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Html"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "render_js": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "off",
                  "on",
                  "auto"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Render Js",
            "description": "Render JavaScript (#201): true = always (+ render_js price, USD), false = never, auto = only after a block/empty shell (surcharge only when rendered); empty = project setting"
          }
        },
        "type": "object",
        "title": "IngestInput",
        "description": "`url` po przyjęciu jest znormalizowany (#137): bez #fragmentu i parametrów śledzących/sekretnych.\nOryginał (bez fragmentu) żyje tylko w `fetch_url` (atrybut prywatny: nie wchodzi do `model_dump`,\nwięc nie trafia do bazy, kolejki zadań ani logów). Zadania z kolejki pobierają adres znormalizowany."
      },
      "IntentBatchAccepted": {
        "properties": {
          "batch_id": {
            "type": "string",
            "title": "Batch Id"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/IntentSummary"
            },
            "type": "array",
            "title": "Items"
          },
          "skipped": {
            "type": "integer",
            "title": "Skipped",
            "default": 0
          },
          "price_usd": {
            "type": "number",
            "title": "Price Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "batch_id",
          "items",
          "price_usd"
        ],
        "title": "IntentBatchAccepted"
      },
      "IntentBatchRequest": {
        "properties": {
          "tier": {
            "type": "string",
            "enum": [
              "basic",
              "premium",
              "compare"
            ],
            "title": "Tier",
            "description": "basic (available), premium, compare (coming soon); legacy `lite` = basic, `full` = premium",
            "default": "basic"
          },
          "freshness": {
            "type": "string",
            "enum": [
              "auto",
              "fresh"
            ],
            "title": "Freshness",
            "description": "auto: reuse search results not older than `max_age_days` (cheaper); fresh: always fetch new results (full price)",
            "default": "auto"
          },
          "max_age_days": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 7.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Age Days",
            "description": "Oldest results reused with freshness=auto (default 3 days)"
          },
          "report_lang": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "en",
                  "pl"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Lang",
            "description": "Report language (#479): en | pl; exports and share link. Empty = Accept-Language, else en"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/IntentItem"
            },
            "type": "array",
            "minItems": 1,
            "title": "Items",
            "description": "Phrases; duplicates (phrase + market + device) run once"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "IntentBatchRequest"
      },
      "IntentItem": {
        "properties": {
          "market": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Market",
            "description": "language-COUNTRY, e.g. en-US, pl-PL",
            "default": "en-US"
          },
          "location_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location Code",
            "description": "Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market`"
          },
          "language_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Language Code",
            "description": "language_code from the supported markets list, e.g. pl; overrides the language of `market`"
          },
          "query": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Query",
            "description": "Search phrase"
          },
          "device": {
            "type": "string",
            "enum": [
              "desktop",
              "mobile"
            ],
            "title": "Device",
            "default": "desktop"
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "IntentItem",
        "description": "Fraza + rynek: `market` (`en-US`) albo `location_code` + `language_code` z listy rynków (#315)."
      },
      "IntentRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "done",
              "failed"
            ],
            "title": "Status"
          },
          "query": {
            "type": "string",
            "title": "Query"
          },
          "market": {
            "type": "string",
            "title": "Market"
          },
          "device": {
            "type": "string",
            "title": "Device",
            "default": "desktop"
          },
          "tier": {
            "type": "string",
            "enum": [
              "basic",
              "premium",
              "compare"
            ],
            "title": "Tier",
            "default": "basic"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "batch_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Batch Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "cache": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache"
          },
          "dominant_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dominant Title"
          },
          "dominant_share": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dominant Share"
          },
          "snapshot_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot At"
          },
          "report_lang": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Lang"
          },
          "report": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IntentReport"
              },
              {
                "type": "null"
              }
            ]
          },
          "price_usd": {
            "type": "number",
            "title": "Price Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "query",
          "market",
          "created_at",
          "price_usd"
        ],
        "title": "IntentRead"
      },
      "IntentReport": {
        "properties": {
          "query": {
            "type": "string",
            "title": "Query"
          },
          "market": {
            "type": "string",
            "title": "Market"
          },
          "device": {
            "type": "string",
            "title": "Device",
            "default": "desktop"
          },
          "snapshot_at": {
            "type": "string",
            "title": "Snapshot At"
          },
          "results_total": {
            "type": "integer",
            "title": "Results Total",
            "default": 0
          },
          "intents": {
            "items": {
              "$ref": "#/components/schemas/IntentRow"
            },
            "type": "array",
            "title": "Intents",
            "default": []
          },
          "dominant_intent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dominant Intent Id"
          },
          "dominant_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dominant Title"
          },
          "dominant_share": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dominant Share"
          },
          "recommended_form": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recommended Form"
          },
          "expected_genre": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Genre"
          },
          "article_fits": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Article Fits"
          },
          "article_fits_reason": {
            "type": "string",
            "title": "Article Fits Reason",
            "default": ""
          },
          "length_words": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Length Words"
          },
          "length_sample": {
            "type": "integer",
            "title": "Length Sample",
            "default": 0
          },
          "elements": {
            "items": {
              "$ref": "#/components/schemas/ElementShare"
            },
            "type": "array",
            "title": "Elements",
            "default": []
          },
          "useful_elements": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Useful Elements",
            "default": []
          },
          "reader_questions": {
            "items": {
              "$ref": "#/components/schemas/Question"
            },
            "type": "array",
            "title": "Reader Questions",
            "default": []
          },
          "heading_themes": {
            "items": {
              "$ref": "#/components/schemas/Question"
            },
            "type": "array",
            "title": "Heading Themes",
            "default": []
          },
          "related_searches": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Related Searches",
            "default": []
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings",
            "default": []
          },
          "summary": {
            "type": "string",
            "title": "Summary",
            "default": ""
          },
          "labeler_version": {
            "type": "string",
            "title": "Labeler Version",
            "default": ""
          }
        },
        "type": "object",
        "required": [
          "query",
          "market",
          "snapshot_at"
        ],
        "title": "IntentReport",
        "description": "Raport intencji jednej frazy. `snapshot_at` = data zrzutu wyników wyszukiwania (bez nazwy dostawcy)."
      },
      "IntentRequest": {
        "properties": {
          "market": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Market",
            "description": "language-COUNTRY, e.g. en-US, pl-PL",
            "default": "en-US"
          },
          "location_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location Code",
            "description": "Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market`"
          },
          "language_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Language Code",
            "description": "language_code from the supported markets list, e.g. pl; overrides the language of `market`"
          },
          "query": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Query",
            "description": "Search phrase"
          },
          "device": {
            "type": "string",
            "enum": [
              "desktop",
              "mobile"
            ],
            "title": "Device",
            "default": "desktop"
          },
          "tier": {
            "type": "string",
            "enum": [
              "basic",
              "premium",
              "compare"
            ],
            "title": "Tier",
            "description": "basic (available), premium, compare (coming soon); legacy `lite` = basic, `full` = premium",
            "default": "basic"
          },
          "freshness": {
            "type": "string",
            "enum": [
              "auto",
              "fresh"
            ],
            "title": "Freshness",
            "description": "auto: reuse search results not older than `max_age_days` (cheaper); fresh: always fetch new results (full price)",
            "default": "auto"
          },
          "max_age_days": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 7.0,
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Age Days",
            "description": "Oldest results reused with freshness=auto (default 3 days)"
          },
          "report_lang": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "en",
                  "pl"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Lang",
            "description": "Report language (#479): en | pl; exports and share link. Empty = Accept-Language, else en"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id",
            "description": "Project public id (prj_…); default project when omitted"
          },
          "compare_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Compare Url",
            "description": "Your page, only with tier=compare (coming soon)"
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "IntentRequest"
      },
      "IntentRow": {
        "properties": {
          "intent_id": {
            "type": "string",
            "title": "Intent Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "form": {
            "type": "string",
            "title": "Form",
            "default": ""
          },
          "answer_share": {
            "type": "number",
            "title": "Answer Share",
            "default": 0.0
          },
          "coverage": {
            "type": "number",
            "title": "Coverage",
            "default": 0.0
          },
          "traffic_share": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Traffic Share"
          },
          "best_rank": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Best Rank"
          }
        },
        "type": "object",
        "required": [
          "intent_id",
          "title"
        ],
        "title": "IntentRow"
      },
      "IntentSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "done",
              "failed"
            ],
            "title": "Status"
          },
          "query": {
            "type": "string",
            "title": "Query"
          },
          "market": {
            "type": "string",
            "title": "Market"
          },
          "device": {
            "type": "string",
            "title": "Device",
            "default": "desktop"
          },
          "tier": {
            "type": "string",
            "enum": [
              "basic",
              "premium",
              "compare"
            ],
            "title": "Tier",
            "default": "basic"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "batch_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Batch Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "cache": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cache"
          },
          "dominant_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dominant Title"
          },
          "dominant_share": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dominant Share"
          },
          "snapshot_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snapshot At"
          },
          "report_lang": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Lang"
          },
          "price_usd": {
            "type": "number",
            "title": "Price Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "status",
          "query",
          "market",
          "created_at",
          "price_usd"
        ],
        "title": "IntentSummary",
        "description": "Wiersz historii. Kwota wewnętrznie w jednostkach $0.0001, na zewnątrz `price_usd`."
      },
      "IntentTier": {
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "basic",
              "premium",
              "compare"
            ],
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "name_pl": {
            "type": "string",
            "title": "Name Pl",
            "default": ""
          },
          "label": {
            "type": "string",
            "title": "Label",
            "default": ""
          },
          "summary": {
            "type": "string",
            "title": "Summary",
            "default": ""
          },
          "summary_pl": {
            "type": "string",
            "title": "Summary Pl",
            "default": ""
          },
          "includes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Includes",
            "default": []
          },
          "available": {
            "type": "boolean",
            "title": "Available",
            "default": true
          },
          "price_usd": {
            "type": "number",
            "title": "Price Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "price_usd"
        ],
        "title": "IntentTier",
        "description": "Poziom narzędzia Intent (#190) — tylko dane; cena z pozycji cennika `pricing_item` (#221), na zewnątrz `price_usd`."
      },
      "InviteCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "role": {
            "type": "string",
            "const": "user",
            "title": "Role",
            "default": "user"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id",
            "description": "Existing project (public id, prj_…) the tester joins as member; None = own default project"
          },
          "send_email": {
            "type": "boolean",
            "title": "Send Email",
            "default": true
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "InviteCreate"
      },
      "InviteCreated": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          },
          "used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Used At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "status": {
            "$ref": "#/components/schemas/InviteStatus"
          },
          "link": {
            "type": "string",
            "title": "Link"
          },
          "emailed": {
            "type": "boolean",
            "title": "Emailed",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "role",
          "project_id",
          "created_at",
          "expires_at",
          "status",
          "link"
        ],
        "title": "InviteCreated",
        "description": "Odpowiedź na utworzenie: `link` pokazujemy raz (w bazie tylko SHA-256 tokenu); `emailed` = wysłano SMTP."
      },
      "InviteRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          },
          "used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Used At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "status": {
            "$ref": "#/components/schemas/InviteStatus"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "role",
          "project_id",
          "created_at",
          "expires_at",
          "status"
        ],
        "title": "InviteRead"
      },
      "InviteStatus": {
        "type": "string",
        "enum": [
          "pending",
          "used",
          "expired",
          "revoked"
        ],
        "title": "InviteStatus"
      },
      "JobAccepted": {
        "properties": {
          "job_id": {
            "type": "string",
            "title": "Job Id"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          }
        },
        "type": "object",
        "required": [
          "job_id",
          "status"
        ],
        "title": "JobAccepted"
      },
      "JobCreate": {
        "properties": {
          "modes": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Category"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modes",
            "description": "Audit modes (#334): spam (Google spam policies), quality (page quality), helpful (helpful content). Narrows `rules` (or the whole catalogue); empty or all three = no narrowing."
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/IngestInput"
            },
            "type": "array",
            "minItems": 1,
            "title": "Items"
          },
          "targets": {
            "anyOf": [
              {
                "additionalProperties": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Targets"
          },
          "rules": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rules"
          },
          "explain": {
            "type": "boolean",
            "title": "Explain",
            "default": false
          },
          "webhook_url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "uri"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Url",
            "description": "POST na zakończenie, podpis HMAC-SHA256"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "report_lang": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "en",
                  "pl"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Lang",
            "description": "Report language (#479): en | pl; titles, what to do, exports and share link. Empty = Accept-Language, else en"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "JobCreate"
      },
      "JobItemResult": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index"
          },
          "report_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Id"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "rendered": {
            "type": "boolean",
            "title": "Rendered",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "index"
        ],
        "title": "JobItemResult"
      },
      "JobRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "created_by": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created By"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "done": {
            "type": "integer",
            "title": "Done",
            "description": "Pozycje przetworzone (z błędem i bez)"
          },
          "failed": {
            "type": "integer",
            "title": "Failed"
          },
          "report_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Report Ids"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/JobItemResult"
            },
            "type": "array",
            "title": "Errors"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "webhook_status": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Webhook Status"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "project_id",
          "status",
          "total",
          "done",
          "failed",
          "report_ids",
          "errors",
          "created_at"
        ],
        "title": "JobRead"
      },
      "JobResultItem": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index"
          },
          "report_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Id"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "rendered": {
            "type": "boolean",
            "title": "Rendered",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "index"
        ],
        "title": "JobResultItem",
        "description": "Pozycja w GET /v1/jobs/{id}/results (pełny raport: GET /v1/reports/{report_id})."
      },
      "JobStatus": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "done",
          "failed"
        ],
        "title": "JobStatus"
      },
      "JudgeReport": {
        "properties": {
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "profile": {
            "$ref": "#/components/schemas/ProfileInfo"
          },
          "extraction_ok": {
            "type": "boolean",
            "title": "Extraction Ok"
          },
          "truncated": {
            "type": "boolean",
            "title": "Truncated"
          },
          "violations": {
            "items": {
              "$ref": "#/components/schemas/RuleScore"
            },
            "type": "array",
            "title": "Violations"
          },
          "quality_signals": {
            "items": {
              "$ref": "#/components/schemas/RuleScore"
            },
            "type": "array",
            "title": "Quality Signals"
          },
          "labels": {
            "items": {
              "$ref": "#/components/schemas/RuleScore"
            },
            "type": "array",
            "title": "Labels",
            "default": []
          },
          "positives": {
            "items": {
              "$ref": "#/components/schemas/RuleScore"
            },
            "type": "array",
            "title": "Positives",
            "default": []
          },
          "choices": {
            "items": {
              "$ref": "#/components/schemas/RuleScore"
            },
            "type": "array",
            "title": "Choices",
            "default": []
          },
          "not_assessed": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "title": "Not Assessed"
          },
          "intent": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Intent"
          },
          "fetch": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fetch"
          },
          "report_lang": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Lang"
          },
          "skipped": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Skipped",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "url",
          "profile",
          "extraction_ok",
          "truncated",
          "violations",
          "quality_signals",
          "not_assessed"
        ],
        "title": "JudgeReport"
      },
      "JudgeRequest": {
        "properties": {
          "modes": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Category"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modes",
            "description": "Audit modes (#334): spam (Google spam policies), quality (page quality), helpful (helpful content). Narrows `rules` (or the whole catalogue); empty or all three = no narrowing."
          },
          "market": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Market",
            "description": "Market `language-COUNTRY`, e.g. pl-PL (default en-US)"
          },
          "location_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location Code",
            "description": "Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market`"
          },
          "language_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Language Code",
            "description": "language_code from the supported markets list, e.g. pl; overrides the language of `market`"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "html": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Html"
          },
          "text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Text"
          },
          "render_js": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "off",
                  "on",
                  "auto"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Render Js",
            "description": "Render JavaScript (#201): true = always (+ render_js price, USD), false = never, auto = only after a block/empty shell (surcharge only when rendered); empty = project setting"
          },
          "rules": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rules"
          },
          "explain": {
            "type": "boolean",
            "title": "Explain",
            "default": false
          },
          "query": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Query",
            "description": "Fraza docelowa (#174): intencja SERP-u, Needs Met; brak = reguły intencji not_assessed"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "report_lang": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "en",
                  "pl"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Lang",
            "description": "Report language (#479): en | pl; titles, what to do, exports and share link. Empty = Accept-Language, else en"
          }
        },
        "type": "object",
        "title": "JudgeRequest"
      },
      "Kind": {
        "type": "string",
        "enum": [
          "violation",
          "info",
          "positive"
        ],
        "title": "Kind",
        "description": "Znaczenie odpowiedzi 1 (ADR 0010) — decyduje o polaryzacji promptu i kolorze w raporcie."
      },
      "Layer": {
        "type": "string",
        "enum": [
          "spam",
          "quality",
          "context"
        ],
        "title": "Layer"
      },
      "LeadAccepted": {
        "properties": {
          "ok": {
            "type": "boolean",
            "title": "Ok",
            "default": true
          }
        },
        "type": "object",
        "title": "LeadAccepted"
      },
      "LeadCreate": {
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "beta",
              "sales"
            ],
            "title": "Type"
          },
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "company": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Company"
          },
          "message": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "website": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "role": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "owner",
                  "agency",
                  "publisher",
                  "links",
                  "investor",
                  "inhouse",
                  "other"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "locale": {
            "type": "string",
            "enum": [
              "en",
              "pl"
            ],
            "title": "Locale",
            "default": "en"
          },
          "consent": {
            "type": "boolean",
            "title": "Consent",
            "description": "Zgoda na przechowanie e-maila (polityka prywatności); musi być true"
          },
          "hp": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Hp"
          }
        },
        "type": "object",
        "required": [
          "type",
          "email",
          "consent"
        ],
        "title": "LeadCreate",
        "description": "Wejście formularza. `hp` = honeypot (pole ukryte dla ludzi): niepuste = bot, odpowiedź 202 bez zapisu."
      },
      "LeakAccepted": {
        "properties": {
          "received": {
            "type": "integer",
            "title": "Received"
          }
        },
        "type": "object",
        "required": [
          "received"
        ],
        "title": "LeakAccepted",
        "description": "Zawsze ta sama odpowiedź (bez zdradzania, czy klucz istniał)."
      },
      "LeakReport": {
        "properties": {
          "keys": {
            "items": {
              "type": "string",
              "maxLength": 128
            },
            "type": "array",
            "maxItems": 100,
            "minItems": 1,
            "title": "Keys"
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Url"
          }
        },
        "type": "object",
        "required": [
          "keys"
        ],
        "title": "LeakReport",
        "description": "Zgłoszenie opublikowanych kluczy (skaner sekretów, badacz). Dopasowane klucze są natychmiast odwoływane."
      },
      "LevelCount": {
        "properties": {
          "label": {
            "type": "string",
            "title": "Label"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "label",
          "count"
        ],
        "title": "LevelCount"
      },
      "MemberAdd": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/ProjectRole",
            "default": "member"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "MemberAdd"
      },
      "MemberRead": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/ProjectRole"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "role"
        ],
        "title": "MemberRead"
      },
      "NoticeLevel": {
        "type": "string",
        "enum": [
          "info",
          "warning",
          "outage"
        ],
        "title": "NoticeLevel"
      },
      "Option": {
        "properties": {
          "letter": {
            "type": "string",
            "pattern": "^[A-Z]$",
            "title": "Letter"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "anchor": {
            "type": "string",
            "title": "Anchor"
          },
          "source": {
            "type": "string",
            "title": "Source",
            "default": ""
          },
          "concern": {
            "type": "boolean",
            "title": "Concern",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "letter",
          "label",
          "anchor"
        ],
        "title": "Option",
        "description": "Opcja reguły choice: litera (jeden token) -> etykieta + kotwica z SQRG (sekcja i strona)."
      },
      "OrgCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "OrgCreate"
      },
      "OrgMemberAdd": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/OrgRole",
            "default": "member"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "OrgMemberAdd"
      },
      "OrgMemberRead": {
        "properties": {
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "role": {
            "$ref": "#/components/schemas/OrgRole"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "role"
        ],
        "title": "OrgMemberRead"
      },
      "OrgMemberUpdate": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/OrgRole"
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "OrgMemberUpdate"
      },
      "OrgRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "slug": {
            "type": "string",
            "title": "Slug"
          },
          "status": {
            "$ref": "#/components/schemas/OrgStatus"
          },
          "plan": {
            "type": "string",
            "title": "Plan"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "my_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OrgRole"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "status",
          "plan",
          "created_at"
        ],
        "title": "OrgRead"
      },
      "OrgRole": {
        "type": "string",
        "enum": [
          "owner",
          "admin",
          "member",
          "viewer"
        ],
        "title": "OrgRole"
      },
      "OrgStatus": {
        "type": "string",
        "enum": [
          "active",
          "suspended",
          "closed"
        ],
        "title": "OrgStatus"
      },
      "OwnerType": {
        "type": "string",
        "enum": [
          "project",
          "user",
          "org"
        ],
        "title": "OwnerType",
        "description": "Właściciel klucza (ADR 0022 pkt 9). Dostęp = zakresy klucza ∩ bieżące uprawnienia właściciela."
      },
      "PageFindings": {
        "properties": {
          "report_id": {
            "type": "string",
            "title": "Report Id"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pattern"
          },
          "level": {
            "type": "string",
            "title": "Level"
          },
          "quality_level": {
            "type": "string",
            "title": "Quality Level"
          },
          "helpful_level": {
            "type": "string",
            "title": "Helpful Level",
            "default": "unknown"
          },
          "top_rule": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Rule"
          },
          "top_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Score"
          },
          "spam": {
            "items": {
              "$ref": "#/components/schemas/RuleView"
            },
            "type": "array",
            "title": "Spam",
            "default": []
          },
          "quality": {
            "items": {
              "$ref": "#/components/schemas/RuleView"
            },
            "type": "array",
            "title": "Quality",
            "default": []
          },
          "helpful": {
            "items": {
              "$ref": "#/components/schemas/RuleView"
            },
            "type": "array",
            "title": "Helpful",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "report_id",
          "url",
          "level",
          "quality_level"
        ],
        "title": "PageFindings",
        "description": "Strona z potencjalnymi naruszeniami (#147): tylko reguły >= MEDIUM, z opisem reguły i dowodami."
      },
      "PageItem": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "html": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Html"
          },
          "query": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Query",
            "description": "Fraza docelowa strony (#174, kolumna CSV `query`)"
          },
          "market": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Market",
            "description": "Rynek frazy, np. pl-PL (kolumna `market`, lista rynków #315)"
          },
          "render_js": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "off",
                  "on",
                  "auto"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Render Js",
            "description": "Render JS strony (#201, kolumna CSV `render_js`: true/false/auto); brak = tryb audytu"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "PageItem",
        "description": "Pozycja importu (#119): `html` podany = ocena z tego HTML bez pobierania; brak = pobranie przez ingest."
      },
      "PageRisk": {
        "properties": {
          "report_id": {
            "type": "string",
            "title": "Report Id"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pattern"
          },
          "level": {
            "type": "string",
            "title": "Level"
          },
          "quality_level": {
            "type": "string",
            "title": "Quality Level"
          },
          "helpful_level": {
            "type": "string",
            "title": "Helpful Level",
            "default": "unknown"
          },
          "top_rule": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Rule"
          },
          "top_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Score"
          }
        },
        "type": "object",
        "required": [
          "report_id",
          "url",
          "level",
          "quality_level"
        ],
        "title": "PageRisk"
      },
      "PageTierPrice": {
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "lite",
              "basic",
              "premium"
            ],
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "name_pl": {
            "type": "string",
            "title": "Name Pl"
          },
          "rules": {
            "type": "string",
            "enum": [
              "quick",
              "binary",
              "all"
            ],
            "title": "Rules"
          },
          "steps": {
            "items": {
              "type": "string",
              "const": "evidence"
            },
            "type": "array",
            "title": "Steps",
            "default": []
          },
          "extra": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Extra"
          },
          "summary": {
            "type": "string",
            "title": "Summary",
            "default": ""
          },
          "summary_pl": {
            "type": "string",
            "title": "Summary Pl",
            "default": ""
          },
          "price_usd": {
            "type": "number",
            "title": "Price Usd"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "name_pl",
          "rules",
          "price_usd"
        ],
        "title": "PageTierPrice"
      },
      "PatternPreview": {
        "properties": {
          "pattern": {
            "type": "string",
            "title": "Pattern"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          },
          "lastmod_min": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastmod Min"
          },
          "lastmod_max": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastmod Max"
          },
          "samples": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Samples"
          }
        },
        "type": "object",
        "required": [
          "pattern",
          "count",
          "samples"
        ],
        "title": "PatternPreview"
      },
      "PatternRisk": {
        "properties": {
          "pattern": {
            "type": "string",
            "title": "Pattern"
          },
          "in_sitemap": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "In Sitemap"
          },
          "sampled": {
            "type": "integer",
            "title": "Sampled",
            "default": 0
          },
          "flagged": {
            "type": "integer",
            "title": "Flagged"
          },
          "level": {
            "type": "string",
            "title": "Level"
          },
          "top_rule": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Rule"
          },
          "top_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Score"
          }
        },
        "type": "object",
        "required": [
          "pattern",
          "flagged",
          "level"
        ],
        "title": "PatternRisk"
      },
      "PatternScale": {
        "properties": {
          "pattern": {
            "type": "string",
            "title": "Pattern"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          },
          "bars": {
            "items": {
              "$ref": "#/components/schemas/ChoiceBar"
            },
            "type": "array",
            "title": "Bars"
          },
          "modal_label": {
            "type": "string",
            "title": "Modal Label"
          },
          "concern_pages": {
            "type": "integer",
            "title": "Concern Pages"
          }
        },
        "type": "object",
        "required": [
          "pattern",
          "pages",
          "bars",
          "modal_label",
          "concern_pages"
        ],
        "title": "PatternScale",
        "description": "Page Quality per wzorzec URL (#157)."
      },
      "PatternStat": {
        "properties": {
          "pattern": {
            "type": "string",
            "title": "Pattern"
          },
          "in_sitemap": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "In Sitemap"
          },
          "sampled": {
            "type": "integer",
            "title": "Sampled",
            "default": 0
          }
        },
        "type": "object",
        "required": [
          "pattern"
        ],
        "title": "PatternStat"
      },
      "Plan": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "price_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Price Usd"
          },
          "payg": {
            "type": "boolean",
            "title": "Payg",
            "default": false
          },
          "projects_max": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Projects Max"
          },
          "seats_max": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seats Max"
          },
          "api_keys_max": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Keys Max"
          },
          "audit_pages_max": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Audit Pages Max"
          },
          "limit_month_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Month Usd",
            "description": "Miesięczna pula planu w USD; None = bez limitu.",
            "readOnly": true
          },
          "limit_day_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Day Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "limit_month_usd",
          "limit_day_usd"
        ],
        "title": "Plan",
        "description": "Plan z `plans.yaml` (ADR 0023 pkt 4). Limity niestronicowe: None = bez limitu. Egzekwowanie poza pulą — osobne issue."
      },
      "PolicyRisk": {
        "properties": {
          "policy": {
            "type": "string",
            "title": "Policy"
          },
          "layer": {
            "type": "string",
            "title": "Layer"
          },
          "category": {
            "type": "string",
            "title": "Category",
            "default": ""
          },
          "pages_flagged": {
            "type": "integer",
            "title": "Pages Flagged"
          },
          "pages_scored": {
            "type": "integer",
            "title": "Pages Scored"
          },
          "share": {
            "type": "number",
            "title": "Share"
          },
          "max_score": {
            "type": "number",
            "title": "Max Score"
          }
        },
        "type": "object",
        "required": [
          "policy",
          "layer",
          "pages_flagged",
          "pages_scored",
          "share",
          "max_score"
        ],
        "title": "PolicyRisk"
      },
      "ProfileInfo": {
        "properties": {
          "prompt_ver": {
            "type": "string",
            "title": "Prompt Ver"
          },
          "calibrated": {
            "type": "boolean",
            "title": "Calibrated"
          }
        },
        "type": "object",
        "required": [
          "prompt_ver",
          "calibrated"
        ],
        "title": "ProfileInfo"
      },
      "ProjectCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Name"
          },
          "restricted": {
            "type": "boolean",
            "title": "Restricted",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ProjectCreate"
      },
      "ProjectRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "owner_id": {
            "type": "string",
            "format": "uuid",
            "title": "Owner Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "restricted": {
            "type": "boolean",
            "title": "Restricted",
            "default": false
          },
          "private_mode": {
            "type": "boolean",
            "title": "Private Mode",
            "default": false
          },
          "render_js_default": {
            "type": "string",
            "enum": [
              "off",
              "on",
              "auto"
            ],
            "title": "Render Js Default",
            "default": "off"
          },
          "my_role": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProjectRole"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "owner_id",
          "created_at"
        ],
        "title": "ProjectRead"
      },
      "ProjectRole": {
        "type": "string",
        "enum": [
          "owner",
          "member"
        ],
        "title": "ProjectRole"
      },
      "ProjectUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "restricted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Restricted"
          },
          "private_mode": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Private Mode",
            "description": "Tryb prywatny (#137): raporty bez URL (host + url_hash), treść stron z zadań usuwana zaraz po ocenie"
          },
          "render_js_default": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "off",
                  "on",
                  "auto"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Render Js Default",
            "description": "Default JavaScript rendering (#201): off | on (+ render_js price per page, USD) | auto (render after a block/empty shell, surcharge only when rendered)"
          }
        },
        "type": "object",
        "title": "ProjectUpdate"
      },
      "PublicNotice": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "level": {
            "$ref": "#/components/schemas/NoticeLevel"
          },
          "text": {
            "type": "string",
            "title": "Text"
          },
          "scope": {
            "type": "string",
            "title": "Scope"
          },
          "dismissible": {
            "type": "boolean",
            "title": "Dismissible"
          },
          "starts_at": {
            "type": "string",
            "format": "date-time",
            "title": "Starts At"
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "level",
          "text",
          "scope",
          "dismissible",
          "starts_at"
        ],
        "title": "PublicNotice"
      },
      "PublicStatus": {
        "properties": {
          "level": {
            "$ref": "#/components/schemas/StatusLevel"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "eta_s": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Eta S"
          },
          "notices": {
            "items": {
              "$ref": "#/components/schemas/PublicNotice"
            },
            "type": "array",
            "title": "Notices",
            "default": []
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "level",
          "label",
          "message"
        ],
        "title": "PublicStatus",
        "description": "`GET /v1/status` i kontrolka w panelu. Bez dostawców, modeli i GPU."
      },
      "Question": {
        "properties": {
          "question": {
            "type": "string",
            "title": "Question"
          },
          "coverage": {
            "type": "number",
            "title": "Coverage",
            "default": 0.0
          }
        },
        "type": "object",
        "required": [
          "question"
        ],
        "title": "Question",
        "description": "Pytanie czytelnika albo temat nagłówków: tekst od modelu, `coverage` = udział wyników (kod)."
      },
      "Quote": {
        "properties": {
          "text": {
            "type": "string",
            "title": "Text"
          },
          "verified": {
            "type": "boolean",
            "title": "Verified"
          }
        },
        "type": "object",
        "required": [
          "text",
          "verified"
        ],
        "title": "Quote"
      },
      "QuoteView": {
        "properties": {
          "text": {
            "type": "string",
            "title": "Text"
          },
          "verified": {
            "type": "boolean",
            "title": "Verified"
          }
        },
        "type": "object",
        "required": [
          "text",
          "verified"
        ],
        "title": "QuoteView"
      },
      "RegisterAccepted": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "confirmed"
            ],
            "title": "Status",
            "default": "pending"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "RegisterAccepted",
        "description": "POST /v1/auth/register (#400): zawsze 202 i ta sama treść - nie zdradza, czy e-mail ma konto.\nPOST /v1/auth/confirm zwraca ten sam kształt ze `status=\"confirmed\"`."
      },
      "ReportSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Host"
          },
          "url_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url Hash"
          },
          "prompt_ver": {
            "type": "string",
            "title": "Prompt Ver"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "url",
          "prompt_ver"
        ],
        "title": "ReportSummary"
      },
      "Role": {
        "type": "string",
        "enum": [
          "user",
          "admin",
          "superadmin"
        ],
        "title": "Role"
      },
      "RoleUpdate": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/Role"
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "RoleUpdate"
      },
      "Rule": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "ver": {
            "type": "integer",
            "title": "Ver",
            "default": 1
          },
          "layer": {
            "$ref": "#/components/schemas/Layer"
          },
          "kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Kind"
              },
              {
                "type": "null"
              }
            ]
          },
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Category"
              },
              {
                "type": "null"
              }
            ]
          },
          "policy": {
            "type": "string",
            "title": "Policy"
          },
          "aliases": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Aliases",
            "default": []
          },
          "detectability": {
            "$ref": "#/components/schemas/Detectability"
          },
          "sources": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Sources"
          },
          "definition": {
            "type": "string",
            "title": "Definition"
          },
          "question": {
            "type": "string",
            "title": "Question"
          },
          "answer_0_if": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Answer 0 If",
            "default": []
          },
          "examples": {
            "items": {
              "$ref": "#/components/schemas/Example"
            },
            "type": "array",
            "title": "Examples",
            "default": []
          },
          "enabled": {
            "type": "boolean",
            "title": "Enabled",
            "default": true
          },
          "answer_type": {
            "$ref": "#/components/schemas/AnswerType",
            "default": "binary"
          },
          "options": {
            "items": {
              "$ref": "#/components/schemas/Option"
            },
            "type": "array",
            "title": "Options",
            "default": []
          },
          "context": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Context"
          },
          "ordered": {
            "type": "boolean",
            "title": "Ordered",
            "default": true
          },
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 60
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          },
          "title_pl": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 60
              },
              {
                "type": "null"
              }
            ],
            "title": "Title Pl"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "summary_pl": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary Pl"
          },
          "why": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ],
            "title": "Why"
          },
          "why_pl": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ],
            "title": "Why Pl"
          },
          "fix": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ],
            "title": "Fix"
          },
          "fix_pl": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 400
              },
              {
                "type": "null"
              }
            ],
            "title": "Fix Pl"
          }
        },
        "type": "object",
        "required": [
          "id",
          "layer",
          "policy",
          "detectability",
          "sources",
          "definition",
          "question"
        ],
        "title": "Rule"
      },
      "RuleBrief": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "title_pl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title Pl"
          },
          "layer": {
            "type": "string",
            "title": "Layer"
          },
          "mode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mode"
          }
        },
        "type": "object",
        "required": [
          "id",
          "title",
          "layer"
        ],
        "title": "RuleBrief",
        "description": "Skrót reguły dla zwykłego użytkownika/klucza (#386): do wyboru reguł, bez pytań, kryteriów i przykładów."
      },
      "RuleScore": {
        "properties": {
          "rule_id": {
            "type": "string",
            "title": "Rule Id"
          },
          "rule_ver": {
            "type": "integer",
            "title": "Rule Ver"
          },
          "layer": {
            "type": "string",
            "title": "Layer"
          },
          "kind": {
            "type": "string",
            "title": "Kind",
            "default": "violation"
          },
          "policy": {
            "type": "string",
            "title": "Policy"
          },
          "detectability": {
            "type": "string",
            "title": "Detectability"
          },
          "ok": {
            "type": "boolean",
            "title": "Ok",
            "default": true
          },
          "score_raw": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Score Raw"
          },
          "z": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Z"
          },
          "coverage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coverage"
          },
          "top1_other": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top1 Other"
          },
          "probability": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Probability"
          },
          "justification": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Justification"
          },
          "contradiction": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contradiction"
          },
          "evidence": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Evidence"
              },
              {
                "type": "null"
              }
            ]
          },
          "unsupported": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unsupported"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "answer_type": {
            "type": "string",
            "title": "Answer Type",
            "default": "binary"
          },
          "distribution": {
            "anyOf": [
              {
                "additionalProperties": {
                  "type": "number"
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Distribution"
          },
          "modal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modal"
          },
          "expected": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected"
          },
          "entropy": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entropy"
          },
          "samples": {
            "anyOf": [
              {
                "items": {
                  "type": "number"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Samples"
          },
          "spread": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Spread"
          },
          "prompt_sha": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prompt Sha"
          }
        },
        "type": "object",
        "required": [
          "rule_id",
          "rule_ver",
          "layer",
          "policy",
          "detectability"
        ],
        "title": "RuleScore"
      },
      "RuleView": {
        "properties": {
          "rule_id": {
            "type": "string",
            "title": "Rule Id"
          },
          "policy": {
            "type": "string",
            "title": "Policy"
          },
          "detectability": {
            "type": "string",
            "title": "Detectability"
          },
          "ok": {
            "type": "boolean",
            "title": "Ok"
          },
          "score_text": {
            "type": "string",
            "title": "Score Text"
          },
          "bar_pct": {
            "type": "integer",
            "title": "Bar Pct"
          },
          "coverage_text": {
            "type": "string",
            "title": "Coverage Text"
          },
          "low_coverage": {
            "type": "boolean",
            "title": "Low Coverage"
          },
          "justification": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Justification"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "quotes": {
            "items": {
              "$ref": "#/components/schemas/QuoteView"
            },
            "type": "array",
            "title": "Quotes",
            "default": []
          },
          "description": {
            "type": "string",
            "title": "Description",
            "default": ""
          },
          "title": {
            "type": "string",
            "title": "Title",
            "default": ""
          },
          "summary": {
            "type": "string",
            "title": "Summary",
            "default": ""
          },
          "why": {
            "type": "string",
            "title": "Why",
            "default": ""
          },
          "fix": {
            "type": "string",
            "title": "Fix",
            "default": ""
          },
          "level": {
            "type": "string",
            "title": "Level",
            "default": ""
          },
          "level_label": {
            "type": "string",
            "title": "Level Label",
            "default": ""
          },
          "signal": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signal"
          },
          "facts_kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Facts Kind"
          },
          "facts": {
            "items": {
              "$ref": "#/components/schemas/Fact"
            },
            "type": "array",
            "title": "Facts",
            "default": []
          },
          "facts_missing": {
            "type": "boolean",
            "title": "Facts Missing",
            "default": false
          },
          "model_fix": {
            "type": "string",
            "title": "Model Fix",
            "default": ""
          },
          "model_fix_lang": {
            "type": "string",
            "title": "Model Fix Lang",
            "default": ""
          },
          "action": {
            "type": "string",
            "title": "Action",
            "default": ""
          },
          "action_source": {
            "type": "string",
            "title": "Action Source",
            "default": ""
          },
          "evidence_state": {
            "type": "string",
            "title": "Evidence State",
            "default": "none"
          }
        },
        "type": "object",
        "required": [
          "rule_id",
          "policy",
          "detectability",
          "ok",
          "score_text",
          "bar_pct",
          "coverage_text",
          "low_coverage"
        ],
        "title": "RuleView"
      },
      "SamplePlan": {
        "properties": {
          "site": {
            "type": "string",
            "title": "Site"
          },
          "sitemaps": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Sitemaps"
          },
          "sitemap_urls": {
            "type": "integer",
            "title": "Sitemap Urls"
          },
          "seed": {
            "type": "integer",
            "title": "Seed"
          },
          "strategy": {
            "type": "string",
            "title": "Strategy"
          },
          "pages": {
            "items": {
              "$ref": "#/components/schemas/SampledPage"
            },
            "type": "array",
            "title": "Pages"
          },
          "patterns": {
            "items": {
              "$ref": "#/components/schemas/PatternStat"
            },
            "type": "array",
            "title": "Patterns"
          },
          "source": {
            "type": "string",
            "title": "Source",
            "default": "sitemap"
          },
          "scope": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/gspamjudge__features__audits__contracts__Scope"
              },
              {
                "type": "null"
              }
            ]
          },
          "selected": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Selected"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categories"
          },
          "estimate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Estimate"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "site",
          "sitemaps",
          "sitemap_urls",
          "seed",
          "strategy",
          "pages",
          "patterns"
        ],
        "title": "SamplePlan",
        "description": "Wynik odkrycia i losowania (zapisywany w audycie, `meta`)."
      },
      "SampledPage": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          },
          "pattern": {
            "type": "string",
            "title": "Pattern"
          },
          "lastmod": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lastmod"
          },
          "reason": {
            "type": "string",
            "title": "Reason"
          },
          "html": {
            "type": "boolean",
            "title": "Html",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "url",
          "pattern",
          "reason"
        ],
        "title": "SampledPage"
      },
      "ScaleAggregate": {
        "properties": {
          "rule_id": {
            "type": "string",
            "title": "Rule Id"
          },
          "policy": {
            "type": "string",
            "title": "Policy"
          },
          "kind": {
            "type": "string",
            "title": "Kind"
          },
          "pages": {
            "type": "integer",
            "title": "Pages"
          },
          "bars": {
            "items": {
              "$ref": "#/components/schemas/ChoiceBar"
            },
            "type": "array",
            "title": "Bars"
          },
          "modal_counts": {
            "items": {
              "$ref": "#/components/schemas/LevelCount"
            },
            "type": "array",
            "title": "Modal Counts"
          },
          "concern_pages": {
            "type": "integer",
            "title": "Concern Pages",
            "default": 0
          },
          "expected_label": {
            "type": "string",
            "title": "Expected Label",
            "default": ""
          },
          "weakest": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScalePage"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "rule_id",
          "policy",
          "kind",
          "pages",
          "bars",
          "modal_counts"
        ],
        "title": "ScaleAggregate",
        "description": "Reguła choice w audycie (#157): średni rozkład po stronach, liczba stron per poziom modalny, kod nie model."
      },
      "ScalePage": {
        "properties": {
          "report_id": {
            "type": "string",
            "title": "Report Id"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "label": {
            "type": "string",
            "title": "Label"
          },
          "concern": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Concern"
          }
        },
        "type": "object",
        "required": [
          "report_id",
          "url",
          "label"
        ],
        "title": "ScalePage"
      },
      "SectionCount": {
        "properties": {
          "section": {
            "type": "string",
            "title": "Section"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "section",
          "count"
        ],
        "title": "SectionCount",
        "description": "Sekcja witryny (#345): pierwszy segment ścieżki (`/blog/`) albo `/` (strona główna, pliki w katalogu głównym)."
      },
      "ShareCreate": {
        "properties": {
          "expires_in_days": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 365.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires In Days",
            "description": "Days until the link expires (default 30); null = never",
            "default": 30
          },
          "include_evidence": {
            "type": "boolean",
            "title": "Include Evidence",
            "description": "Show evidence quotes from the page (default off)",
            "default": false
          },
          "show_project_name": {
            "type": "boolean",
            "title": "Show Project Name",
            "description": "Show the project name on the public page (default off)",
            "default": false
          },
          "password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "minLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Password",
            "description": "Optional password (write-only, stored as scrypt hash); recipients must enter it"
          }
        },
        "type": "object",
        "title": "ShareCreate"
      },
      "ShareCreated": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "kind": {
            "$ref": "#/components/schemas/ShareKind"
          },
          "target_id": {
            "type": "string",
            "title": "Target Id"
          },
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "include_evidence": {
            "type": "boolean",
            "title": "Include Evidence"
          },
          "show_project_name": {
            "type": "boolean",
            "title": "Show Project Name"
          },
          "views": {
            "type": "integer",
            "title": "Views"
          },
          "last_viewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Viewed At"
          },
          "status": {
            "$ref": "#/components/schemas/ShareStatus"
          },
          "has_password": {
            "type": "boolean",
            "title": "Has Password",
            "default": false
          },
          "link": {
            "type": "string",
            "title": "Link"
          }
        },
        "type": "object",
        "required": [
          "id",
          "kind",
          "target_id",
          "project_id",
          "created_at",
          "include_evidence",
          "show_project_name",
          "views",
          "status",
          "link"
        ],
        "title": "ShareCreated",
        "description": "Odpowiedź na utworzenie: `link` pokazujemy raz (w bazie tylko SHA-256 tokenu)."
      },
      "ShareKind": {
        "type": "string",
        "enum": [
          "report",
          "audit",
          "intent"
        ],
        "title": "ShareKind"
      },
      "SharePassword": {
        "properties": {
          "password": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "minLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "password"
        ],
        "title": "SharePassword",
        "description": "PATCH /v1/share-links/{id}: ustaw/zmień hasło (`password`) albo usuń (`null`). Zmiana unieważnia odblokowania."
      },
      "ShareRead": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "kind": {
            "$ref": "#/components/schemas/ShareKind"
          },
          "target_id": {
            "type": "string",
            "title": "Target Id"
          },
          "project_id": {
            "type": "string",
            "title": "Project Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "include_evidence": {
            "type": "boolean",
            "title": "Include Evidence"
          },
          "show_project_name": {
            "type": "boolean",
            "title": "Show Project Name"
          },
          "views": {
            "type": "integer",
            "title": "Views"
          },
          "last_viewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Viewed At"
          },
          "status": {
            "$ref": "#/components/schemas/ShareStatus"
          },
          "has_password": {
            "type": "boolean",
            "title": "Has Password",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "kind",
          "target_id",
          "project_id",
          "created_at",
          "include_evidence",
          "show_project_name",
          "views",
          "status"
        ],
        "title": "ShareRead"
      },
      "ShareStatus": {
        "type": "string",
        "enum": [
          "active",
          "expired",
          "revoked"
        ],
        "title": "ShareStatus"
      },
      "SiteAuditCreate": {
        "properties": {
          "site": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site",
            "description": "Domena albo URL witryny; sitemap z robots.txt / sitemap.xml"
          },
          "sitemap_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sitemap Url",
            "description": "Bezpośredni URL sitemap (także indeksu)"
          },
          "sitemap_xml": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000000
              },
              {
                "type": "null"
              }
            ],
            "title": "Sitemap Xml",
            "description": "Wklejona treść sitemap XML (#345): urlset = lista URL-i z lastmod, sitemapindex = pobranie podrzędnych z hosta witryny"
          },
          "urls": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Urls",
            "description": "Własna lista URL-i (zamiast sitemap); maks. GSPAMJUDGE_AUDITS_UPLOAD_MAX_URLS"
          },
          "items": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PageItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Items",
            "description": "Import: url + opcjonalny html (bez pobierania); limity jak /v1/jobs"
          },
          "same_site": {
            "type": "boolean",
            "title": "Same Site",
            "description": "Lista URL-i: tylko host pierwszego URL-a (albo `site`)",
            "default": true
          },
          "distinct_slash": {
            "type": "boolean",
            "title": "Distinct Slash",
            "description": "`/a` i `/a/` jako różne URL-e (domyślnie ten sam)",
            "default": false
          },
          "preview_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preview Id",
            "description": "Id podglądu (ten sam użytkownik/klucz i projekt): bez ponownego odkrycia"
          },
          "pages": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Pages",
            "description": "Wielkość próby; maks. GSPAMJUDGE_AUDITS_MAX_PAGES",
            "default": 30
          },
          "strategy": {
            "type": "string",
            "pattern": "^(newest\\+stratified|all|newest|stratified)$",
            "title": "Strategy",
            "description": "all = wszystkie wybrane (≤ pages), newest = wg lastmod, stratified = warstwowo z seed",
            "default": "newest+stratified"
          },
          "seed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seed",
            "description": "Ziarno losowania; brak = RRRRMMDD dnia zlecenia"
          },
          "scope": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/gspamjudge__features__audits__contracts__Scope"
              },
              {
                "type": "null"
              }
            ]
          },
          "preset": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-z][a-z-]{0,39}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preset",
            "description": "Etykieta wyboru w panelu; koszt strony z faktycznych reguł (rules + categories, #117)"
          },
          "js": {
            "type": "boolean",
            "title": "Js",
            "description": "Zgodność wstecz: true = render_js on (#201)",
            "default": false
          },
          "render_js": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "off",
                  "on",
                  "auto"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Render Js",
            "description": "Render JavaScript (#201): on (+ render_js price per page, USD) | off | auto (surcharge only for rendered pages); empty = project setting"
          },
          "rules": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rules"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categories",
            "description": "spam, quality, helpful (#156); brak = wszystkie. Zawęża `rules` (albo cały katalog) i szacunek kosztu/czasu"
          },
          "modes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Modes",
            "description": "Audit modes (#334): spam, quality, helpful; same as `categories` (alias, wins when both are given); empty or all three = everything"
          },
          "explain": {
            "type": "boolean",
            "title": "Explain",
            "default": false
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "report_lang": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "en",
                  "pl"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Lang",
            "description": "Report language (#479): en | pl; titles, what to do, exports and share link. Empty = Accept-Language, else en"
          }
        },
        "type": "object",
        "title": "SiteAuditCreate"
      },
      "SitePreview": {
        "properties": {
          "preview_id": {
            "type": "string",
            "title": "Preview Id"
          },
          "site": {
            "type": "string",
            "title": "Site"
          },
          "source": {
            "type": "string",
            "title": "Source"
          },
          "sitemaps": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Sitemaps"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "rejected": {
            "type": "integer",
            "title": "Rejected",
            "default": 0
          },
          "with_html": {
            "type": "integer",
            "title": "With Html",
            "default": 0
          },
          "patterns": {
            "items": {
              "$ref": "#/components/schemas/PatternPreview"
            },
            "type": "array",
            "title": "Patterns"
          },
          "sections": {
            "items": {
              "$ref": "#/components/schemas/SectionCount"
            },
            "type": "array",
            "title": "Sections",
            "default": []
          }
        },
        "type": "object",
        "required": [
          "preview_id",
          "site",
          "source",
          "sitemaps",
          "total",
          "patterns"
        ],
        "title": "SitePreview"
      },
      "SiteSource": {
        "properties": {
          "site": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Site",
            "description": "Domena albo URL witryny; sitemap z robots.txt / sitemap.xml"
          },
          "sitemap_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sitemap Url",
            "description": "Bezpośredni URL sitemap (także indeksu)"
          },
          "sitemap_xml": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000000
              },
              {
                "type": "null"
              }
            ],
            "title": "Sitemap Xml",
            "description": "Wklejona treść sitemap XML (#345): urlset = lista URL-i z lastmod, sitemapindex = pobranie podrzędnych z hosta witryny"
          },
          "urls": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Urls",
            "description": "Własna lista URL-i (zamiast sitemap); maks. GSPAMJUDGE_AUDITS_UPLOAD_MAX_URLS"
          },
          "items": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PageItem"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Items",
            "description": "Import: url + opcjonalny html (bez pobierania); limity jak /v1/jobs"
          },
          "same_site": {
            "type": "boolean",
            "title": "Same Site",
            "description": "Lista URL-i: tylko host pierwszego URL-a (albo `site`)",
            "default": true
          },
          "distinct_slash": {
            "type": "boolean",
            "title": "Distinct Slash",
            "description": "`/a` i `/a/` jako różne URL-e (domyślnie ten sam)",
            "default": false
          },
          "preview_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Preview Id",
            "description": "Id podglądu (ten sam użytkownik/klucz i projekt): bez ponownego odkrycia"
          }
        },
        "type": "object",
        "title": "SiteSource"
      },
      "StatusLevel": {
        "type": "string",
        "enum": [
          "up",
          "warming",
          "busy",
          "degraded"
        ],
        "title": "StatusLevel"
      },
      "StoredReport": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Host"
          },
          "url_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url Hash"
          },
          "prompt_ver": {
            "type": "string",
            "title": "Prompt Ver"
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "report": {
            "$ref": "#/components/schemas/JudgeReport"
          }
        },
        "type": "object",
        "required": [
          "id",
          "created_at",
          "url",
          "prompt_ver",
          "report"
        ],
        "title": "StoredReport"
      },
      "Subject": {
        "type": "string",
        "enum": [
          "user",
          "project",
          "org"
        ],
        "title": "Subject"
      },
      "TierEvent": {
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time",
            "title": "At"
          },
          "levels": {
            "additionalProperties": {
              "type": "string",
              "enum": [
                "lite",
                "basic",
                "premium"
              ]
            },
            "type": "object",
            "title": "Levels"
          },
          "steps": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Steps",
            "default": {}
          },
          "source": {
            "type": "string",
            "enum": [
              "initial",
              "upgrade"
            ],
            "title": "Source",
            "default": "upgrade"
          },
          "charged_usd": {
            "type": "number",
            "title": "Charged Usd",
            "readOnly": true
          },
          "refunded_usd": {
            "type": "number",
            "title": "Refunded Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "at",
          "levels",
          "charged_usd",
          "refunded_usd"
        ],
        "title": "TierEvent",
        "description": "Wpis historii poziomów raportu (raport rośnie w miejscu, ten sam rep_). Kwoty w USD."
      },
      "TierState": {
        "properties": {
          "report_id": {
            "type": "string",
            "title": "Report Id"
          },
          "levels": {
            "additionalProperties": {
              "type": "string",
              "enum": [
                "lite",
                "basic",
                "premium"
              ]
            },
            "type": "object",
            "title": "Levels"
          },
          "tier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "lite",
                  "basic",
                  "premium"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tier"
          },
          "intent": {
            "type": "boolean",
            "title": "Intent",
            "default": false
          },
          "inferred": {
            "type": "boolean",
            "title": "Inferred",
            "default": false
          },
          "history": {
            "items": {
              "$ref": "#/components/schemas/TierEvent"
            },
            "type": "array",
            "title": "History",
            "default": []
          },
          "paid_usd": {
            "type": "number",
            "title": "Paid Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "report_id",
          "levels",
          "tier",
          "paid_usd"
        ],
        "title": "TierState",
        "description": "Bieżący poziom raportu: głębokość per kategoria + zapłacona kwota strony (bez dodatku Intent)."
      },
      "TierTable": {
        "properties": {
          "page": {
            "items": {
              "$ref": "#/components/schemas/PageTierPrice"
            },
            "type": "array",
            "title": "Page"
          },
          "intent": {
            "items": {
              "$ref": "#/components/schemas/IntentTier"
            },
            "type": "array",
            "title": "Intent"
          }
        },
        "type": "object",
        "required": [
          "page",
          "intent"
        ],
        "title": "TierTable"
      },
      "UpgradeEstimate": {
        "properties": {
          "report_id": {
            "type": "string",
            "title": "Report Id"
          },
          "current": {
            "$ref": "#/components/schemas/TierState"
          },
          "target": {
            "additionalProperties": {
              "type": "string",
              "enum": [
                "lite",
                "basic",
                "premium"
              ]
            },
            "type": "object",
            "title": "Target"
          },
          "available": {
            "type": "boolean",
            "title": "Available",
            "default": true
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          },
          "rules_missing": {
            "type": "integer",
            "title": "Rules Missing",
            "default": 0
          },
          "evidence_hits": {
            "type": "integer",
            "title": "Evidence Hits",
            "default": 0
          },
          "refetch": {
            "type": "boolean",
            "title": "Refetch",
            "default": false
          },
          "seconds": {
            "type": "integer",
            "title": "Seconds",
            "default": 0
          },
          "cost_usd": {
            "type": "number",
            "title": "Cost Usd",
            "readOnly": true
          },
          "steps_usd": {
            "additionalProperties": {
              "type": "number"
            },
            "type": "object",
            "title": "Steps Usd",
            "description": "Krok -> USD (suma = cost_usd).",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "report_id",
          "current",
          "target",
          "cost_usd",
          "steps_usd"
        ],
        "title": "UpgradeEstimate"
      },
      "UpgradeRequest": {
        "properties": {
          "market": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Market",
            "description": "Market `language-COUNTRY`, e.g. pl-PL (default en-US)"
          },
          "location_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Location Code",
            "description": "Numeric country location_code from the supported markets list, e.g. 2616 (Poland); overrides the country of `market`"
          },
          "language_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Language Code",
            "description": "language_code from the supported markets list, e.g. pl; overrides the language of `market`"
          },
          "tier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "lite",
                  "basic",
                  "premium"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tier"
          },
          "categories": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "spam",
                    "quality",
                    "helpful"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Categories"
          },
          "query": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Query"
          }
        },
        "type": "object",
        "title": "UpgradeRequest",
        "description": "`tier` = docelowa głębokość (domyślnie bieżąca); `categories` = kategorie do dodania/pogłębienia\n(domyślnie kupione). `query` + `market` (albo `location_code` + `language_code`, #315) = dodatek Intent (Needs Met) z ceną z cennika USD."
      },
      "UpgradeResult": {
        "properties": {
          "estimate": {
            "$ref": "#/components/schemas/UpgradeEstimate"
          },
          "state": {
            "$ref": "#/components/schemas/TierState"
          },
          "failed_steps": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Failed Steps",
            "default": []
          },
          "charged_usd": {
            "type": "number",
            "title": "Charged Usd",
            "readOnly": true
          },
          "refunded_usd": {
            "type": "number",
            "title": "Refunded Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "estimate",
          "state",
          "charged_usd",
          "refunded_usd"
        ],
        "title": "UpgradeResult"
      },
      "UpgradeRun": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "audit_id": {
            "type": "string",
            "title": "Audit Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "done",
              "failed"
            ],
            "title": "Status"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "done": {
            "type": "integer",
            "title": "Done",
            "default": 0
          },
          "failed": {
            "type": "integer",
            "title": "Failed",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "reserved_usd": {
            "type": "number",
            "title": "Reserved Usd",
            "readOnly": true
          },
          "refunded_usd": {
            "type": "number",
            "title": "Refunded Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "id",
          "audit_id",
          "status",
          "total",
          "created_at",
          "reserved_usd",
          "refunded_usd"
        ],
        "title": "UpgradeRun",
        "description": "Dopłata audytu w tle (POST /v1/audits/{id}/upgrade -> 202)."
      },
      "UsageCounter": {
        "properties": {
          "used_usd": {
            "type": "number",
            "title": "Used Usd",
            "readOnly": true
          },
          "limit_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Limit Usd",
            "description": "None = bez limitu.",
            "readOnly": true
          },
          "remaining_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remaining Usd",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "used_usd",
          "limit_usd",
          "remaining_usd"
        ],
        "title": "UsageCounter"
      },
      "UsageRead": {
        "properties": {
          "unit": {
            "type": "string",
            "title": "Unit",
            "default": "usd"
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageScope"
              },
              {
                "type": "null"
              }
            ]
          },
          "project": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageScope"
              },
              {
                "type": "null"
              }
            ]
          },
          "org": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UsageScope"
              },
              {
                "type": "null"
              }
            ]
          },
          "plan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Plan"
              },
              {
                "type": "null"
              }
            ]
          },
          "balance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Balance"
              },
              {
                "type": "null"
              }
            ]
          },
          "exempt": {
            "type": "boolean",
            "title": "Exempt",
            "default": false
          }
        },
        "type": "object",
        "title": "UsageRead",
        "description": "GET /v1/usage: zużycie w USD — użytkownik, projekt, org (pula planu) i saldo PAYG."
      },
      "UsageScope": {
        "properties": {
          "subject": {
            "$ref": "#/components/schemas/Subject"
          },
          "subject_id": {
            "type": "string",
            "title": "Subject Id"
          },
          "day": {
            "$ref": "#/components/schemas/UsageCounter"
          },
          "month": {
            "$ref": "#/components/schemas/UsageCounter"
          }
        },
        "type": "object",
        "required": [
          "subject",
          "subject_id",
          "day",
          "month"
        ],
        "title": "UsageScope"
      },
      "UserCreate": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "title": "Password"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active",
            "default": true
          },
          "is_superuser": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Superuser",
            "default": false
          },
          "is_verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Verified",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "title": "UserCreate",
        "description": "Rejestracja: tylko email + hasło. Rola nie jest polem wejścia (nadaje ją admin)."
      },
      "UserRead": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "is_active": {
            "type": "boolean",
            "title": "Is Active",
            "default": true
          },
          "is_superuser": {
            "type": "boolean",
            "title": "Is Superuser",
            "default": false
          },
          "is_verified": {
            "type": "boolean",
            "title": "Is Verified",
            "default": false
          },
          "role": {
            "$ref": "#/components/schemas/Role",
            "default": "user"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email"
        ],
        "title": "UserRead"
      },
      "UserUpdate": {
        "properties": {
          "password": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "is_verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Verified"
          }
        },
        "type": "object",
        "title": "UserUpdate",
        "description": "PATCH /v1/users/me (email/hasło) i /v1/users/{id}. Bez `role`/`is_superuser`: tylko PATCH .../role."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "gspamjudge__features__apikeys__contracts__Scope": {
        "type": "string",
        "enum": [
          "judge",
          "reports:read",
          "jobs",
          "projects:read",
          "feedback:write"
        ],
        "title": "Scope"
      },
      "gspamjudge__features__audits__contracts__Scope": {
        "properties": {
          "include_patterns": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 500,
            "title": "Include Patterns",
            "default": []
          },
          "exclude_patterns": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 500,
            "title": "Exclude Patterns",
            "default": []
          },
          "include": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Include",
            "default": []
          },
          "exclude": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Exclude",
            "default": []
          },
          "exclude_urls": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 5000,
            "title": "Exclude Urls",
            "default": []
          },
          "sections": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 500,
            "title": "Sections",
            "description": "Kreator #345: tylko te sekcje (pierwszy segment ścieżki, np. `/blog/`, `/` = strona główna i pliki w katalogu głównym); puste = wszystkie",
            "default": []
          }
        },
        "type": "object",
        "title": "Scope",
        "description": "Wybór stron (#119). Wzorce = wartości `pattern` z podglądu; reguły tekstowe tylko glob (`/ludzie/*` na ścieżce,\nbez `/` na początku = pełny URL); bez regexów (ReDoS). Puste include = wszystko."
      }
    },
    "securitySchemes": {
      "APIKeyCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "gsj_session"
      },
      "OAuth2PasswordBearer": {
        "type": "oauth2",
        "flows": {
          "password": {
            "scopes": {},
            "tokenUrl": "/v1/auth/jwt/login"
          }
        }
      }
    }
  }
}
