Skip to content

Conversation

@devksingh4
Copy link
Member

@devksingh4 devksingh4 commented Nov 12, 2025

Summary by CodeRabbit

  • New Features
    • Ticket and merchandise entries now support an optional total paid amount field for enhanced payment tracking.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 12, 2025

Walkthrough

The changes add an optional totalPaid field to ticket and merchandise entry data structures, including both the underlying type definitions and Zod validation schemas. This field is sourced from item.total_paid during merch ticket info construction and propagates through the schema hierarchy.

Changes

Cohort / File(s) Summary
Adding totalPaid field to ticket entries
src/api/functions/tickets.ts, src/api/routes/tickets.ts
Added optional total_paid?: number field to RawMerchEntry type and optional totalPaid: number to base ticketEntryZod schema. Field is sourced from item data during merch ticket info construction and propagates through derived schemas to the public TicketInfoEntry type.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Straightforward optional field additions to type definitions and Zod schemas
  • Changes follow consistent pattern across both files
  • No complex logic or control flow modifications

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Return total amount paid data for merch purchases, when available' directly and clearly describes the main change: adding a totalPaid field to merch ticket entries to return payment amount data when available.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dsingh14/track-amount-paid

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 4029f33 and ab56625.

📒 Files selected for processing (2)
  • src/api/functions/tickets.ts (2 hunks)
  • src/api/routes/tickets.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Run Unit Tests
  • GitHub Check: Build Application
🔇 Additional comments (3)
src/api/functions/tickets.ts (2)

34-34: LGTM - Optional field correctly added to RawMerchEntry.

The optional total_paid field is appropriately typed as number and follows the snake_case naming convention for raw DynamoDB types.


137-137: LGTM - Field correctly mapped to API response.

The totalPaid field is properly sourced from item.total_paid, correctly converting from snake_case to camelCase convention for the API response.

src/api/routes/tickets.ts (1)

63-63: LGTM - Zod schema correctly validates optional totalPaid field.

The schema uses the correct Zod v4 syntax z.optional(z.number()) for the optional totalPaid field, which properly validates a number or undefined value.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

💰 Infracost report

Monthly estimate generated

This comment will be updated when code changes.

@devksingh4 devksingh4 merged commit e55abad into main Nov 12, 2025
10 of 11 checks passed
@devksingh4 devksingh4 deleted the dsingh14/track-amount-paid branch November 12, 2025 20:53
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.

2 participants