// 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": { "/api/v1/applications": { "get": { "description": "List all applications for a job", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Applications" ], "summary": "List Applications", "parameters": [ { "type": "integer", "description": "Filter applications by job ID", "name": "jobId", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.Application" } } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } }, "post": { "description": "Submit a new job application for a posting", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Applications" ], "summary": "Create Application", "parameters": [ { "description": "Application data", "name": "application", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateApplicationRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.Application" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/applications/{id}": { "get": { "description": "Retrieve a job application by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Applications" ], "summary": "Get Application", "parameters": [ { "type": "integer", "description": "Application ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.Application" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "404": { "description": "Not Found", "schema": { "type": "string" } } } } }, "/api/v1/applications/{id}/status": { "put": { "description": "Update the status of a job application", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Applications" ], "summary": "Update Application Status", "parameters": [ { "type": "integer", "description": "Application ID", "name": "id", "in": "path", "required": true }, { "description": "Status update", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateApplicationStatusRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.Application" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/auth/login": { "post": { "description": "Authenticates a user by email and password. Returns JWT and user info.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Auth" ], "summary": "User Login", "parameters": [ { "description": "Login Credentials", "name": "login", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "400": { "description": "Invalid Request", "schema": { "type": "string" } }, "401": { "description": "Unauthorized", "schema": { "type": "string" } } } } }, "/api/v1/companies": { "get": { "description": "Returns a list of all companies.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Companies" ], "summary": "List Companies", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "type": "object" } } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } }, "post": { "description": "Registers a new company and creates an initial admin user.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Companies" ], "summary": "Create Company (Tenant)", "parameters": [ { "description": "Company Details", "name": "company", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "400": { "description": "Invalid Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/jobs": { "get": { "description": "Get a paginated list of job postings with optional filters", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jobs" ], "summary": "List all jobs", "parameters": [ { "type": "integer", "description": "Page number (default: 1)", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page (default: 10, max: 100)", "name": "limit", "in": "query" }, { "type": "integer", "description": "Filter by company ID", "name": "companyId", "in": "query" }, { "type": "boolean", "description": "Filter by featured status", "name": "featured", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/dto.PaginatedResponse" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } }, "post": { "description": "Create a new job posting", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jobs" ], "summary": "Create a new job", "parameters": [ { "description": "Job data", "name": "job", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.CreateJobRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.Job" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/jobs/{id}": { "get": { "description": "Get a single job posting by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jobs" ], "summary": "Get job by ID", "parameters": [ { "type": "integer", "description": "Job ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.Job" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "404": { "description": "Not Found", "schema": { "type": "string" } } } }, "put": { "description": "Update an existing job posting", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jobs" ], "summary": "Update a job", "parameters": [ { "type": "integer", "description": "Job ID", "name": "id", "in": "path", "required": true }, { "description": "Updated job data", "name": "job", "in": "body", "required": true, "schema": { "$ref": "#/definitions/dto.UpdateJobRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.Job" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } }, "delete": { "description": "Delete a job posting", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Jobs" ], "summary": "Delete a job", "parameters": [ { "type": "integer", "description": "Job ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/notifications": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a list of notifications for the current user.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Notifications" ], "summary": "List Notifications", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.Notification" } } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/notifications/read-all": { "patch": { "security": [ { "BearerAuth": [] } ], "description": "Marks all notifications as read.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Notifications" ], "summary": "Mark All Notifications Read", "responses": { "200": { "description": "All marked as read", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/notifications/{id}/read": { "patch": { "security": [ { "BearerAuth": [] } ], "description": "Marks a notification as read.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Notifications" ], "summary": "Mark Notification Read", "parameters": [ { "type": "string", "description": "Notification ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Marked as read", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/storage/download-url": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Generate a pre-signed URL to download a private file from S3", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Storage" ], "summary": "Generate download URL", "parameters": [ { "description": "Download request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.DownloadURLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.DownloadURLResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/storage/files": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "Delete a stored file by key", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Storage" ], "summary": "Delete file", "parameters": [ { "type": "string", "description": "File key", "name": "key", "in": "query", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/storage/upload-url": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Generate a pre-signed URL to upload a file to S3", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Storage" ], "summary": "Generate upload URL", "parameters": [ { "description": "Upload request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.UploadURLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.UploadURLResponse" } }, "400": { "description": "Bad Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/support/tickets": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a list of tickets for the current user.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Support" ], "summary": "List Tickets", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.Ticket" } } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Creates a new support ticket.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Support" ], "summary": "Create Ticket", "parameters": [ { "description": "Ticket Details", "name": "ticket", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.Ticket" } }, "400": { "description": "Invalid Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/support/tickets/{id}": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns ticket details and chat history.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Support" ], "summary": "Get Ticket Details", "parameters": [ { "type": "string", "description": "Ticket ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "404": { "description": "Not Found", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/support/tickets/{id}/messages": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Adds a message to an existing ticket.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Support" ], "summary": "Add Ticket Message", "parameters": [ { "type": "string", "description": "Ticket ID", "name": "id", "in": "path", "required": true }, { "description": "Message", "name": "message", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.TicketMessage" } }, "400": { "description": "Invalid Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/users": { "get": { "security": [ { "BearerAuth": [] } ], "description": "Returns a list of users belonging to the authenticated tenant.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "List Users", "parameters": [ { "type": "integer", "description": "Page number (default: 1)", "name": "page", "in": "query" }, { "type": "integer", "description": "Items per page (default: 10, max: 100)", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "403": { "description": "Forbidden", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } }, "post": { "security": [ { "BearerAuth": [] } ], "description": "Creates a new user under the current tenant. Requires Admin role.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Create User", "parameters": [ { "description": "User Details", "name": "user", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "400": { "description": "Invalid Request", "schema": { "type": "string" } }, "403": { "description": "Forbidden", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/users/me/avatar": { "post": { "security": [ { "BearerAuth": [] } ], "description": "Uploads a profile picture for the current user.", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Upload Avatar", "parameters": [ { "type": "file", "description": "Avatar File", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Invalid Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/users/me/profile": { "patch": { "security": [ { "BearerAuth": [] } ], "description": "Updates the current user's profile.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Update My Profile", "parameters": [ { "description": "Profile Details", "name": "user", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "400": { "description": "Invalid Request", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } }, "/api/v1/users/{id}": { "delete": { "security": [ { "BearerAuth": [] } ], "description": "Deletes a user by ID. Must belong to the same tenant.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Delete User", "parameters": [ { "type": "string", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "User deleted", "schema": { "type": "string" } }, "403": { "description": "Forbidden", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } }, "patch": { "security": [ { "BearerAuth": [] } ], "description": "Updates user details (Name, Email, Active Status)", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Users" ], "summary": "Update User", "parameters": [ { "type": "string", "description": "User ID", "name": "id", "in": "path", "required": true }, { "description": "User Updates", "name": "user", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "403": { "description": "Forbidden", "schema": { "type": "string" } }, "500": { "description": "Internal Server Error", "schema": { "type": "string" } } } } } }, "definitions": { "dto.CreateApplicationRequest": { "type": "object", "required": [ "jobId" ], "properties": { "documents": { "type": "object", "additionalProperties": true }, "email": { "type": "string" }, "jobId": { "type": "string" }, "lineId": { "type": "string" }, "message": { "type": "string" }, "name": { "type": "string" }, "phone": { "type": "string" }, "resumeUrl": { "type": "string" }, "userId": { "type": "string" }, "whatsapp": { "type": "string" } } }, "dto.CreateJobRequest": { "type": "object", "required": [ "companyId", "description", "title" ], "properties": { "benefits": { "type": "object", "additionalProperties": true }, "cityId": { "type": "integer" }, "companyId": { "type": "string" }, "currency": { "type": "string", "enum": [ "BRL", "USD", "EUR", "GBP", "JPY" ] }, "description": { "type": "string", "minLength": 20 }, "employmentType": { "type": "string", "enum": [ "full-time", "part-time", "dispatch", "contract", "temporary", "training", "voluntary", "permanent" ] }, "languageLevel": { "type": "string" }, "location": { "type": "string" }, "regionId": { "type": "integer" }, "requirements": { "type": "object", "additionalProperties": true }, "salaryMax": { "type": "number" }, "salaryMin": { "type": "number" }, "salaryType": { "type": "string", "enum": [ "hourly", "daily", "weekly", "monthly", "yearly" ] }, "status": { "type": "string", "enum": [ "draft", "open", "closed", "review", "published", "paused", "expired", "archived", "reported" ] }, "title": { "type": "string", "maxLength": 255, "minLength": 5 }, "visaSupport": { "type": "boolean" }, "workingHours": { "type": "string" } } }, "dto.PaginatedResponse": { "type": "object", "properties": { "data": {}, "pagination": { "$ref": "#/definitions/dto.Pagination" } } }, "dto.Pagination": { "type": "object", "properties": { "limit": { "type": "integer" }, "page": { "type": "integer" }, "total": { "type": "integer" } } }, "dto.UpdateApplicationStatusRequest": { "type": "object", "required": [ "status" ], "properties": { "notes": { "type": "string" }, "status": { "type": "string", "enum": [ "pending", "reviewed", "shortlisted", "rejected", "hired" ] } } }, "dto.UpdateJobRequest": { "type": "object", "properties": { "benefits": { "type": "object", "additionalProperties": true }, "cityId": { "type": "integer" }, "currency": { "type": "string", "enum": [ "BRL", "USD", "EUR", "GBP", "JPY" ] }, "description": { "type": "string", "minLength": 20 }, "employmentType": { "type": "string", "enum": [ "full-time", "part-time", "dispatch", "contract", "temporary", "training", "voluntary", "permanent" ] }, "languageLevel": { "type": "string" }, "location": { "type": "string" }, "regionId": { "type": "integer" }, "requirements": { "type": "object", "additionalProperties": true }, "salaryMax": { "type": "number" }, "salaryMin": { "type": "number" }, "salaryType": { "type": "string", "enum": [ "hourly", "daily", "weekly", "monthly", "yearly" ] }, "status": { "type": "string", "enum": [ "draft", "open", "closed", "review", "published", "paused", "expired", "archived", "reported" ] }, "title": { "type": "string", "maxLength": 255, "minLength": 5 }, "visaSupport": { "type": "boolean" }, "workingHours": { "type": "string" } } }, "handlers.DownloadURLRequest": { "type": "object", "properties": { "key": { "type": "string" } } }, "handlers.DownloadURLResponse": { "type": "object", "properties": { "downloadUrl": { "type": "string" }, "expiresIn": { "description": "seconds", "type": "integer" } } }, "handlers.UploadURLRequest": { "type": "object", "properties": { "contentType": { "type": "string" }, "filename": { "type": "string" }, "folder": { "description": "Optional: logos, resumes, documents", "type": "string" } } }, "handlers.UploadURLResponse": { "type": "object", "properties": { "expiresIn": { "description": "seconds", "type": "integer" }, "key": { "type": "string" }, "publicUrl": { "type": "string" }, "uploadUrl": { "type": "string" } } }, "models.Application": { "type": "object", "properties": { "createdAt": { "description": "Metadata", "type": "string" }, "documents": { "description": "Array of {type, url}", "allOf": [ { "$ref": "#/definitions/models.JSONMap" } ] }, "email": { "type": "string" }, "id": { "type": "string" }, "jobId": { "type": "string" }, "lineId": { "type": "string" }, "message": { "description": "Application Content", "type": "string" }, "name": { "description": "Applicant Info (for guest applications)", "type": "string" }, "notes": { "type": "string" }, "phone": { "type": "string" }, "resumeUrl": { "type": "string" }, "status": { "description": "Status \u0026 Notes", "type": "string" }, "updatedAt": { "type": "string" }, "userId": { "description": "NULL for guest applications", "type": "string" }, "whatsapp": { "type": "string" } } }, "models.JSONMap": { "type": "object", "additionalProperties": true }, "models.Job": { "type": "object", "properties": { "benefits": { "$ref": "#/definitions/models.JSONMap" }, "cityId": { "type": "integer" }, "companyId": { "type": "string" }, "createdAt": { "description": "Metadata", "type": "string" }, "createdBy": { "type": "string" }, "currency": { "description": "BRL, USD, EUR, GBP, JPY", "type": "string" }, "description": { "type": "string" }, "employmentType": { "description": "Employment", "type": "string" }, "id": { "type": "string" }, "isFeatured": { "description": "Featured job flag", "type": "boolean" }, "languageLevel": { "description": "N5-N1, beginner, none", "type": "string" }, "location": { "description": "Location", "type": "string" }, "regionId": { "type": "integer" }, "requirements": { "description": "Requirements \u0026 Benefits (JSONB arrays)", "allOf": [ { "$ref": "#/definitions/models.JSONMap" } ] }, "salaryMax": { "type": "number" }, "salaryMin": { "description": "Salary", "type": "number" }, "salaryType": { "description": "hourly, daily, weekly, monthly, yearly", "type": "string" }, "status": { "description": "Status", "type": "string" }, "title": { "description": "Job Details", "type": "string" }, "updatedAt": { "type": "string" }, "visaSupport": { "description": "Visa \u0026 Language", "type": "boolean" }, "workMode": { "description": "onsite, hybrid, remote", "type": "string" }, "workingHours": { "type": "string" } } }, "models.Notification": { "type": "object", "properties": { "createdAt": { "type": "string" }, "id": { "type": "string" }, "link": { "type": "string" }, "message": { "type": "string" }, "readAt": { "type": "string" }, "title": { "type": "string" }, "type": { "description": "info, success, warning, error", "type": "string" }, "updatedAt": { "type": "string" }, "userId": { "type": "integer" } } }, "models.Ticket": { "type": "object", "properties": { "createdAt": { "type": "string" }, "id": { "type": "string" }, "priority": { "description": "low, medium, high", "type": "string" }, "status": { "description": "open, in_progress, closed", "type": "string" }, "subject": { "type": "string" }, "updatedAt": { "type": "string" }, "userId": { "type": "integer" } } }, "models.TicketMessage": { "type": "object", "properties": { "createdAt": { "type": "string" }, "id": { "type": "string" }, "message": { "type": "string" }, "ticketId": { "type": "string" }, "userId": { "type": "integer" } } } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0", Host: "", BasePath: "/", Schemes: []string{}, Title: "GoHorseJobs API", Description: "API for GoHorseJobs recruitment platform.", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }