feat: v2 get slots using teamSlug + eventTypeSlug + optional organizationSlug (#20554)

* feat: allow teamSlug + eventTypeSlug + optional organizationSlug as input

* feat: return team event slots

* test: get slots using teamSlug + eventTypeSlug + optional organizationalSlug

* docs: how to get team event slots
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2025-04-16 18:29:47 +03:00
1 parent 7b8bbaaa86
commit 7ef1050946
13 files changed
+302 -49

No files matched your search

+21 -5
View File
@@ -3304,7 +3304,7 @@
},
"get": {
"operationId": "OrganizationsEventTypesController_getTeamEventTypes",
"summary": "Get a team event type",
"summary": "Get team event types",
"parameters": [
{
"name": "Authorization",
@@ -7046,6 +7046,14 @@
"type": "string"
}
},
{
"name": "isDryRun",
"required": true,
"in": "query",
"schema": {
"type": "boolean"
}
},
{
"name": "redir",
"required": false,
@@ -9057,7 +9065,7 @@
"get": {
"operationId": "SlotsController_2024_09_04_getAvailableSlots",
"summary": "Find out when is an event type ready to be booked.",
"description": "\n There are 4 ways to get available slots:\n \n 1. By event type id. Event type id can be of user and team event types. Example '/v2/slots?eventTypeId=10&start=2050-09-05&end=2050-09-06&timeZone=Europe/Rome'\n\n 2. By event type slug + username. Example '/v2/slots?eventTypeSlug=intro&username=bob&start=2050-09-05&end=2050-09-06'\n\n 3. By event type slug + username + organization slug when searching within an organization. Example '/v2/slots?organizationSlug=org-slug&eventTypeSlug=intro&username=bob&start=2050-09-05&end=2050-09-06'\n\n 4. By usernames only (used for dynamic event type - there is no specific event but you want to know when 2 or more people are available). Example '/v2/slots?usernames=alice,bob&username=bob&organizationSlug=org-slug&start=2050-09-05&end=2050-09-06'. As you see you also need to provide the slug of the organization to which each user in the 'usernames' array belongs.\n\n All of them require \"start\" and \"end\" query parameters which define the time range for which available slots should be checked.\n Optional parameters are:\n - timeZone: Time zone in which the available slots should be returned. Defaults to UTC.\n - duration: Only use for event types that allow multiple durations or for dynamic event types. If not passed for multiple duration event types defaults to default duration. For dynamic event types defaults to 30 aka each returned slot is 30 minutes long. So duration=60 means that returned slots will be each 60 minutes long.\n - slotFormat: Format of the slots. By default return is an object where each key is date and value is array of slots as string. If you want to get start and end of each slot use \"range\" as value.\n ",
"description": "\n There are 4 ways to get available slots for event type of an individual user:\n \n 1. By event type id. Event type id can be of user and team event types. Example '/v2/slots?eventTypeId=10&start=2050-09-05&end=2050-09-06&timeZone=Europe/Rome'\n\n 2. By event type slug + username. Example '/v2/slots?eventTypeSlug=intro&username=bob&start=2050-09-05&end=2050-09-06'\n\n 3. By event type slug + username + organization slug when searching within an organization. Example '/v2/slots?organizationSlug=org-slug&eventTypeSlug=intro&username=bob&start=2050-09-05&end=2050-09-06'\n\n 4. By usernames only (used for dynamic event type - there is no specific event but you want to know when 2 or more people are available). Example '/v2/slots?usernames=alice,bob&username=bob&organizationSlug=org-slug&start=2050-09-05&end=2050-09-06'. As you see you also need to provide the slug of the organization to which each user in the 'usernames' array belongs.\n\n And 3 ways to get available slots for team event type:\n\n 1. By team event type id. Example '/v2/slots?teamEventTypeId=10&start=2050-09-05&end=2050-09-06&timeZone=Europe/Rome'\n\n 2. By team event type slug + team slug. Example '/v2/slots?eventTypeSlug=intro&teamSlug=team-slug&start=2050-09-05&end=2050-09-06'\n\n 3. By team event type slug + team slug + organization slug when searching within an organization. Example '/v2/slots?organizationSlug=org-slug&eventTypeSlug=intro&teamSlug=team-slug&start=2050-09-05&end=2050-09-06'\n\n All of them require \"start\" and \"end\" query parameters which define the time range for which available slots should be checked.\n Optional parameters are:\n - timeZone: Time zone in which the available slots should be returned. Defaults to UTC.\n - duration: Only use for event types that allow multiple durations or for dynamic event types. If not passed for multiple duration event types defaults to default duration. For dynamic event types defaults to 30 aka each returned slot is 30 minutes long. So duration=60 means that returned slots will be each 60 minutes long.\n - slotFormat: Format of the slots. By default return is an object where each key is date and value is array of slots as string. If you want to get start and end of each slot use \"range\" as value.\n ",
"parameters": [
{
"name": "cal-api-version",
@@ -9089,15 +9097,23 @@
"name": "organizationSlug",
"required": false,
"in": "query",
"description": "The slug of the organization to which user with username belongs.",
"description": "The slug of the organization to which user with username belongs or team with teamSlug belongs.",
"example": "org-slug",
"schema": {}
},
{
"name": "teamSlug",
"required": false,
"in": "query",
"description": "The slug of the team who owns event type with eventTypeSlug - used when slots are checked for team event type.",
"example": "team-slug",
"schema": {}
},
{
"name": "username",
"required": false,
"in": "query",
"description": "The username of the user to get event types for.",
"description": "The username of the user who owns event type with eventTypeSlug - used when slots are checked for individual user event type.",
"example": "bob",
"schema": {}
},
@@ -9105,7 +9121,7 @@
"name": "eventTypeSlug",
"required": false,
"in": "query",
"description": "The slug of the event type for which available slots should be checked. If slug is provided then username must be provided too and if relevant organizationSlug too.",
"description": "The slug of the event type for which available slots should be checked. If slug is provided then username or teamSlug must be provided too and if relevant organizationSlug too.",
"example": "event-type-slug",
"schema": {}
},