{
  "openapi": "3.1.0",
  "info": {
    "title": "QA Car testing API",
    "version": "1.0.0",
    "description": "Cookie and bearer sessions share active-account, role, and ownership checks. Sandbox tools are opt-in. See the repository README for setup and flow examples."
  },
  "servers": [
    {
      "url": "https://qacar.online"
    },
    {
      "url": "http://localhost:3000"
    }
  ],
  "paths": {
    "/api/admin/stats": {
      "get": {
        "operationId": "get_admin_stats",
        "summary": "GET /api/admin/stats",
        "tags": [
          "admin"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/auth/login": {
      "post": {
        "operationId": "post_auth_login",
        "summary": "POST /api/auth/login",
        "tags": [
          "auth"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BearerLogin"
                    },
                    {
                      "$ref": "#/components/schemas/CookieLogin"
                    },
                    {
                      "$ref": "#/components/schemas/OtpRequired"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 72
                  },
                  "authMode": {
                    "type": "string",
                    "enum": [
                      "bearer",
                      "cookie"
                    ],
                    "default": "bearer"
                  }
                },
                "required": [
                  "email",
                  "password"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/auth/logout": {
      "post": {
        "operationId": "post_auth_logout",
        "summary": "POST /api/auth/logout",
        "tags": [
          "auth"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/auth/me": {
      "get": {
        "operationId": "get_auth_me",
        "summary": "GET /api/auth/me",
        "tags": [
          "auth"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "$ref": "#/components/schemas/User"
                    }
                  },
                  "required": [
                    "user"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/auth/otp/resend": {
      "post": {
        "operationId": "post_auth_otp_resend",
        "summary": "POST /api/auth/otp/resend",
        "tags": [
          "auth"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "challengeId": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "challengeId"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/auth/otp/verify": {
      "post": {
        "operationId": "post_auth_otp_verify",
        "summary": "POST /api/auth/otp/verify",
        "tags": [
          "auth"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BearerLogin"
                    },
                    {
                      "$ref": "#/components/schemas/CookieLogin"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "challengeId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "otp": {
                    "type": "string",
                    "pattern": "^[0-9]{6}$"
                  },
                  "authMode": {
                    "type": "string",
                    "enum": [
                      "bearer",
                      "cookie"
                    ],
                    "default": "bearer"
                  }
                },
                "required": [
                  "challengeId",
                  "otp"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/auth/register": {
      "post": {
        "operationId": "post_auth_register",
        "summary": "POST /api/auth/register",
        "tags": [
          "auth"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "201": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "userId": {
                      "type": "string",
                      "pattern": "^[a-fA-F0-9]{24}$"
                    }
                  },
                  "required": [
                    "message",
                    "userId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "firstName": {
                    "type": "string"
                  },
                  "lastName": {
                    "type": "string"
                  },
                  "dob": {
                    "type": "string",
                    "format": "date"
                  },
                  "sex": {
                    "type": "string",
                    "enum": [
                      "male",
                      "female"
                    ]
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 72,
                    "description": "At most 72 UTF-8 bytes"
                  }
                },
                "required": [
                  "firstName",
                  "lastName",
                  "dob",
                  "sex",
                  "email",
                  "password"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/bookings/{id}/confirm": {
      "put": {
        "operationId": "put_bookings__id__confirm",
        "summary": "PUT /api/bookings/{id}/confirm",
        "tags": [
          "bookings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "guestBookingAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "paystack",
                      "flutterwave"
                    ]
                  },
                  "paymentRef": {
                    "type": "string"
                  }
                },
                "required": [
                  "provider",
                  "paymentRef"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/bookings/{id}/guest-access": {
      "post": {
        "operationId": "post_bookings__id__guest_access",
        "summary": "POST /api/bookings/{id}/guest-access",
        "tags": [
          "bookings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/bookings/{id}": {
      "get": {
        "operationId": "get_bookings__id_",
        "summary": "GET /api/bookings/{id}",
        "tags": [
          "bookings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "guestBookingAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "operationId": "put_bookings__id_",
        "summary": "PUT /api/bookings/{id}",
        "tags": [
          "bookings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "guestBookingAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "const": "cancel"
                  }
                },
                "required": [
                  "action"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/bookings/{id}/status": {
      "get": {
        "operationId": "get_bookings__id__status",
        "summary": "GET /api/bookings/{id}/status",
        "tags": [
          "bookings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "guestBookingAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/bookings/admin": {
      "get": {
        "operationId": "get_bookings_admin",
        "summary": "GET /api/bookings/admin",
        "tags": [
          "bookings"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bookings": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Booking"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "bookings",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/bookings/cleanup": {
      "delete": {
        "operationId": "delete_bookings_cleanup",
        "summary": "DELETE /api/bookings/cleanup",
        "tags": [
          "bookings"
        ],
        "parameters": [
          {
            "name": "X-Test-Run-ID",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A run owned by the authenticated administrator. runId query parameter is also accepted."
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 3650,
              "default": 0
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/bookings/create": {
      "post": {
        "operationId": "post_bookings_create",
        "summary": "POST /api/bookings/create",
        "tags": [
          "bookings"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Idempotent replay",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "booking": {
                      "$ref": "#/components/schemas/Booking"
                    },
                    "guestAccessToken": {
                      "type": "string"
                    },
                    "replayed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "message",
                    "booking",
                    "replayed"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "201": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "booking": {
                      "$ref": "#/components/schemas/Booking"
                    },
                    "guestAccessToken": {
                      "type": "string"
                    },
                    "replayed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "message",
                    "booking",
                    "replayed"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Guest access is supported; valid account credentials enable account-specific behavior. Invalid supplied credentials are rejected.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduleId": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "seats": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "guest": {
                    "type": "object",
                    "properties": {
                      "firstName": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 80
                      },
                      "lastName": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 80
                      },
                      "email": {
                        "type": "string",
                        "format": "email",
                        "maxLength": 254
                      },
                      "phone": {
                        "type": "string",
                        "maxLength": 32
                      }
                    },
                    "required": [
                      "firstName",
                      "lastName",
                      "email"
                    ],
                    "additionalProperties": false
                  },
                  "paymentProvider": {
                    "type": "string",
                    "enum": [
                      "paystack",
                      "flutterwave"
                    ]
                  }
                },
                "required": [
                  "scheduleId",
                  "seats"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/bookings/quote": {
      "post": {
        "operationId": "post_bookings_quote",
        "summary": "POST /api/bookings/quote",
        "tags": [
          "bookings"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Guest access is supported; valid account credentials enable account-specific behavior. Invalid supplied credentials are rejected.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scheduleId": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "seats": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  }
                },
                "required": [
                  "scheduleId",
                  "seats"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/bookings": {
      "get": {
        "operationId": "get_bookings",
        "summary": "GET /api/bookings",
        "tags": [
          "bookings"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bookings": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Booking"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "bookings",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/bookings/user/{id}": {
      "get": {
        "operationId": "get_bookings_user__id_",
        "summary": "GET /api/bookings/user/{id}",
        "tags": [
          "bookings"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bookings": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Booking"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "bookings",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/cars/{id}/image": {
      "put": {
        "operationId": "put_cars__id__image",
        "summary": "PUT /api/cars/{id}/image",
        "tags": [
          "cars"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "image": {
                    "type": "string",
                    "format": "binary",
                    "description": "PNG, JPEG or WebP; maximum 5 MiB; file content is verified"
                  }
                },
                "required": [
                  "image"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/cars/{id}": {
      "put": {
        "operationId": "put_cars__id_",
        "summary": "PUT /api/cars/{id}",
        "tags": [
          "cars"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "plateNumber": {
                    "type": "string"
                  },
                  "capacity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "imageUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "URL returned by your pending upload"
                  }
                },
                "required": [
                  "name",
                  "plateNumber",
                  "capacity",
                  "imageUrl"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_cars__id_",
        "summary": "DELETE /api/cars/{id}",
        "tags": [
          "cars"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/cars/create": {
      "post": {
        "operationId": "post_cars_create",
        "summary": "POST /api/cars/create",
        "tags": [
          "cars"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "plateNumber": {
                    "type": "string"
                  },
                  "capacity": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  },
                  "imageUrl": {
                    "type": "string",
                    "format": "uri",
                    "description": "URL returned by your pending upload"
                  }
                },
                "required": [
                  "name",
                  "plateNumber",
                  "capacity",
                  "imageUrl"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/cars": {
      "get": {
        "operationId": "get_cars",
        "summary": "GET /api/cars",
        "tags": [
          "cars"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cars": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "cars",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/cars/upload-temp": {
      "post": {
        "operationId": "post_cars_upload_temp",
        "summary": "POST /api/cars/upload-temp",
        "tags": [
          "cars"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "image": {
                    "type": "string",
                    "format": "binary",
                    "description": "PNG, JPEG or WebP; maximum 5 MiB; file content is verified"
                  }
                },
                "required": [
                  "image"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/cars/uploads/cleanup": {
      "delete": {
        "operationId": "delete_cars_uploads_cleanup",
        "summary": "DELETE /api/cars/uploads/cleanup",
        "tags": [
          "cars"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/destinations/{id}": {
      "put": {
        "operationId": "put_destinations__id_",
        "summary": "PUT /api/destinations/{id}",
        "tags": [
          "destinations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100
                  },
                  "state": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100
                  },
                  "country": {
                    "type": "string",
                    "default": "Nigeria"
                  }
                },
                "required": [
                  "name",
                  "state"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_destinations__id_",
        "summary": "DELETE /api/destinations/{id}",
        "tags": [
          "destinations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/destinations/create": {
      "post": {
        "operationId": "post_destinations_create",
        "summary": "POST /api/destinations/create",
        "tags": [
          "destinations"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100
                  },
                  "state": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100
                  },
                  "country": {
                    "type": "string",
                    "default": "Nigeria"
                  }
                },
                "required": [
                  "name",
                  "state"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/destinations": {
      "get": {
        "operationId": "get_destinations",
        "summary": "GET /api/destinations",
        "tags": [
          "destinations"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "destinations": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "destinations",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/discount/{id}": {
      "put": {
        "operationId": "put_discount__id_",
        "summary": "PUT /api/discount/{id}",
        "tags": [
          "discount"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "percentage": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "active": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "required": [
                  "percentage"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_discount__id_",
        "summary": "DELETE /api/discount/{id}",
        "tags": [
          "discount"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/discount/active": {
      "get": {
        "operationId": "get_discount_active",
        "summary": "GET /api/discount/active",
        "tags": [
          "discount"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/discount/create": {
      "post": {
        "operationId": "post_discount_create",
        "summary": "POST /api/discount/create",
        "tags": [
          "discount"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "percentage": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "active": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "required": [
                  "percentage"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/discount": {
      "get": {
        "operationId": "get_discount",
        "summary": "GET /api/discount",
        "tags": [
          "discount"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "discounts": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "discounts",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/health/db": {
      "get": {
        "operationId": "get_health_db",
        "summary": "GET /api/health/db",
        "tags": [
          "health"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/payments/admin": {
      "get": {
        "operationId": "get_payments_admin",
        "summary": "GET /api/payments/admin",
        "tags": [
          "payments"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "payments": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "payments",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/payments/initiate": {
      "post": {
        "operationId": "post_payments_initiate",
        "summary": "POST /api/payments/initiate",
        "tags": [
          "payments"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "guestBookingAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "paymentUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "paystack",
                        "flutterwave"
                      ]
                    },
                    "reference": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "paymentUrl",
                    "provider",
                    "reference"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bookingId": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "provider": {
                    "type": "string",
                    "enum": [
                      "paystack",
                      "flutterwave"
                    ]
                  }
                },
                "required": [
                  "bookingId",
                  "provider"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/payments/simulate": {
      "post": {
        "operationId": "post_payments_simulate",
        "summary": "POST /api/payments/simulate",
        "tags": [
          "payments"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "guestBookingAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reference": {
                    "type": "string"
                  }
                },
                "required": [
                  "reference"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/payments/verify": {
      "get": {
        "operationId": "get_payments_verify",
        "summary": "GET /api/payments/verify",
        "tags": [
          "payments"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "paystack",
                "flutterwave"
              ]
            }
          },
          {
            "name": "reference",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Gateway attempt reference. trxref or tx_ref is accepted instead."
          },
          {
            "name": "transaction_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          },
          {
            "guestBookingAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/payments/webhook/flutterwave": {
      "post": {
        "operationId": "post_payments_webhook_flutterwave",
        "summary": "POST /api/payments/webhook/flutterwave",
        "tags": [
          "payments"
        ],
        "parameters": [
          {
            "name": "verif-hash",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Flutterwave v3 configured verification hash; supply this or the v4 signature."
          },
          {
            "name": "flutterwave-signature",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Flutterwave v4 base64 HMAC-SHA256 of the raw body. Takes precedence over verif-hash."
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Provider-signed event; signature and authoritative payment details are verified"
              }
            }
          }
        }
      }
    },
    "/api/payments/webhook": {
      "post": {
        "operationId": "post_payments_webhook",
        "summary": "POST /api/payments/webhook",
        "tags": [
          "payments"
        ],
        "parameters": [
          {
            "name": "x-paystack-signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "HMAC-SHA512 of the raw request body with the Paystack secret key."
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Provider-signed event; signature and authoritative payment details are verified"
              }
            }
          }
        }
      }
    },
    "/api/routes/{id}": {
      "put": {
        "operationId": "put_routes__id_",
        "summary": "PUT /api/routes/{id}",
        "tags": [
          "routes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "to": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "basePrice": {
                    "type": "number",
                    "minimum": 0.01,
                    "maximum": 100000000,
                    "multipleOf": 0.01
                  }
                },
                "required": [
                  "from",
                  "to",
                  "basePrice"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_routes__id_",
        "summary": "DELETE /api/routes/{id}",
        "tags": [
          "routes"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/routes/create": {
      "post": {
        "operationId": "post_routes_create",
        "summary": "POST /api/routes/create",
        "tags": [
          "routes"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "to": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "basePrice": {
                    "type": "number",
                    "minimum": 0.01,
                    "maximum": 100000000,
                    "multipleOf": 0.01
                  }
                },
                "required": [
                  "from",
                  "to",
                  "basePrice"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/routes": {
      "get": {
        "operationId": "get_routes",
        "summary": "GET /api/routes",
        "tags": [
          "routes"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "routes": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "routes",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/schedules/{id}": {
      "get": {
        "operationId": "get_schedules__id_",
        "summary": "GET /api/schedules/{id}",
        "tags": [
          "schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "operationId": "put_schedules__id_",
        "summary": "PUT /api/schedules/{id}",
        "tags": [
          "schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "car": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "route": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "departureTime": {
                    "type": "string",
                    "description": "Future ISO datetime with timezone, or Lagos local YYYY-MM-DDTHH:mm"
                  },
                  "availableSeats": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "If provided, must equal car capacity. Omit for automatic capacity."
                  }
                },
                "required": [
                  "car",
                  "route",
                  "departureTime"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_schedules__id_",
        "summary": "DELETE /api/schedules/{id}",
        "tags": [
          "schedules"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-fA-F0-9]{24}$"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/schedules/cleanup": {
      "delete": {
        "operationId": "delete_schedules_cleanup",
        "summary": "DELETE /api/schedules/cleanup",
        "tags": [
          "schedules"
        ],
        "parameters": [
          {
            "name": "X-Test-Run-ID",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A run owned by the authenticated administrator. runId query parameter is also accepted."
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "excludeIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[a-fA-F0-9]{24}$"
                    },
                    "maxItems": 100,
                    "default": []
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/schedules/create": {
      "post": {
        "operationId": "post_schedules_create",
        "summary": "POST /api/schedules/create",
        "tags": [
          "schedules"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "car": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "route": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  },
                  "departureTime": {
                    "type": "string",
                    "description": "Future ISO datetime with timezone, or Lagos local YYYY-MM-DDTHH:mm"
                  },
                  "availableSeats": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100,
                    "description": "If provided, must equal car capacity. Omit for automatic capacity."
                  }
                },
                "required": [
                  "car",
                  "route",
                  "departureTime"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/schedules": {
      "get": {
        "operationId": "get_schedules",
        "summary": "GET /api/schedules",
        "tags": [
          "schedules"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Destination name or ObjectId"
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Destination name or ObjectId"
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Lagos calendar date YYYY-MM-DD"
          },
          {
            "name": "includePast",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "true is honored only for administrators"
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schedules": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "schedules",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Guest access is supported; valid account credentials enable account-specific behavior. Invalid supplied credentials are rejected."
      }
    },
    "/api/test-runs": {
      "post": {
        "operationId": "post_test_runs",
        "summary": "POST /api/test-runs",
        "tags": [
          "test-runs"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/users/approve": {
      "post": {
        "operationId": "post_users_approve",
        "summary": "POST /api/users/approve",
        "tags": [
          "users"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  }
                },
                "required": [
                  "userId"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/users/cleanup": {
      "delete": {
        "operationId": "delete_users_cleanup",
        "summary": "DELETE /api/users/cleanup",
        "tags": [
          "users"
        ],
        "parameters": [
          {
            "name": "X-Test-Run-ID",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "description": "A run owned by the authenticated administrator. runId query parameter is also accepted."
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "active",
                "rejected"
              ]
            }
          },
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 3650,
              "default": 0
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    },
    "/api/users/make-admin": {
      "post": {
        "operationId": "post_users_make_admin",
        "summary": "POST /api/users/make-admin",
        "tags": [
          "users"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/users/reject": {
      "post": {
        "operationId": "post_users_reject",
        "summary": "POST /api/users/reject",
        "tags": [
          "users"
        ],
        "parameters": [],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200"
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "pattern": "^[a-fA-F0-9]{24}$"
                  }
                },
                "required": [
                  "userId"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/users": {
      "get": {
        "operationId": "get_users",
        "summary": "GET /api/users",
        "tags": [
          "users"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success; retrying booking creation can return 200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "users",
                    "pagination"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        },
        "x-required-role": "admin"
      }
    }
  },
  "components": {
    "schemas": {
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "role": {
            "type": "string",
            "enum": [
              "user",
              "admin"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "rejected"
            ]
          },
          "emailVerified": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "_id",
          "firstName",
          "lastName",
          "email",
          "role",
          "status",
          "emailVerified"
        ],
        "additionalProperties": false
      },
      "BearerLogin": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "LOGIN_SUCCESS",
              "OTP_VERIFIED"
            ]
          },
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "accessToken": {
            "type": "string"
          },
          "tokenType": {
            "const": "Bearer"
          },
          "expiresIn": {
            "type": "integer",
            "const": 3600
          }
        },
        "required": [
          "message",
          "code",
          "user",
          "accessToken",
          "tokenType",
          "expiresIn"
        ],
        "additionalProperties": false
      },
      "CookieLogin": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "LOGIN_SUCCESS",
              "OTP_VERIFIED"
            ]
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "message",
          "code",
          "user"
        ],
        "additionalProperties": false
      },
      "OtpRequired": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "const": "OTP_REQUIRED"
          },
          "challengeId": {
            "type": "string",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "delivered": {
            "type": "boolean"
          },
          "expiresIn": {
            "type": "integer",
            "const": 600
          }
        },
        "required": [
          "message",
          "code",
          "challengeId",
          "userId",
          "delivered",
          "expiresIn"
        ],
        "additionalProperties": false
      },
      "Booking": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "pattern": "^[a-fA-F0-9]{24}$"
          },
          "user": {
            "type": [
              "object",
              "null"
            ]
          },
          "guest": {
            "type": "object",
            "properties": {
              "firstName": {
                "type": "string",
                "minLength": 2,
                "maxLength": 80
              },
              "lastName": {
                "type": "string",
                "minLength": 2,
                "maxLength": 80
              },
              "email": {
                "type": "string",
                "format": "email",
                "maxLength": 254
              },
              "phone": {
                "type": "string",
                "maxLength": 32
              }
            },
            "required": [
              "firstName",
              "lastName",
              "email"
            ],
            "additionalProperties": false
          },
          "schedule": {
            "type": "object"
          },
          "seats": {
            "type": "integer",
            "minimum": 1
          },
          "unitPrice": {
            "type": "number"
          },
          "finalUnitPrice": {
            "type": "number"
          },
          "discountApplied": {
            "type": "number"
          },
          "totalAmount": {
            "type": "number"
          },
          "currency": {
            "const": "NGN"
          },
          "status": {
            "enum": [
              "waiting_for_payment",
              "paid",
              "confirmed",
              "expired",
              "cancelled"
            ]
          },
          "holdExpiresAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "_id",
          "schedule",
          "seats",
          "unitPrice",
          "finalUnitPrice",
          "discountApplied",
          "totalAmount",
          "currency",
          "status"
        ]
      },
      "Quote": {
        "type": "object",
        "properties": {
          "unitPrice": {
            "type": "number"
          },
          "finalUnitPrice": {
            "type": "number"
          },
          "discountApplied": {
            "type": "number"
          },
          "totalAmount": {
            "type": "number"
          },
          "currency": {
            "const": "NGN"
          }
        },
        "required": [
          "unitPrice",
          "finalUnitPrice",
          "discountApplied",
          "totalAmount",
          "currency"
        ],
        "additionalProperties": false
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "page": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "totalPages": {
            "type": "integer"
          }
        },
        "required": [
          "page",
          "limit",
          "total",
          "totalPages"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "token"
      },
      "guestBookingAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Booking-Token"
      }
    },
    "responses": {
      "Error": {
        "description": "Structured API error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "path": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "path",
                      "message"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "error",
                "code"
              ],
              "additionalProperties": false
            }
          }
        }
      }
    }
  }
}
