Skip to content

feat: add booking stats endpoint skeleton#9

Closed
devin-ai-integration[bot] wants to merge 1 commit intostagingfrom
workshop/feat-booking-stats-api
Closed

feat: add booking stats endpoint skeleton#9
devin-ai-integration[bot] wants to merge 1 commit intostagingfrom
workshop/feat-booking-stats-api

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot commented Jan 8, 2026

What does this PR do?

Adds a skeleton tRPC handler for booking statistics that workshop attendees will implement. The handler is intentionally incomplete - it returns placeholder values (zeros) that attendees will replace with actual Prisma queries.

The skeleton includes:

  • Type definitions for input parameters (startDate, endDate, optional eventTypeId)
  • Type definitions for the expected return shape (total, confirmed, cancelled, pending, noShow)
  • Placeholder implementation returning zeros

Note: This is a workshop exercise skeleton, not production-ready code.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - workshop skeleton only.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works. N/A - skeleton with no implementation.

How should this be tested?

This is a workshop skeleton. To verify:

  1. Check that the file exists at packages/trpc/server/routers/viewer/bookings/stats.handler.ts
  2. Verify TypeScript types are correct
  3. Workshop attendees will implement the actual Prisma queries

Human Review Checklist

  • Verify this is intended as a workshop skeleton (returns hardcoded zeros by design)
  • Confirm the void ctx and void input statements are acceptable for satisfying the linter on unused parameters
  • Note: This handler is not yet wired to the tRPC router - may need separate integration

Checklist

  • I have read the contributing guide
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked if my changes generate no new warnings

Link to Devin run: https://partner-workshops.devinenterprise.com/sessions/1695e2e6fe0c4015858815ec80d6a82b
Smitches ()

@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants