cal.com
cal.com copied to clipboard
feat: add booking date range filters and freeze GPT-4 version
What does this PR do?
This PR adds optional filtering by date to the Cal.com consumer API, and integration with cal.ai.
It fixes a problem where many accounts can't access the getBookings route since they have historical buggy data - and the consumer API previously fetched all booking ever, leading to errors.
We now add the option to fetch booking within a range.
Partially Fixes #11957 (issue)
Additionally, this pr freezes the GPT-4 model (gpt-4-0613) version in an attempt to prevent model degradation.
Requirement/Documentation
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Chore (refactoring code, technical debt, workflow improvements)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How should this be tested?
Mandatory Tasks
- [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.
Checklist
- ~I haven't read the contributing guide~
- ~My code doesn't follow the style guidelines of this project~
- I haven't commented my code, particularly in hard-to-understand areas
- I haven't checked if my PR needs changes to the documentation
- I haven't checked if my changes generate no new warnings
- I haven't added tests that prove my fix is effective or that my feature works
- I haven't checked if new and existing unit tests pass locally with my changes
@DexterStorey is attempting to deploy a commit to the cal Team on Vercel.
A member of the Team first needs to authorize it.
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.
📦 Next.js Bundle Analysis for @calcom/web
This analysis was generated by the Next.js Bundle Analysis action. 🤖
This PR introduced no changes to the JavaScript bundle! 🙌
This PR is being marked as stale due to inactivity.
This PR is being closed due to inactivity. Please reopen if work is intended to be continued.
Tested and fixed! This seems to work now.
When I go to: http://localhost:3002/bookings?dateFrom=2023-12-20T16:00:00Z&dateTo=2023-12-20T16:15:00Z&apiKey=API_KEY
I can see the booking:
But with: http://localhost:3002/bookings?dateFrom=2023-12-20T16:00:00Z&dateTo=2023-12-20T16:14:00Z&apiKey=API_KEY
It is hidden
With no dateFrom or dateTo passed, the api query responds normally, so in theory this is purely additive / optional.
http://localhost:3002/bookings?apiKey=API_KEY
🚀 This should fix #11957
Docs should probably be updated as we now have a new feature for the getBookings API (dateFrom, dateTo) which filters bookings by date.
This PR is being marked as stale due to inactivity.