// Package docs Code generated by swaggo/swag. DO NOT EDIT
package docs

import "github.com/swaggo/swag"

const docTemplate = `{
    "schemes": {{ marshal .Schemes }},
    "swagger": "2.0",
    "info": {
        "description": "{{escape .Description}}",
        "title": "{{.Title}}",
        "contact": {},
        "version": "{{.Version}}"
    },
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/admin/users": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Retrieves all users with their associated short URLs",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Admin"
                ],
                "summary": "List all users and their URLs",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/response.UserURLsResponse"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/admin/users/{id}": {
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Deletes a user by ID and all associated short URLs \u0026 Redis entries",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Admin"
                ],
                "summary": "Delete a user and all related URLs",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "User ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.SuccessResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/health": {
            "get": {
                "description": "Returns current health status of DB, Redis and Email services",
                "tags": [
                    "Health"
                ],
                "summary": "Health Check",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.HealthStatusResponse"
                        }
                    }
                }
            }
        },
        "/login": {
            "post": {
                "description": "Authenticates a user and returns JWT token",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "User Login",
                "parameters": [
                    {
                        "description": "User Credentials",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.AuthRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/response.LoginResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/me": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Returns authenticated user's profile info",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Get current user's profile",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.UserResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/my/urls": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Retrieves all shortened URLs for authenticated user",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "URL"
                ],
                "summary": "Get user's URLs",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/response.URLResponse"
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/my/urls/{code}": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Retrieves a single short URL details with daily click count",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "URL"
                ],
                "summary": "Get a single URL detail",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Short URL code",
                        "name": "code",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.DetailedURLResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            },
            "delete": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Deletes a user's shortened URL by code",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "URL"
                ],
                "summary": "Delete a shortened URL",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Short URL code",
                        "name": "code",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.SuccessResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            },
            "patch": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Updates original URL or custom code for a user's URL",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "URL"
                ],
                "summary": "Update a shortened URL",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Short URL code",
                        "name": "code",
                        "in": "path",
                        "required": true
                    },
                    {
                        "description": "Updated URL info",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.UpdateURLRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.SuccessResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/password/reset": {
            "get": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Sends password reset link to user's email",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "Send password reset mail",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.SuccessResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/register": {
            "post": {
                "description": "Creates a new user account",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Auth"
                ],
                "summary": "User Registration",
                "parameters": [
                    {
                        "description": "User Credentials",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.AuthRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/response.UserResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/shorten": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Create a shortened URL with optional custom code",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "URL"
                ],
                "summary": "Shorten a URL",
                "parameters": [
                    {
                        "description": "URL to shorten",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.ShortenURLRequest"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Created",
                        "schema": {
                            "$ref": "#/definitions/response.URLResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/verify/mail/{token}": {
            "get": {
                "description": "Validates email address through verification token",
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Verification"
                ],
                "summary": "Verify user's email address",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Verification Token",
                        "name": "token",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.SuccessResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/verify/password": {
            "post": {
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "description": "Sets new password after token verification",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Verification"
                ],
                "summary": "Reset user password with verification token",
                "parameters": [
                    {
                        "description": "New Password",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.NewPassword"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.SuccessResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        },
        "/verify/password/{token}": {
            "get": {
                "description": "Sets new password after token verification",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Verification"
                ],
                "summary": "Return verification token to use reset user password",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Verification Token",
                        "name": "token",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/response.SuccessResponse"
                        }
                    }
                }
            }
        },
        "/{code}": {
            "get": {
                "description": "Redirects to original URL based on short code",
                "tags": [
                    "URL"
                ],
                "summary": "Redirect short URL to original URL",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Short URL code",
                        "name": "code",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "302": {
                        "description": "Redirects to original URL",
                        "schema": {
                            "type": "string"
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "schema": {
                            "$ref": "#/definitions/response.ErrorResponse"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "entity.URL": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string"
                },
                "original_url": {
                    "type": "string"
                },
                "total_clicks": {
                    "type": "integer"
                },
                "user_id": {
                    "type": "integer"
                }
            }
        },
        "entity.User": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string"
                },
                "is_admin": {
                    "type": "boolean"
                },
                "is_verified": {
                    "type": "boolean"
                },
                "name": {
                    "type": "string"
                },
                "surname": {
                    "type": "string"
                }
            }
        },
        "request.AuthRequest": {
            "type": "object",
            "required": [
                "email",
                "password"
            ],
            "properties": {
                "email": {
                    "type": "string",
                    "example": "asko@kusko.com"
                },
                "name": {
                    "type": "string",
                    "example": "Cem"
                },
                "password": {
                    "type": "string",
                    "minLength": 8,
                    "example": "supersecret"
                },
                "surname": {
                    "type": "string",
                    "example": "Akan"
                }
            }
        },
        "request.NewPassword": {
            "type": "object",
            "properties": {
                "password": {
                    "type": "string",
                    "example": "newsecurepassword"
                }
            }
        },
        "request.ShortenURLRequest": {
            "type": "object",
            "properties": {
                "custom_code": {
                    "type": "string",
                    "example": "custom123"
                },
                "original_url": {
                    "type": "string",
                    "example": "https://google.com"
                }
            }
        },
        "request.UpdateURLRequest": {
            "type": "object",
            "properties": {
                "new_custom_code": {
                    "type": "string",
                    "example": "newcode123"
                },
                "new_original_url": {
                    "type": "string",
                    "example": "https://updated.com"
                }
            }
        },
        "response.DetailedURLResponse": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string",
                    "example": "abc123"
                },
                "daily_clicks": {
                    "type": "integer",
                    "example": 10
                },
                "original_url": {
                    "type": "string",
                    "example": "https://google.com"
                },
                "total_clicks": {
                    "type": "integer",
                    "example": 42
                }
            }
        },
        "response.ErrorResponse": {
            "type": "object",
            "properties": {
                "error": {
                    "type": "string",
                    "example": "invalid credentials"
                }
            }
        },
        "response.HealthStatusResponse": {
            "type": "object",
            "properties": {
                "database": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/response.Status"
                        }
                    ],
                    "example": "healthy"
                },
                "email": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/response.Status"
                        }
                    ],
                    "example": "healthy"
                },
                "redis": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/response.Status"
                        }
                    ],
                    "example": "healthy"
                },
                "status": {
                    "allOf": [
                        {
                            "$ref": "#/definitions/response.Status"
                        }
                    ],
                    "example": "healthy"
                }
            }
        },
        "response.LoginResponse": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string",
                    "example": "asko@kusko.com"
                },
                "id": {
                    "type": "integer",
                    "example": 1
                },
                "token": {
                    "type": "string",
                    "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
                }
            }
        },
        "response.Status": {
            "type": "string",
            "enum": [
                "healthy",
                "degraded",
                "unhealthy"
            ],
            "x-enum-varnames": [
                "StatusHealthy",
                "StatusDegraded",
                "StatusUnhealthy"
            ]
        },
        "response.SuccessResponse": {
            "type": "object",
            "properties": {
                "success": {
                    "type": "string",
                    "example": "Operation successful"
                }
            }
        },
        "response.URLResponse": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string",
                    "example": "abc123"
                },
                "original_url": {
                    "type": "string",
                    "example": "https://google.com"
                },
                "short_url": {
                    "type": "string",
                    "example": "https://localhost/abc123"
                }
            }
        },
        "response.UserResponse": {
            "type": "object",
            "properties": {
                "email": {
                    "type": "string",
                    "example": "asko@kusko.com"
                },
                "id": {
                    "type": "integer",
                    "example": 1
                }
            }
        },
        "response.UserURLsResponse": {
            "type": "object",
            "properties": {
                "urls": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/entity.URL"
                    }
                },
                "user": {
                    "$ref": "#/definitions/entity.User"
                }
            }
        }
    }
}`

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
	Version:          "1.0",
	Host:             "localhost:3000",
	BasePath:         "/api",
	Schemes:          []string{},
	Title:            "URL Shortener API",
	Description:      "Enterprise grade URL shortening service.",
	InfoInstanceName: "swagger",
	SwaggerTemplate:  docTemplate,
	LeftDelim:        "{{",
	RightDelim:       "}}",
}

func init() {
	swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
