Skip to content

feat: tRPC routes for Mini device control + data #408

@ng

Description

@ng

Context

Add tRPC router for Mini endpoints, gated behind ENABLE_MINI feature flag.

Routes

mini.status

  • Get current device state (level, sound, baby state, lock)

mini.control

  • start / stop
  • setSootheLevel(1-4)
  • setLock(boolean)
  • setWeaningMode(config)

mini.sessions

  • list (paginated, date-filtered)
  • get by ID (with soothe events)
  • current (active session if any)

mini.biometrics

  • sleepSummary (date range → duration, wake count, avg soothe)
  • soothePatterns (which levels used most, time-of-night)
  • trends (daily/weekly aggregates)

mini.settings

  • get / update (sound type, volume, motion limiter, weaning)

Conditional Loading

Routes only registered when ENABLE_MINI=true at build time.

Parent

Epic: #405

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions