Skip to content

Commit e237749

Browse files
devin-ai-integration[bot]ThyMinimalDevibex088
authored
fix: gracefully handle calendar failures when bypassBusyCalendarTimes is enabled (calcom#23061)
* fix: gracefully handle calendar failures when bypassBusyCalendarTimes is enabled - When _bypassCalendarBusyTimes parameter is true and third-party calendar fetching fails - System now falls back to internal bookings only instead of throwing error - Maintains existing error behavior when bypass is disabled Co-Authored-By: morgan@cal.com <morgan@cal.com> * feat: add _silentCalendarFailures parameter to handle calendar failures gracefully - Add silentlyHandleCalendarFailures parameter to getBusyTimes service - Add _silentCalendarFailures parameter to getUserAvailability schema - Add _silentCalendarFailures parameter to tRPC slots endpoint - Add _silentCalendarFailures parameter to API v2 slots/available endpoint - Parameter attempts calendar calls first, falls back silently on failure - Different from bypassCalendarBusyTimes which skips calendar calls entirely Co-Authored-By: morgan@cal.com <morgan@cal.com> * refactor: remove bypassBusyCalendarTimes logic from error handling - Keep only silentlyHandleCalendarFailures logic in getBusyTimes error handling - Remove redundant bypassBusyCalendarTimes condition from calendar failure handling - Maintain existing bypassBusyCalendarTimes logic that skips calendar calls entirely Co-Authored-By: morgan@cal.com <morgan@cal.com> * feat: add silentlyHandleCalendarFailures prop to Booker atom - Pass silentlyHandleCalendarFailures prop from BookerPlatformWrapper to useAvailableSlots - Forward prop as _silentCalendarFailures parameter to API v2 slots/available endpoint - Complete the parameter flow from Booker atom to underlying service layer - Enables silent handling of calendar provider failures in Booker component Co-Authored-By: morgan@cal.com <morgan@cal.com> * chore: fix type and bump library * chore: bump library --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: morgan@cal.com <morgan@cal.com> Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com> Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
1 parent 994a36d commit e237749

11 files changed

Lines changed: 99 additions & 299 deletions

File tree

apps/api/v2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@axiomhq/winston": "^1.2.0",
3939
"@calcom/platform-constants": "*",
4040
"@calcom/platform-enums": "*",
41-
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.306",
41+
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.311",
4242
"@calcom/platform-types": "*",
4343
"@calcom/platform-utils": "*",
4444
"@calcom/prisma": "*",

docs/api-reference/v2/openapi.json

Lines changed: 10 additions & 242 deletions
Original file line numberDiff line numberDiff line change
@@ -4264,9 +4264,7 @@
42644264
}
42654265
}
42664266
},
4267-
"tags": [
4268-
"Orgs / Teams / Event Types / Private Links"
4269-
]
4267+
"tags": ["Orgs / Teams / Event Types / Private Links"]
42704268
},
42714269
"get": {
42724270
"operationId": "OrganizationsEventTypesPrivateLinksController_getPrivateLinks",
@@ -4328,9 +4326,7 @@
43284326
}
43294327
}
43304328
},
4331-
"tags": [
4332-
"Orgs / Teams / Event Types / Private Links"
4333-
]
4329+
"tags": ["Orgs / Teams / Event Types / Private Links"]
43344330
}
43354331
},
43364332
"/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/private-links/{linkId}": {
@@ -4402,9 +4398,7 @@
44024398
}
44034399
}
44044400
},
4405-
"tags": [
4406-
"Orgs / Teams / Event Types / Private Links"
4407-
]
4401+
"tags": ["Orgs / Teams / Event Types / Private Links"]
44084402
},
44094403
"delete": {
44104404
"operationId": "OrganizationsEventTypesPrivateLinksController_deletePrivateLink",
@@ -4474,9 +4468,7 @@
44744468
}
44754469
}
44764470
},
4477-
"tags": [
4478-
"Orgs / Teams / Event Types / Private Links"
4479-
]
4471+
"tags": ["Orgs / Teams / Event Types / Private Links"]
44804472
}
44814473
},
44824474
"/v2/organizations/{orgId}/teams/{teamId}/memberships": {
@@ -22121,13 +22113,7 @@
2212122113
"example": "2025-12-31T23:59:59.000Z"
2212222114
}
2212322115
},
22124-
"required": [
22125-
"linkId",
22126-
"eventTypeId",
22127-
"isExpired",
22128-
"bookingUrl",
22129-
"expiresAt"
22130-
]
22116+
"required": ["linkId", "eventTypeId", "isExpired", "bookingUrl", "expiresAt"]
2213122117
},
2213222118
"UsageBasedPrivateLinkOutput": {
2213322119
"type": "object",
@@ -22164,14 +22150,7 @@
2216422150
"example": 3
2216522151
}
2216622152
},
22167-
"required": [
22168-
"linkId",
22169-
"eventTypeId",
22170-
"isExpired",
22171-
"bookingUrl",
22172-
"maxUsageCount",
22173-
"usageCount"
22174-
]
22153+
"required": ["linkId", "eventTypeId", "isExpired", "bookingUrl", "maxUsageCount", "usageCount"]
2217522154
},
2217622155
"CreatePrivateLinkOutput": {
2217722156
"type": "object",
@@ -22193,10 +22172,7 @@
2219322172
]
2219422173
}
2219522174
},
22196-
"required": [
22197-
"status",
22198-
"data"
22199-
]
22175+
"required": ["status", "data"]
2220022176
},
2220122177
"GetPrivateLinksOutput": {
2220222178
"type": "object",
@@ -22221,10 +22197,7 @@
2222122197
}
2222222198
}
2222322199
},
22224-
"required": [
22225-
"status",
22226-
"data"
22227-
]
22200+
"required": ["status", "data"]
2222822201
},
2222922202
"UpdatePrivateLinkOutput": {
2223022203
"type": "object",
@@ -22246,10 +22219,7 @@
2224622219
]
2224722220
}
2224822221
},
22249-
"required": [
22250-
"status",
22251-
"data"
22252-
]
22222+
"required": ["status", "data"]
2225322223
},
2225422224
"DeletePrivateLinkOutput": {
2225522225
"type": "object",
@@ -22274,10 +22244,7 @@
2227422244
}
2227522245
}
2227622246
},
22277-
"required": [
22278-
"status",
22279-
"data"
22280-
]
22247+
"required": ["status", "data"]
2228122248
},
2228222249
"StripConnectOutputDto": {
2228322250
"type": "object",
@@ -26267,205 +26234,6 @@
2626726234
},
2626826235
"required": ["status", "data"]
2626926236
},
26270-
"CreatePrivateLinkInput": {
26271-
"type": "object",
26272-
"properties": {
26273-
"expiresAt": {
26274-
"type": "string",
26275-
"description": "Expiration date for time-based links",
26276-
"format": "date-time",
26277-
"example": "2024-12-31T23:59:59.000Z"
26278-
},
26279-
"maxUsageCount": {
26280-
"type": "number",
26281-
"description": "Maximum number of times the link can be used. If omitted and expiresAt is not provided, defaults to 1 (one time use).",
26282-
"example": 10,
26283-
"minimum": 1,
26284-
"default": 1
26285-
}
26286-
}
26287-
},
26288-
"TimeBasedPrivateLinkOutput": {
26289-
"type": "object",
26290-
"properties": {
26291-
"linkId": {
26292-
"type": "string",
26293-
"description": "The private link ID",
26294-
"example": "abc123def456"
26295-
},
26296-
"eventTypeId": {
26297-
"type": "number",
26298-
"description": "Event type ID this link belongs to",
26299-
"example": 123
26300-
},
26301-
"isExpired": {
26302-
"type": "boolean",
26303-
"description": "Whether the link is currently expired",
26304-
"example": false
26305-
},
26306-
"bookingUrl": {
26307-
"type": "string",
26308-
"description": "Full booking URL for this private link",
26309-
"format": "uri",
26310-
"example": "https://cal.com/d/abc123def456/30min"
26311-
},
26312-
"expiresAt": {
26313-
"type": "string",
26314-
"description": "Expiration date for this time-based link",
26315-
"format": "date-time",
26316-
"example": "2025-12-31T23:59:59.000Z"
26317-
}
26318-
},
26319-
"required": ["linkId", "eventTypeId", "isExpired", "bookingUrl", "expiresAt"]
26320-
},
26321-
"UsageBasedPrivateLinkOutput": {
26322-
"type": "object",
26323-
"properties": {
26324-
"linkId": {
26325-
"type": "string",
26326-
"description": "The private link ID",
26327-
"example": "abc123def456"
26328-
},
26329-
"eventTypeId": {
26330-
"type": "number",
26331-
"description": "Event type ID this link belongs to",
26332-
"example": 123
26333-
},
26334-
"isExpired": {
26335-
"type": "boolean",
26336-
"description": "Whether the link is currently expired",
26337-
"example": false
26338-
},
26339-
"bookingUrl": {
26340-
"type": "string",
26341-
"description": "Full booking URL for this private link",
26342-
"format": "uri",
26343-
"example": "https://cal.com/d/abc123def456/30min"
26344-
},
26345-
"maxUsageCount": {
26346-
"type": "number",
26347-
"description": "Maximum number of times this link can be used",
26348-
"example": 10
26349-
},
26350-
"usageCount": {
26351-
"type": "number",
26352-
"description": "Current usage count for this link",
26353-
"example": 3
26354-
}
26355-
},
26356-
"required": ["linkId", "eventTypeId", "isExpired", "bookingUrl", "maxUsageCount", "usageCount"]
26357-
},
26358-
"CreatePrivateLinkOutput": {
26359-
"type": "object",
26360-
"properties": {
26361-
"status": {
26362-
"type": "string",
26363-
"description": "Response status",
26364-
"example": "success"
26365-
},
26366-
"data": {
26367-
"description": "Created private link data (either time-based or usage-based)",
26368-
"oneOf": [
26369-
{
26370-
"$ref": "#/components/schemas/TimeBasedPrivateLinkOutput"
26371-
},
26372-
{
26373-
"$ref": "#/components/schemas/UsageBasedPrivateLinkOutput"
26374-
}
26375-
]
26376-
}
26377-
},
26378-
"required": ["status", "data"]
26379-
},
26380-
"GetPrivateLinksOutput": {
26381-
"type": "object",
26382-
"properties": {
26383-
"status": {
26384-
"type": "string",
26385-
"description": "Response status",
26386-
"example": "success"
26387-
},
26388-
"data": {
26389-
"type": "array",
26390-
"description": "Array of private links for the event type (mix of time-based and usage-based)",
26391-
"items": {
26392-
"oneOf": [
26393-
{
26394-
"$ref": "#/components/schemas/TimeBasedPrivateLinkOutput"
26395-
},
26396-
{
26397-
"$ref": "#/components/schemas/UsageBasedPrivateLinkOutput"
26398-
}
26399-
]
26400-
}
26401-
}
26402-
},
26403-
"required": ["status", "data"]
26404-
},
26405-
"UpdatePrivateLinkBody": {
26406-
"type": "object",
26407-
"properties": {
26408-
"expiresAt": {
26409-
"format": "date-time",
26410-
"type": "string",
26411-
"description": "New expiration date for time-based links",
26412-
"example": "2024-12-31T23:59:59.000Z"
26413-
},
26414-
"maxUsageCount": {
26415-
"type": "number",
26416-
"description": "New maximum number of times the link can be used",
26417-
"example": 10,
26418-
"minimum": 1
26419-
}
26420-
}
26421-
},
26422-
"UpdatePrivateLinkOutput": {
26423-
"type": "object",
26424-
"properties": {
26425-
"status": {
26426-
"type": "string",
26427-
"description": "Response status",
26428-
"example": "success"
26429-
},
26430-
"data": {
26431-
"description": "Updated private link data (either time-based or usage-based)",
26432-
"oneOf": [
26433-
{
26434-
"$ref": "#/components/schemas/TimeBasedPrivateLinkOutput"
26435-
},
26436-
{
26437-
"$ref": "#/components/schemas/UsageBasedPrivateLinkOutput"
26438-
}
26439-
]
26440-
}
26441-
},
26442-
"required": ["status", "data"]
26443-
},
26444-
"DeletePrivateLinkOutput": {
26445-
"type": "object",
26446-
"properties": {
26447-
"status": {
26448-
"type": "string",
26449-
"description": "Response status",
26450-
"example": "success"
26451-
},
26452-
"data": {
26453-
"type": "object",
26454-
"description": "Deleted link information",
26455-
"properties": {
26456-
"linkId": {
26457-
"type": "string",
26458-
"example": "abc123def456"
26459-
},
26460-
"message": {
26461-
"type": "string",
26462-
"example": "Private link deleted successfully"
26463-
}
26464-
}
26465-
}
26466-
},
26467-
"required": ["status", "data"]
26468-
},
2646926237
"UserWebhookOutputDto": {
2647026238
"type": "object",
2647126239
"properties": {

0 commit comments

Comments
 (0)