From fb4668309ce1ed8b43fc5e50eaabb40ddcde9af1 Mon Sep 17 00:00:00 2001 From: supalarry Date: Fri, 20 Dec 2024 08:06:48 +0100 Subject: [PATCH] fix input type --- apps/api/v2/swagger/documentation.json | 44 ++++--------------- docs/api-reference/v2/openapi.json | 28 +++++------- .../inputs/booking-fields.input.ts | 36 ++++++++------- 3 files changed, 40 insertions(+), 68 deletions(-) diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index d7b7af0865ab2d..0cb5926d0b6b72 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -7747,8 +7747,7 @@ "type": { "type": "string", "example": "name", - "description": "DEPRECATED: pass `slug` property instead. only allowed value for type is `name`", - "deprecated": true + "description": "only allowed value for type is `name`" }, "label": { "type": "string" @@ -7773,8 +7772,7 @@ "type": { "type": "string", "example": "email", - "description": "DEPRECATED: pass `slug` property instead. only allowed value for type is `email`", - "deprecated": true + "description": "only allowed value for type is `email`" }, "label": { "type": "string" @@ -7820,11 +7818,7 @@ } }, "required": [ - "slug", - "required", - "hidden", - "label", - "placeholder" + "slug" ] }, "NotesDefaultFieldInput_2024_06_14": { @@ -7854,11 +7848,7 @@ } }, "required": [ - "slug", - "required", - "hidden", - "label", - "placeholder" + "slug" ] }, "GuestsDefaultFieldInput_2024_06_14": { @@ -7888,11 +7878,7 @@ } }, "required": [ - "slug", - "required", - "hidden", - "label", - "placeholder" + "slug" ] }, "RescheduleReasonDefaultFieldInput_2024_06_14": { @@ -7922,11 +7908,7 @@ } }, "required": [ - "slug", - "required", - "hidden", - "label", - "placeholder" + "slug" ] }, "BookerLayouts_2024_06_14": { @@ -8499,8 +8481,7 @@ "boolean" ], "example": "email", - "description": "DEPRECATED: pass `slug` property instead. only allowed value for type is `email`", - "deprecated": true, + "description": "only allowed value for type is `email`", "default": "email" }, "label": { @@ -8555,8 +8536,7 @@ "boolean" ], "example": "name", - "description": "DEPRECATED: pass `slug` property instead. only allowed value for type is `name`", - "deprecated": true, + "description": "only allowed value for type is `name`", "default": "name" }, "label": { @@ -8670,8 +8650,6 @@ }, "required": [ "slug", - "required", - "hidden", "isDefault", "type" ] @@ -8722,8 +8700,6 @@ }, "required": [ "slug", - "required", - "hidden", "isDefault", "type" ] @@ -8774,8 +8750,6 @@ }, "required": [ "slug", - "required", - "hidden", "isDefault", "type" ] @@ -8826,8 +8800,6 @@ }, "required": [ "slug", - "required", - "hidden", "isDefault", "type" ] diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json index f0b59e44162341..3df7ca3cf85503 100644 --- a/docs/api-reference/v2/openapi.json +++ b/docs/api-reference/v2/openapi.json @@ -7179,8 +7179,7 @@ "type": { "type": "string", "example": "name", - "description": "DEPRECATED: pass `slug` property instead. only allowed value for type is `name`", - "deprecated": true + "description": "only allowed value for type is `name`" }, "label": { "type": "string" @@ -7201,8 +7200,7 @@ "type": { "type": "string", "example": "email", - "description": "DEPRECATED: pass `slug` property instead. only allowed value for type is `email`", - "deprecated": true + "description": "only allowed value for type is `email`" }, "label": { "type": "string" @@ -7243,7 +7241,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 `&title=journey`, the title field will be prefilled with this value and disabled." } }, - "required": ["slug", "required", "hidden", "label", "placeholder"] + "required": ["slug"] }, "NotesDefaultFieldInput_2024_06_14": { "type": "object", @@ -7271,7 +7269,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 `¬es=journey`, the notes field will be prefilled with this value and disabled." } }, - "required": ["slug", "required", "hidden", "label", "placeholder"] + "required": ["slug"] }, "GuestsDefaultFieldInput_2024_06_14": { "type": "object", @@ -7299,7 +7297,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 `&guests=bob@cal.com`, the guests field will be prefilled with this value and disabled." } }, - "required": ["slug", "required", "hidden", "label", "placeholder"] + "required": ["slug"] }, "RescheduleReasonDefaultFieldInput_2024_06_14": { "type": "object", @@ -7327,7 +7325,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 `&rescheduleReason=travel`, the rescheduleReason field will be prefilled with this value and disabled." } }, - "required": ["slug", "required", "hidden", "label", "placeholder"] + "required": ["slug"] }, "BookerLayouts_2024_06_14": { "type": "object", @@ -7853,8 +7851,7 @@ "boolean" ], "example": "email", - "description": "DEPRECATED: pass `slug` property instead. only allowed value for type is `email`", - "deprecated": true, + "description": "only allowed value for type is `email`", "default": "email" }, "label": { @@ -7904,8 +7901,7 @@ "boolean" ], "example": "name", - "description": "DEPRECATED: pass `slug` property instead. only allowed value for type is `name`", - "deprecated": true, + "description": "only allowed value for type is `name`", "default": "name" }, "label": { @@ -8000,7 +7996,7 @@ "default": "textarea" } }, - "required": ["slug", "required", "hidden", "isDefault", "type"] + "required": ["slug", "isDefault", "type"] }, "TitleDefaultFieldOutput_2024_06_14": { "type": "object", @@ -8040,7 +8036,7 @@ "default": "text" } }, - "required": ["slug", "required", "hidden", "isDefault", "type"] + "required": ["slug", "isDefault", "type"] }, "NotesDefaultFieldOutput_2024_06_14": { "type": "object", @@ -8080,7 +8076,7 @@ "default": "textarea" } }, - "required": ["slug", "required", "hidden", "isDefault", "type"] + "required": ["slug", "isDefault", "type"] }, "GuestsDefaultFieldOutput_2024_06_14": { "type": "object", @@ -8120,7 +8116,7 @@ "default": "multiemail" } }, - "required": ["slug", "required", "hidden", "isDefault", "type"] + "required": ["slug", "isDefault", "type"] }, "AddressFieldOutput_2024_06_14": { "type": "object", diff --git a/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-fields.input.ts b/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-fields.input.ts index 1318c1a87ac97e..87125e86fef907 100644 --- a/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-fields.input.ts +++ b/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-fields.input.ts @@ -89,12 +89,13 @@ export class TitleDefaultFieldInput_2024_06_14 { slug!: "title"; @IsBoolean() - @DocsProperty() + @IsOptional() + @DocsPropertyOptional() required?: boolean; @IsBoolean() @IsOptional() - @DocsProperty({ + @DocsPropertyOptional({ description: "If true show under event type settings but don't show this booking field in the Booker. If false show in both.", }) @@ -102,12 +103,12 @@ export class TitleDefaultFieldInput_2024_06_14 { @IsString() @IsOptional() - @DocsProperty() + @DocsPropertyOptional() label?: string; @IsString() @IsOptional() - @DocsProperty() + @DocsPropertyOptional() placeholder?: string; @IsBoolean() @@ -128,12 +129,13 @@ export class NotesDefaultFieldInput_2024_06_14 { slug!: "notes"; @IsBoolean() - @DocsProperty() + @IsOptional() + @DocsPropertyOptional() required?: boolean; @IsBoolean() @IsOptional() - @DocsProperty({ + @DocsPropertyOptional({ description: "If true show under event type settings but don't show this booking field in the Booker. If false show in both.", }) @@ -141,12 +143,12 @@ export class NotesDefaultFieldInput_2024_06_14 { @IsString() @IsOptional() - @DocsProperty() + @DocsPropertyOptional() label?: string; @IsString() @IsOptional() - @DocsProperty() + @DocsPropertyOptional() placeholder?: string; @IsBoolean() @@ -167,12 +169,13 @@ export class GuestsDefaultFieldInput_2024_06_14 { slug!: "guests"; @IsBoolean() - @DocsProperty() + @IsOptional() + @DocsPropertyOptional() required?: boolean; @IsBoolean() @IsOptional() - @DocsProperty({ + @DocsPropertyOptional({ description: "If true show under event type settings but don't show this booking field in the Booker. If false show in both.", }) @@ -180,12 +183,12 @@ export class GuestsDefaultFieldInput_2024_06_14 { @IsString() @IsOptional() - @DocsProperty() + @DocsPropertyOptional() label?: string; @IsString() @IsOptional() - @DocsProperty() + @DocsPropertyOptional() placeholder?: string; @IsBoolean() @@ -209,12 +212,13 @@ export class RescheduleReasonDefaultFieldInput_2024_06_14 { slug!: "rescheduleReason"; @IsBoolean() - @DocsProperty() + @IsOptional() + @DocsPropertyOptional() required?: boolean; @IsBoolean() @IsOptional() - @DocsProperty({ + @DocsPropertyOptional({ description: "If true show under event type settings but don't show this booking field in the Booker. If false show in both.", }) @@ -222,12 +226,12 @@ export class RescheduleReasonDefaultFieldInput_2024_06_14 { @IsString() @IsOptional() - @DocsProperty() + @DocsPropertyOptional() label?: string; @IsString() @IsOptional() - @DocsProperty() + @DocsPropertyOptional() placeholder?: string; @IsBoolean()