# services-config-complete.yaml
global:
  module_name: "api-service"
  output_dir: "internal/handlers"
  package_prefix: "api-service"
  enable_swagger: true
  enable_logging: true
  enable_metrics: true

services:
  vclaim:
    name: "VClaim"
    category: "vclaim"
    package: "vclaim"
    description: "BPJS VClaim service for eligibility and SEP management"
    base_url: "https://apijkn.bpjs-kesehatan.go.id/vclaim-rest"
    timeout: 30
    retry_count: 3
    middleware:
      - "RequestLogger"
      - "ResponseLogger"
      - "RateLimiter"
    dependencies:
      - "database"
      - "redis"
    endpoints:
      peserta:
        methods: ["GET"]
        get_path: "/Peserta/:nokartu"
        model: "PesertaRequest"
        response_model: "PesertaResponse"
        description: "Get participant eligibility information"
        summary: "Get Participant Info"
        tags: ["vclaim", "peserta"]
        require_auth: true
        rate_limit: 100
        cache_enabled: true
        cache_ttl: 300
      sep:
        methods: ["GET", "POST", "PUT", "DELETE"]
        get_path: "/SEP/:nosep"
        post_path: "/sep"
        put_path: "/sep/:nosep"
        delete_path: "/sep/:nosep"
        model: "SEPRequest"
        response_model: "SEPResponse"
        description: "Manage SEP (Surat Eligibilitas Peserta)"
        summary: "SEP Management"
        tags: ["vclaim", "sep"]
        require_auth: true
        rate_limit: 50
        cache_enabled: true
        cache_ttl: 180
        custom_headers:
          X-Service: "VClaim"
          X-Version: "2.0"
      rujukan:
        methods: ["GET"]
        get_path: "/rujukan/:norujukan"
        model: "RujukanRequest"
        response_model: "RujukanResponse"
        description: "Get referral information"
        summary: "Get Referral Info"
        tags: ["vclaim", "rujukan"]
        require_auth: true
        rate_limit: 100
        cache_enabled: true
        cache_ttl: 600

  eclaim:
    name: "EClaim"
    category: "eclaim"
    package: "eclaim"
    description: "BPJS EClaim service for claim processing and grouper"
    base_url: "https://apijkn.bpjs-kesehatan.go.id/new-eclaim-rest"
    timeout: 60
    retry_count: 2
    middleware:
      - "RequestLogger"
      - "ResponseLogger"
      - "ClaimValidator"
    dependencies:
      - "database"
      - "grouper_service"
    endpoints:
      klaim:
        methods: ["GET", "POST", "PUT"]
        get_path: "/klaim/:noklaim"
        post_path: "/klaim"
        put_path: "/klaim/:noklaim"
        model: "KlaimRequest"
        response_model: "KlaimResponse"
        description: "Manage insurance claims"
        summary: "Claim Management"
        tags: ["eclaim", "klaim"]
        require_auth: true
        rate_limit: 30
        cache_enabled: false
      grouper:
        methods: ["POST"]
        post_path: "/grouper"
        model: "GrouperRequest"
        response_model: "GrouperResponse"
        description: "Process claim grouping and pricing"
        summary: "Claim Grouper"
        tags: ["eclaim", "grouper"]
        require_auth: true
        rate_limit: 20
        cache_enabled: true
        cache_ttl: 120

  aplicare:
    name: "Aplicare"
    category: "aplicare"
    package: "aplicare"
    description: "BPJS Aplicare service for reference data and monitoring"
    base_url: "https://apijkn.bpjs-kesehatan.go.id/aplicaresws"
    timeout: 45
    retry_count: 3
    middleware:
      - "RequestLogger"
      - "ResponseLogger"
    dependencies:
      - "database"
    endpoints:
      referensi:
        methods: ["GET"]
        get_path: "/referensi/:jenis"
        model: "ReferensiRequest"
        response_model: "ReferensiResponse"
        description: "Get reference data (diagnoses, procedures, etc.)"
        summary: "Get Reference Data"
        tags: ["aplicare", "referensi"]
        require_auth: true
        rate_limit: 200
        cache_enabled: true
        cache_ttl: 3600
      monitoring:
        methods: ["GET", "POST"]
        get_path: "/monitoring/:tanggal"
        post_path: "/monitoring"
        model: "MonitoringRequest"
        response_model: "MonitoringResponse"
        description: "Healthcare monitoring and reporting"
        summary: "Monitoring Data"
        tags: ["aplicare", "monitoring"]
        require_auth: true
        rate_limit: 50
        cache_enabled: false
