feat: add hostSubsetIds parameter for round robin host filtering (#25627)
* feat: add hostSubsetIds parameter for round robin host filtering Add support for filtering round robin event type hosts via API v2. When hostSubsetIds is provided, only the specified hosts are considered for availability calculation and booking assignment. Changes: - Add hostSubsetIds to slots API input (GET /slots/available) - Add hostSubsetIds to booking API input (POST /bookings) - Update _findQualifiedHostsWithDelegationCredentials to filter by hostSubsetIds - Pass hostSubsetIds through all layers: API -> tRPC -> slots/booking services This allows API consumers to request availability and create bookings for a subset of hosts within a round robin event type. Co-Authored-By: morgan@cal.com <morgan@cal.com> * chore: add e2e tests * chore: add enableHostSubset team event-type setting * fixup! chore: add enableHostSubset team event-type setting * fix tests * fix tests * improve isWithinRRHostSubset * rename to rrHost subset * fix ai review * fix: add booker platform wrapper rrHostSubsetIds prop --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
morgan@cal.com <morgan@cal.com>
Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
300b9c916d
commit
6b62557a92
@@ -3270,6 +3270,19 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rrHostSubsetIds",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "For round robin event types, filter available slots to only consider the specified subset of host user IDs. This allows you to get availability for specific hosts within a round robin event type.",
|
||||
"example": [1, 2, 3],
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "queueResponse",
|
||||
"required": false,
|
||||
@@ -6812,6 +6825,19 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rrHostSubsetIds",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "For round robin event types, filter available slots to only consider the specified subset of host user IDs. This allows you to get availability for specific hosts within a round robin event type.",
|
||||
"example": [1, 2, 3],
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "queueResponse",
|
||||
"required": false,
|
||||
@@ -13318,6 +13344,19 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rrHostSubsetIds",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "For round robin event types, filter available slots to only consider the specified subset of host user IDs. This allows you to get availability for specific hosts within a round robin event type.",
|
||||
"example": [1, 2, 3],
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "routingFormId",
|
||||
"required": true,
|
||||
@@ -13841,7 +13880,7 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A map of available slots indexed by date, where each date is associated with an array of time slots. If format=range is specified, each slot will be an object with start and end properties denoting start and end of the slot.\n For seated slots each object will have attendeesCount and bookingUid properties.\n If no slots are available, the data object will be empty {}.",
|
||||
"description": "A map of available slots indexed by date, where each date is associated with an array of time slots. If format=range is specified, each slot will be an object with start and end properties denoting start and end of the slot.\n For seated slots each object will have attendeesCount and bookingUid properties.\n If no slots are available, the data field will be an empty object {}.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
@@ -14452,7 +14491,7 @@
|
||||
},
|
||||
"get": {
|
||||
"operationId": "TeamsEventTypesController_getTeamEventTypes",
|
||||
"summary": "Get a team event type",
|
||||
"summary": "Get team event types",
|
||||
"description": "Use the optional `sortCreatedAt` query parameter to order results by creation date (by ID). Accepts \"asc\" (oldest first) or \"desc\" (newest first). When not provided, no explicit ordering is applied.",
|
||||
"parameters": [
|
||||
{
|
||||
@@ -19663,6 +19702,10 @@
|
||||
"rescheduleWithSameRoundRobinHost": {
|
||||
"type": "boolean",
|
||||
"description": "Rescheduled events will be assigned to the same host as initially scheduled."
|
||||
},
|
||||
"rrHostSubsetEnabled": {
|
||||
"type": "boolean",
|
||||
"description": "For round robin event types, enable filtering available hosts to only consider a specified subset of host user IDs. This allows you to book with specific hosts within a round robin event type."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -21676,6 +21719,10 @@
|
||||
"rescheduleWithSameRoundRobinHost": {
|
||||
"type": "boolean",
|
||||
"description": "Rescheduled events will be assigned to the same host as initially scheduled."
|
||||
},
|
||||
"rrHostSubsetEnabled": {
|
||||
"type": "boolean",
|
||||
"description": "For round robin event types, enable filtering available hosts to only consider a specified subset of host user IDs. This allows you to book with specific hosts within a round robin event type."
|
||||
}
|
||||
},
|
||||
"required": ["lengthInMinutes", "title", "slug", "schedulingType"]
|
||||
@@ -22139,6 +22186,10 @@
|
||||
"rescheduleWithSameRoundRobinHost": {
|
||||
"type": "boolean",
|
||||
"description": "Rescheduled events will be assigned to the same host as initially scheduled."
|
||||
},
|
||||
"rrHostSubsetEnabled": {
|
||||
"type": "boolean",
|
||||
"description": "For round robin event types, enable filtering available hosts to only consider a specified subset of host user IDs. This allows you to book with specific hosts within a round robin event type."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -27951,6 +28002,14 @@
|
||||
"type": "string",
|
||||
"description": "Email verification code required when event type has email verification enabled.",
|
||||
"example": "123456"
|
||||
},
|
||||
"rrHostSubsetIds": {
|
||||
"description": "For round robin event types, filter available hosts to only consider the specified subset of host user IDs. This allows you to book with specific hosts within a round robin event type.",
|
||||
"example": [1, 2, 3],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["start", "attendee"]
|
||||
@@ -28075,6 +28134,14 @@
|
||||
"description": "Email verification code required when event type has email verification enabled.",
|
||||
"example": "123456"
|
||||
},
|
||||
"rrHostSubsetIds": {
|
||||
"description": "For round robin event types, filter available hosts to only consider the specified subset of host user IDs. This allows you to book with specific hosts within a round robin event type.",
|
||||
"example": [1, 2, 3],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"instant": {
|
||||
"type": "boolean",
|
||||
"description": "Flag indicating if the booking is an instant booking. Only available for team events.",
|
||||
@@ -28203,6 +28270,14 @@
|
||||
"description": "Email verification code required when event type has email verification enabled.",
|
||||
"example": "123456"
|
||||
},
|
||||
"rrHostSubsetIds": {
|
||||
"description": "For round robin event types, filter available hosts to only consider the specified subset of host user IDs. This allows you to book with specific hosts within a round robin event type.",
|
||||
"example": [1, 2, 3],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"recurrenceCount": {
|
||||
"type": "number",
|
||||
"description": "The number of recurrences. If not provided then event type recurrence count will be used. Can't be more than\n event type recurrence count",
|
||||
@@ -29442,6 +29517,10 @@
|
||||
"example": "success",
|
||||
"enum": ["success", "error"]
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "This endpoint will require authentication in a future release."
|
||||
},
|
||||
"error": {
|
||||
"type": "object"
|
||||
},
|
||||
@@ -29469,6 +29548,10 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "This endpoint will require authentication in a future release."
|
||||
},
|
||||
"error": {
|
||||
"type": "object"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user