openapi: 3.0.0
info:
  title: QOSS Backend API
  version: '1.0.0'
  description: QOSS ERP Backend API Documentation
servers:
  - url: http://localhost:8002
    description: Development server
paths:
  /api/v1/auth/login:
    post:
      summary: User login
      operationId: login
      tags:
        - Auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                password:
                  type: string
                  format: password
              required:
                - email
                - password
      responses:
        '200':
          description: Login successful
        '401':
          description: Invalid credentials
  /api/v1/companies:
    get:
      summary: Get all companies
      operationId: getCompanies
      tags:
        - Companies
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List of companies
        '401':
          description: Unauthorized
  /api/v1/domains:
    get:
      summary: Get all domains
      operationId: getDomains
      tags:
        - Domains
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List of domains
        '401':
          description: Unauthorized
  /api/v1/modules:
    get:
      summary: Get all modules
      operationId: getModules
      tags:
        - Modules
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List of modules
        '401':
          description: Unauthorized
  /api/v1/features:
    get:
      summary: Get all features
      operationId: getFeatures
      tags:
        - Features
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List of features
        '401':
          description: Unauthorized
  /api/v1/job-roles:
    get:
      summary: Get all job roles
      operationId: getJobRoles
      tags:
        - JobRoles
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List of job roles
        '401':
          description: Unauthorized
  /api/v1/leads:
    get:
      summary: Get all leads
      operationId: getLeads
      tags:
        - Leads
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List of leads
        '401':
          description: Unauthorized
    post:
      summary: Create a new lead
      operationId: createLead
      tags:
        - Leads
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                company_id:
                  type: string
                first_name:
                  type: string
                last_name:
                  type: string
                email:
                  type: string
                phone:
                  type: string
              required:
                - company_id
                - first_name
                - email
      responses:
        '201':
          description: Lead created successfully
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
