feat: v2 api phone based organization team event types (#20134)

* refactor: input event types service remove unused code

* feat: toggle if email field is hidden

* chore: ensure event type has email or attendee phone field required

* chore: ensure non-org team cant have phone only event type

* chore: ensure users cant have phone only event type

* chore: ensure org team can have phone only event type

* chore: bump libraries

* docs

* refactor: confirm failing test response message

* fix: unit test

* chore: default organizer booking location docs

---------

Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
This commit is contained in:
Lauris Skraucis
2025-03-18 11:34:35 +02:00
committed by GitHub
co-authored by Morgan
parent e9f20b1a0b
commit 94a26031a8
21 changed files with 6243 additions and 110 deletions
+56 -6
View File
@@ -3552,6 +3552,26 @@
"type": "string"
}
},
{
"name": "afterCreatedAt",
"required": false,
"in": "query",
"description": "Filter bookings that have been created after this date string.",
"example": "?afterCreatedAt=2025-03-07T10:00:00.000Z",
"schema": {
"type": "string"
}
},
{
"name": "beforeCreatedAt",
"required": false,
"in": "query",
"description": "Filter bookings that have been created before this date string.",
"example": "?beforeCreatedAt=2025-03-14T11:00:00.000Z",
"schema": {
"type": "string"
}
},
{
"name": "afterUpdatedAt",
"required": false,
@@ -7731,7 +7751,7 @@
},
"slug": {
"type": "string",
"description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking",
"description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking. Special slug is `attendeePhoneNumber` - if you create\n a phone input field with this slug for organization team event type you can create an organization team event type that can be booked using phone without requiring an email by setting {\"type\": \"email\", \"required\": false, \"hidden\": true} to the email booking field input in the request body.",
"example": "some-slug"
},
"label": {
@@ -8424,7 +8444,12 @@
"type": "string"
},
"required": {
"type": "object"
"type": "object",
"description": "Can be set to false only for organization team event types and if you also pass booking field {type: \"phone\", slug: \"attendeePhoneNumber\", required: true, hidden: false, label: \"whatever label\"} of booking field type PhoneFieldInput_2024_06_14 - this is done\n to enable phone only bookings where during the booking attendee can provide only their phone number and not provide email, so you must pass to the email booking field {hidden: true, required: false}.\n If true show under event type settings but don't show this booking field in the Booker. If false show in both."
},
"hidden": {
"type": "boolean",
"description": "Can be set to true only for organization team event types and if you also pass booking field {type: \"phone\", slug: \"attendeePhoneNumber\", required: true, hidden: false, label: \"whatever label\"} of booking field type PhoneFieldInput_2024_06_14 - this is done\n to enable phone only bookings where during the booking attendee can provide only their phone number and not provide email, so you must pass to the email booking field {hidden: true, required: false}.\n If true show under event type settings but don't show this booking field in the Booker. If false show in both."
},
"placeholder": {
"type": "string"
@@ -8434,7 +8459,7 @@
"description": "Disable this booking field if the URL contains query parameter with key equal to the slug and prefill it with the provided value. For example, if URL contains query parameter `&email=bob@gmail.com`, the email field will be prefilled with this value and disabled."
}
},
"required": ["type", "label", "required", "placeholder"]
"required": ["type", "label", "placeholder"]
},
"TitleDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -9100,7 +9125,12 @@
},
"required": {
"type": "object",
"default": true
"default": true,
"description": "Can be set to false only for organization team event types and if you also pass booking field {type: \"phone\", slug: \"attendeePhoneNumber\", required: true, hidden: false, label: \"whatever label\"} of booking field type PhoneFieldInput_2024_06_14 - this is done\n to enable phone only bookings where during the booking attendee can provide only their phone number and not provide email, so you must pass to the email booking field {hidden: true, required: false}.\n If true show under event type settings but don't show this booking field in the Booker. If false show in both."
},
"hidden": {
"type": "boolean",
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both. Can only be hidden\n for organization team event types when also providing attendee phone number booking field."
},
"placeholder": {
"type": "string"
@@ -9120,7 +9150,7 @@
"default": "email"
}
},
"required": ["type", "required", "isDefault", "slug"]
"required": ["type", "isDefault", "slug"]
},
"NameDefaultFieldOutput_2024_06_14": {
"type": "object",
@@ -9787,7 +9817,7 @@
},
"slug": {
"type": "string",
"description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking",
"description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking. Special slug is `attendeePhoneNumber` - if you create\n a phone input field with this slug for organization team event type you can create an organization team event type that can be booked using phone without requiring an email by setting {\"type\": \"email\", \"required\": false, \"hidden\": true} to the email booking field input in the request body.",
"example": "some-slug"
},
"label": {
@@ -14829,6 +14859,17 @@
},
"required": ["type"]
},
"BookingInputOrganizersDefaultAppLocation_2024_08_13": {
"type": "object",
"properties": {
"type": {
"type": "string",
"example": "organizersDefaultApp",
"description": "only available for team event types and the only allowed value for type is `organizersDefaultApp` - it refers to the default app defined by the organizer."
}
},
"required": ["type"]
},
"ValidateBookingLocation_2024_08_13": {
"type": "object",
"properties": {}
@@ -14972,6 +15013,9 @@
},
{
"$ref": "#/components/schemas/BookingInputPhoneLocation_2024_08_13"
},
{
"$ref": "#/components/schemas/BookingInputOrganizersDefaultAppLocation_2024_08_13"
}
]
},
@@ -15055,6 +15099,9 @@
},
{
"$ref": "#/components/schemas/BookingInputPhoneLocation_2024_08_13"
},
{
"$ref": "#/components/schemas/BookingInputOrganizersDefaultAppLocation_2024_08_13"
}
]
},
@@ -15143,6 +15190,9 @@
},
{
"$ref": "#/components/schemas/BookingInputPhoneLocation_2024_08_13"
},
{
"$ref": "#/components/schemas/BookingInputOrganizersDefaultAppLocation_2024_08_13"
}
]
},