feat: useApiV2AvailableSlots (#21138)

* feat: useApiV2AvailableSlots

* feat: useApiV2AvailableSlots

* fix type check

* remove log

* fix unit tests

* simplify

* feat: add missing params to the slots endpoint

* updated documentation

* _shouldServeCache is correct

* fix types

* fix enabled prop

* fix type

* add embedConnectVersion to query key

* add teamId to slot type

* fix

* add fallback to trpc query if apiv2 fails

* add comment

* remove logs

* fix

* refactor: default to isTeamEvent in query params

* fix: only return v2 slots once fetch is success

* fix last e2e failing test

* add feature flag

* add migration sql

* Update packages/prisma/migrations/20250512153630_add_use_api_v2_for_team_slots_feature_flag/migration.sql

---------

Co-authored-by: hbjORbj <[email protected]>
Co-authored-by: Somay Chauhan <[email protected]>
Co-authored-by: supalarry <[email protected]>
Co-authored-by: Keith Williams <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-05-12 20:48:29 +00:00
1 parent ade64c0d09
commit 048e56806c
16 files changed
+218 -46

No files matched your search

@@ -0,0 +1,9 @@
INSERT INTO
"Feature" (slug, enabled, description, "type")
VALUES
(
'use-api-v2-for-team-slots',
false,
'Whether to use API v2 for fetching team schedule slots.',
'OPERATIONAL'
) ON CONFLICT (slug) DO NOTHING;