cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

Feat: adds paymentID and allow attendeeEmail filtering in Booking API

Open alishaz-polymath opened this issue 2 years ago • 3 comments

What does this PR do?

  • Adds payment model specifically picking ID, success and PaymentOption fields.
  • This allows the users to get the payment ID and quick state of the payment from the GET bookings/ and GET bookings/{id} requests.
  • They can then use the payment ID to fetch more details about the payment, if they wish. This was a requested feature.
  • Adds attendeeEmails filter where the user can make a GET request to /bookings with attendeeEmails as a query parameter, containing single attendeeEmail or multiple emails separated by comma. The response contains bookings where the host is the user the request is made by (or for, if it is an Admin request) and simultaneously contains the provided attendeeEmail as the email ID of the attendee in the booking.

Fixes #9148 #9149

Environment: Staging(main branch)

Type of change

  • New feature (non-breaking change which adds functionality)

How should this be tested?

  • [ ] Add attendeeEmail in the query parameters in the GET request of /bookings API endpoint to check if it filters the bookings as expected. You can add it multiple times (eg: &[email protected]&[email protected])
  • [ ] Your GET requests for both /bookings and /bookings/{id} should get payment information as well now, when available, else be an empty array.

alishaz-polymath avatar May 26 '23 11:05 alishaz-polymath

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2023 5:32pm
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2023 5:32pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
api ⬜️ Ignored (Inspect) Visit Preview May 30, 2023 5:32pm

vercel[bot] avatar May 26 '23 11:05 vercel[bot]

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Ten Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/[user]/book 254.97 KB 406.16 KB 116.04% (🟢 -0.14%)
/apps/[slug]/[...pages] 459.18 KB 610.37 KB 174.39% (🟡 +0.25%)
/auth/setup 174.9 KB 326.08 KB 93.17% (🟡 +0.16%)
/d/[link]/book 254.62 KB 405.8 KB 115.94% (🟢 -0.14%)
/event-types/[type] 479.62 KB 630.81 KB 180.23% (🟡 +0.18%)
/getting-started/[[...step]] 426.28 KB 577.47 KB 164.99% (🟢 -0.22%)
/new-booker/[user]/[type] 290.23 KB 441.42 KB 126.12% (🟢 -0.14%)
/new-booker/team/[slug]/[type] 290.24 KB 441.42 KB 126.12% (🟢 -0.14%)
/settings/my-account/calendars 252.55 KB 403.74 KB 115.35% (🟢 -0.23%)
/team/[slug]/book 254.62 KB 405.81 KB 115.94% (🟢 -0.14%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/-

github-actions[bot] avatar May 26 '23 11:05 github-actions[bot]

No failed tests 🎉

deploysentinel[bot] avatar May 26 '23 11:05 deploysentinel[bot]