feat: v2 GET bookings updated at filters and sort (#19133)

* fix: make Booking.updatedAt update automatically

* feat: return updatedAt by bookings endpoints

* feat: GET bookings beforeUpdatedAt, afterUpdatedAt, sortUpdated params

* docs: api

* chore: bump platform-libraries

* refactor: sortUpdated -> sortUpdatedAt query param

* chore: delete wrong migration
This commit is contained in:
Lauris Skraucis
2025-02-11 08:39:50 +00:00
committed by GitHub
parent c211f181fc
commit 08bcc77e2c
14 changed files with 6261 additions and 95 deletions
+111 -4
View File
@@ -3285,6 +3285,26 @@
"type": "string"
}
},
{
"name": "afterUpdatedAt",
"required": false,
"in": "query",
"description": "Filter bookings that have been updated after this date string.",
"example": "?afterUpdatedAt=2025-03-07T10:00:00.000Z",
"schema": {
"type": "string"
}
},
{
"name": "beforeUpdatedAt",
"required": false,
"in": "query",
"description": "Filter bookings that have been updated before this date string.",
"example": "?beforeUpdatedAt=2025-03-14T11:00:00.000Z",
"schema": {
"type": "string"
}
},
{
"name": "sortStart",
"required": false,
@@ -3318,6 +3338,17 @@
"type": "string"
}
},
{
"name": "sortUpdatedAt",
"required": false,
"in": "query",
"description": "Sort results by their updated time (for example when booking status changes) in ascending or descending order.",
"example": "?sortUpdated=asc OR ?sortUpdated=desc",
"schema": {
"enum": ["asc", "desc"],
"type": "string"
}
},
{
"name": "take",
"required": false,
@@ -9736,8 +9767,7 @@
"description": "A valid URL where the booker will redirect to, once the booking is completed successfully",
"example": "https://masterchief.com/argentina/flan/video/9129412"
}
},
"required": ["lengthInMinutesOptions"]
}
},
"UpdateEventTypeOutput_2024_06_14": {
"type": "object",
@@ -11872,8 +11902,7 @@
"type": "boolean",
"description": "If true, all current and future team members will be assigned to this event type"
}
},
"required": ["lengthInMinutesOptions"]
}
},
"UpdateTeamEventTypeOutput": {
"type": "object",
@@ -13824,10 +13853,18 @@
"type": "string",
"example": "User requested cancellation"
},
"cancelledByEmail": {
"type": "string",
"example": "canceller@example.com"
},
"reschedulingReason": {
"type": "string",
"example": "User rescheduled the event"
},
"rescheduledByEmail": {
"type": "string",
"example": "rescheduler@example.com"
},
"rescheduledFromUid": {
"type": "string",
"example": "previous_uid_123"
@@ -13871,6 +13908,10 @@
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"updatedAt": {
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"metadata": {
"type": "object",
"example": {
@@ -13913,6 +13954,7 @@
"location",
"absentHost",
"createdAt",
"updatedAt",
"attendees",
"bookingFieldsResponses"
]
@@ -13951,10 +13993,18 @@
"type": "string",
"example": "User requested cancellation"
},
"cancelledByEmail": {
"type": "string",
"example": "canceller@example.com"
},
"reschedulingReason": {
"type": "string",
"example": "User rescheduled the event"
},
"rescheduledByEmail": {
"type": "string",
"example": "rescheduler@example.com"
},
"rescheduledFromUid": {
"type": "string",
"example": "previous_uid_123"
@@ -13998,6 +14048,10 @@
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"updatedAt": {
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"metadata": {
"type": "object",
"example": {
@@ -14044,6 +14098,7 @@
"location",
"absentHost",
"createdAt",
"updatedAt",
"attendees",
"bookingFieldsResponses",
"recurringBookingUid"
@@ -14174,10 +14229,18 @@
"type": "string",
"example": "User requested cancellation"
},
"cancelledByEmail": {
"type": "string",
"example": "canceller@example.com"
},
"reschedulingReason": {
"type": "string",
"example": "User rescheduled the event"
},
"rescheduledByEmail": {
"type": "string",
"example": "rescheduler@example.com"
},
"rescheduledFromUid": {
"type": "string",
"example": "previous_uid_123"
@@ -14221,6 +14284,10 @@
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"updatedAt": {
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"metadata": {
"type": "object",
"example": {
@@ -14253,6 +14320,7 @@
"location",
"absentHost",
"createdAt",
"updatedAt",
"seatUid",
"attendees"
]
@@ -14291,10 +14359,18 @@
"type": "string",
"example": "User requested cancellation"
},
"cancelledByEmail": {
"type": "string",
"example": "canceller@example.com"
},
"reschedulingReason": {
"type": "string",
"example": "User rescheduled the event"
},
"rescheduledByEmail": {
"type": "string",
"example": "rescheduler@example.com"
},
"rescheduledFromUid": {
"type": "string",
"example": "previous_uid_123"
@@ -14338,6 +14414,10 @@
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"updatedAt": {
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"metadata": {
"type": "object",
"example": {
@@ -14374,6 +14454,7 @@
"location",
"absentHost",
"createdAt",
"updatedAt",
"seatUid",
"attendees",
"recurringBookingUid"
@@ -14447,10 +14528,18 @@
"type": "string",
"example": "User requested cancellation"
},
"cancelledByEmail": {
"type": "string",
"example": "canceller@example.com"
},
"reschedulingReason": {
"type": "string",
"example": "User rescheduled the event"
},
"rescheduledByEmail": {
"type": "string",
"example": "rescheduler@example.com"
},
"rescheduledFromUid": {
"type": "string",
"example": "previous_uid_123"
@@ -14494,6 +14583,10 @@
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"updatedAt": {
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"metadata": {
"type": "object",
"example": {
@@ -14522,6 +14615,7 @@
"location",
"absentHost",
"createdAt",
"updatedAt",
"attendees"
]
},
@@ -14559,10 +14653,18 @@
"type": "string",
"example": "User requested cancellation"
},
"cancelledByEmail": {
"type": "string",
"example": "canceller@example.com"
},
"reschedulingReason": {
"type": "string",
"example": "User rescheduled the event"
},
"rescheduledByEmail": {
"type": "string",
"example": "rescheduler@example.com"
},
"rescheduledFromUid": {
"type": "string",
"example": "previous_uid_123"
@@ -14606,6 +14708,10 @@
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"updatedAt": {
"type": "string",
"example": "2024-08-13T15:30:00Z"
},
"metadata": {
"type": "object",
"example": {
@@ -14638,6 +14744,7 @@
"location",
"absentHost",
"createdAt",
"updatedAt",
"attendees",
"recurringBookingUid"
]