fix: Booker atom default booking fields (#18275)

* refactor: rename transformBookingFieldsApiToInternal to transformBookingFieldsApiRequestToInternal

* refactor: default booking fields can required or not required

* fix: render system fields in booker

* fix: hidden property of booking fields

* fix: default field labels and placeholders

* chore: bump platform libraries

* fix: tests

* fix: e2e tests
This commit is contained in:
Lauris Skraucis
2024-12-19 16:30:14 +00:00
committed by GitHub
parent 0b2f09ab7d
commit f0d7a757d4
16 changed files with 6944 additions and 215 deletions
+175 -27
View File
@@ -6568,9 +6568,13 @@
"disableOnPrefill": {
"type": "boolean",
"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 the slug is `phone` and the URL contains query parameter `&phone=1234567890`, the phone field will be prefilled with this value and disabled."
},
"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."
}
},
"required": ["type", "slug", "label", "required", "placeholder"]
"required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"AddressFieldInput_2024_06_14": {
"type": "object",
@@ -6599,9 +6603,13 @@
"disableOnPrefill": {
"type": "boolean",
"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 the slug is `address` and the URL contains query parameter `&address=1234 Main St, London`, the address field will be prefilled with this value and disabled."
},
"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."
}
},
"required": ["type", "slug", "label", "required", "placeholder"]
"required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"TextFieldInput_2024_06_14": {
"type": "object",
@@ -6630,9 +6638,13 @@
"disableOnPrefill": {
"type": "boolean",
"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 the slug is `who-referred-you` and the URL contains query parameter `&who-referred-you=bob`, the text field will be prefilled with this value and disabled."
},
"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."
}
},
"required": ["type", "slug", "label", "required", "placeholder"]
"required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"NumberFieldInput_2024_06_14": {
"type": "object",
@@ -6661,9 +6673,13 @@
"disableOnPrefill": {
"type": "boolean",
"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 the slug is `calories-per-day` and the URL contains query parameter `&calories-per-day=3000`, the number field will be prefilled with this value and disabled."
},
"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."
}
},
"required": ["type", "slug", "label", "required", "placeholder"]
"required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"TextAreaFieldInput_2024_06_14": {
"type": "object",
@@ -6692,9 +6708,13 @@
"disableOnPrefill": {
"type": "boolean",
"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 the slug is `dear-diary` and the URL contains query parameter `&dear-diary=Today I shipped a feature`, the text area will be prefilled with this value and disabled."
},
"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."
}
},
"required": ["type", "slug", "label", "required", "placeholder"]
"required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"SelectFieldInput_2024_06_14": {
"type": "object",
@@ -6730,9 +6750,13 @@
"disableOnPrefill": {
"type": "boolean",
"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 the slug is `language` and options of this select field are ['english', 'italian'] and the URL contains query parameter `&language=italian`, the 'italian' will be selected and the select field will be disabled."
},
"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."
}
},
"required": ["type", "slug", "label", "required", "placeholder", "options"]
"required": ["type", "slug", "label", "required", "placeholder", "options", "hidden"]
},
"MultiSelectFieldInput_2024_06_14": {
"type": "object",
@@ -6764,9 +6788,13 @@
"disableOnPrefill": {
"type": "boolean",
"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 the slug is `consultants` and the URL contains query parameter `&consultants=en&language=it`, the 'en' and 'it' will be selected and the select field will be disabled."
},
"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."
}
},
"required": ["type", "slug", "label", "required", "options"]
"required": ["type", "slug", "label", "required", "options", "hidden"]
},
"MultiEmailFieldInput_2024_06_14": {
"type": "object",
@@ -6795,9 +6823,13 @@
"disableOnPrefill": {
"type": "boolean",
"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 the slug is `consultants` and the URL contains query parameter `&consultants=alice@gmail.com&consultants=bob@gmail.com`, the these emails will be added and none more can be added."
},
"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."
}
},
"required": ["type", "slug", "label", "required", "placeholder"]
"required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"CheckboxGroupFieldInput_2024_06_14": {
"type": "object",
@@ -6829,9 +6861,13 @@
"disableOnPrefill": {
"type": "boolean",
"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 the slug is `notify-me` and the URL contains query parameter `&notify-me=true`, the checkbox will be selected and the checkbox field will be disabled."
},
"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."
}
},
"required": ["type", "slug", "label", "required", "options"]
"required": ["type", "slug", "label", "required", "options", "hidden"]
},
"RadioGroupFieldInput_2024_06_14": {
"type": "object",
@@ -6863,9 +6899,13 @@
"disableOnPrefill": {
"type": "boolean",
"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 the slug is `language` and options of this select field are ['english', 'italian'] and the URL contains query parameter `&language=italian`, the 'italian' radio buttom will be selected and the select field will be disabled."
},
"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."
}
},
"required": ["type", "slug", "label", "required", "options"]
"required": ["type", "slug", "label", "required", "options", "hidden"]
},
"BooleanFieldInput_2024_06_14": {
"type": "object",
@@ -6889,9 +6929,13 @@
},
"disableOnPrefill": {
"type": "boolean"
},
"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."
}
},
"required": ["type", "slug", "label", "required"]
"required": ["type", "slug", "label", "required", "hidden"]
},
"BusinessDaysWindow_2024_06_14": {
"type": "object",
@@ -7782,9 +7826,13 @@
},
"required": {
"type": "boolean"
},
"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."
}
},
"required": ["isDefault", "slug", "type", "required"]
"required": ["isDefault", "slug", "type", "required", "hidden"]
},
"RescheduleReasonDefaultFieldOutput_2024_06_14": {
"type": "object",
@@ -7805,9 +7853,23 @@
},
"required": {
"type": "boolean"
},
"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."
},
"label": {
"type": "string"
},
"placeholder": {
"type": "string"
},
"disableOnPrefill": {
"type": "boolean",
"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 `&rescheduleReason=busy`, the reschedule reason field will be prefilled with this value and disabled."
}
},
"required": ["isDefault", "slug", "type", "required"]
"required": ["isDefault", "slug", "type", "required", "hidden", "disableOnPrefill"]
},
"TitleDefaultFieldOutput_2024_06_14": {
"type": "object",
@@ -7828,9 +7890,23 @@
},
"required": {
"type": "boolean"
},
"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."
},
"label": {
"type": "string"
},
"placeholder": {
"type": "string"
},
"disableOnPrefill": {
"type": "boolean",
"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 `&title=masterclass`, the title field will be prefilled with this value and disabled."
}
},
"required": ["isDefault", "slug", "type", "required"]
"required": ["isDefault", "slug", "type", "required", "hidden", "disableOnPrefill"]
},
"NotesDefaultFieldOutput_2024_06_14": {
"type": "object",
@@ -7851,9 +7927,23 @@
},
"required": {
"type": "boolean"
},
"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."
},
"label": {
"type": "string"
},
"placeholder": {
"type": "string"
},
"disableOnPrefill": {
"type": "boolean",
"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 `&notes=hello`, the notes field will be prefilled with this value and disabled."
}
},
"required": ["isDefault", "slug", "type", "required"]
"required": ["isDefault", "slug", "type", "required", "hidden", "disableOnPrefill"]
},
"GuestsDefaultFieldOutput_2024_06_14": {
"type": "object",
@@ -7874,9 +7964,23 @@
},
"required": {
"type": "boolean"
},
"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."
},
"label": {
"type": "string"
},
"placeholder": {
"type": "string"
},
"disableOnPrefill": {
"type": "boolean",
"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 `&guests=lauris@cal.com`, the guests field will be prefilled with this value and disabled."
}
},
"required": ["isDefault", "slug", "type", "required"]
"required": ["isDefault", "slug", "type", "required", "hidden", "disableOnPrefill"]
},
"AddressFieldOutput_2024_06_14": {
"type": "object",
@@ -7921,6 +8025,10 @@
"type": "boolean",
"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 the slug is `address` and the URL contains query parameter `&address=1234 Main St, London`, the address field will be prefilled with this value and disabled."
},
"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."
},
"isDefault": {
"type": "object",
"default": false,
@@ -7928,7 +8036,7 @@
"example": false
}
},
"required": ["type", "slug", "label", "required", "isDefault"]
"required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"BooleanFieldOutput_2024_06_14": {
"type": "object",
@@ -7968,6 +8076,10 @@
"disableOnPrefill": {
"type": "boolean"
},
"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."
},
"isDefault": {
"type": "object",
"default": false,
@@ -7975,7 +8087,7 @@
"example": false
}
},
"required": ["type", "slug", "label", "required", "isDefault"]
"required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"CheckboxGroupFieldOutput_2024_06_14": {
"type": "object",
@@ -8023,6 +8135,10 @@
"type": "boolean",
"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 the slug is `notify-me` and the URL contains query parameter `&notify-me=true`, the checkbox will be selected and the checkbox field will be disabled."
},
"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."
},
"isDefault": {
"type": "object",
"default": false,
@@ -8030,7 +8146,7 @@
"example": false
}
},
"required": ["type", "slug", "label", "required", "options", "isDefault"]
"required": ["type", "slug", "label", "required", "options", "hidden", "isDefault"]
},
"MultiEmailFieldOutput_2024_06_14": {
"type": "object",
@@ -8075,6 +8191,10 @@
"type": "boolean",
"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 the slug is `consultants` and the URL contains query parameter `&consultants=alice@gmail.com&consultants=bob@gmail.com`, the these emails will be added and none more can be added."
},
"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."
},
"isDefault": {
"type": "object",
"default": false,
@@ -8082,7 +8202,7 @@
"example": false
}
},
"required": ["type", "slug", "label", "required", "isDefault"]
"required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"MultiSelectFieldOutput_2024_06_14": {
"type": "object",
@@ -8130,6 +8250,10 @@
"type": "boolean",
"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 the slug is `consultants` and the URL contains query parameter `&consultants=en&language=it`, the 'en' and 'it' will be selected and the select field will be disabled."
},
"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."
},
"isDefault": {
"type": "object",
"default": false,
@@ -8137,7 +8261,7 @@
"example": false
}
},
"required": ["type", "slug", "label", "required", "options", "isDefault"]
"required": ["type", "slug", "label", "required", "options", "hidden", "isDefault"]
},
"NumberFieldOutput_2024_06_14": {
"type": "object",
@@ -8182,6 +8306,10 @@
"type": "boolean",
"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 the slug is `calories-per-day` and the URL contains query parameter `&calories-per-day=3000`, the number field will be prefilled with this value and disabled."
},
"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."
},
"isDefault": {
"type": "object",
"default": false,
@@ -8189,7 +8317,7 @@
"example": false
}
},
"required": ["type", "slug", "label", "required", "isDefault"]
"required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"PhoneFieldOutput_2024_06_14": {
"type": "object",
@@ -8232,6 +8360,10 @@
"type": "boolean",
"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 the slug is `phone` and the URL contains query parameter `&phone=1234567890`, the phone field will be prefilled with this value and disabled."
},
"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."
},
"isDefault": {
"type": "object",
"default": false,
@@ -8239,7 +8371,7 @@
"example": false
}
},
"required": ["type", "slug", "label", "required", "isDefault"]
"required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"RadioGroupFieldOutput_2024_06_14": {
"type": "object",
@@ -8287,6 +8419,10 @@
"type": "boolean",
"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 the slug is `language` and options of this select field are ['english', 'italian'] and the URL contains query parameter `&language=italian`, the 'italian' radio buttom will be selected and the select field will be disabled."
},
"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."
},
"isDefault": {
"type": "object",
"default": false,
@@ -8294,7 +8430,7 @@
"example": false
}
},
"required": ["type", "slug", "label", "required", "options", "isDefault"]
"required": ["type", "slug", "label", "required", "options", "hidden", "isDefault"]
},
"SelectFieldOutput_2024_06_14": {
"type": "object",
@@ -8346,6 +8482,10 @@
"type": "boolean",
"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 the slug is `language` and options of this select field are ['english', 'italian'] and the URL contains query parameter `&language=italian`, the 'italian' will be selected and the select field will be disabled."
},
"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."
},
"isDefault": {
"type": "object",
"default": false,
@@ -8353,7 +8493,7 @@
"example": false
}
},
"required": ["type", "slug", "label", "required", "options", "isDefault"]
"required": ["type", "slug", "label", "required", "options", "hidden", "isDefault"]
},
"TextAreaFieldOutput_2024_06_14": {
"type": "object",
@@ -8398,6 +8538,10 @@
"type": "boolean",
"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 the slug is `dear-diary` and the URL contains query parameter `&dear-diary=Today I shipped a feature`, the text area will be prefilled with this value and disabled."
},
"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."
},
"isDefault": {
"type": "object",
"default": false,
@@ -8405,7 +8549,7 @@
"example": false
}
},
"required": ["type", "slug", "label", "required", "isDefault"]
"required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"TextFieldOutput_2024_06_14": {
"type": "object",
@@ -8450,6 +8594,10 @@
"type": "boolean",
"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 the slug is `who-referred-you` and the URL contains query parameter `&who-referred-you=bob`, the text field will be prefilled with this value and disabled."
},
"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."
},
"isDefault": {
"type": "object",
"default": false,
@@ -8457,7 +8605,7 @@
"example": false
}
},
"required": ["type", "slug", "label", "required", "isDefault"]
"required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"EventTypeOutput_2024_06_14": {
"type": "object",