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 <sldisek783@gmail.com>
Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: supalarry <laurisskraucis@gmail.com>
Co-authored-by: Keith Williams <keithwillcode@gmail.com>
This commit is contained in:
Morgan
2025-05-12 20:48:29 +00:00
committed by GitHub
co-authored by hbjORbj Somay Chauhan supalarry Keith Williams
parent ade64c0d09
commit 048e56806c
16 changed files with 218 additions and 46 deletions
+16 -16
View File
@@ -16992,14 +16992,14 @@
"type": {
"type": "string"
},
"value": {
"option": {
"type": "string"
},
"valueId": {
"optionId": {
"type": "string"
}
},
"required": ["id", "name", "type", "value", "valueId"]
"required": ["id", "name", "type", "option", "optionId"]
},
"NumberAttribute": {
"type": "object",
@@ -17013,14 +17013,14 @@
"type": {
"type": "string"
},
"value": {
"option": {
"type": "number"
},
"valueId": {
"optionId": {
"type": "string"
}
},
"required": ["id", "name", "type", "value", "valueId"]
"required": ["id", "name", "type", "option", "optionId"]
},
"SingleSelectAttribute": {
"type": "object",
@@ -17034,26 +17034,26 @@
"type": {
"type": "string"
},
"value": {
"option": {
"type": "string"
},
"valueId": {
"optionId": {
"type": "string"
}
},
"required": ["id", "name", "type", "value", "valueId"]
"required": ["id", "name", "type", "option", "optionId"]
},
"MultiSelectAttributeValue": {
"MultiSelectAttributeOption": {
"type": "object",
"properties": {
"valueId": {
"optionId": {
"type": "string"
},
"value": {
"option": {
"type": "string"
}
},
"required": ["valueId", "value"]
"required": ["optionId", "option"]
},
"MultiSelectAttribute": {
"type": "object",
@@ -17067,14 +17067,14 @@
"type": {
"type": "string"
},
"values": {
"options": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MultiSelectAttributeValue"
"$ref": "#/components/schemas/MultiSelectAttributeOption"
}
}
},
"required": ["id", "name", "type", "values"]
"required": ["id", "name", "type", "options"]
},
"MembershipUserOutputDto": {
"type": "object",