Scheduling infrastructure for absolutely everyone.
Improves custom inputs docs in swagger (#233)
Syed Ali Shahbazf170f17f2c11
diff --git a/pages/api/custom-inputs/[id]/_delete.ts b/pages/api/custom-inputs/[id]/_delete.tsindex 86e3fdaf863..747e1954ffa 100644--- a/pages/api/custom-inputs/[id]/_delete.ts+++ b/pages/api/custom-inputs/[id]/_delete.ts@@ -16,6 +16,12 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform* type: integer* required: true* description: ID of the eventTypeCustomInput to delete+ * - in: query+ * name: apiKey+ * required: true+ * schema:+ * type: string+ * description: Your API key* tags:* - custom-inputs* responses:diff --git a/pages/api/custom-inputs/[id]/_get.ts b/pages/api/custom-inputs/[id]/_get.tsindex e79ad00c4e5..96cb8133dce 100644--- a/pages/api/custom-inputs/[id]/_get.ts+++ b/pages/api/custom-inputs/[id]/_get.ts@@ -17,6 +17,12 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform* type: integer* required: true* description: ID of the eventTypeCustomInput to get+ * - in: query+ * name: apiKey+ * required: true+ * schema:+ * type: string+ * description: Your API key* tags:* - custom-inputs* responses:diff --git a/pages/api/custom-inputs/[id]/_patch.ts b/pages/api/custom-inputs/[id]/_patch.tsindex 860c3472844..9ecdd822de7 100644--- a/pages/api/custom-inputs/[id]/_patch.ts+++ b/pages/api/custom-inputs/[id]/_patch.ts@@ -13,6 +13,44 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform* /custom-inputs/{id}:* patch:* summary: Edit an existing eventTypeCustomInput+ * requestBody:+ * description: Edit an existing eventTypeCustomInput for an event type+ * required: true+ * content:+ * application/json:+ * schema:+ * type: object+ * properties:+ * eventTypeId:+ * type: integer+ * description: 'ID of the event type to which the custom input is being added'+ * label:+ * type: string+ * description: 'Label of the custom input'+ * type:+ * type: string+ * description: 'Type of the custom input. The value is ENUM; one of [TEXT, TEXTLONG, NUMBER, BOOL, RADIO, PHONE]'+ * options:+ * type: object+ * properties:+ * label:+ * type: string+ * type:+ * type: string+ * description: 'Options for the custom input'+ * required:+ * type: boolean+ * description: 'If the custom input is required before booking'+ * placeholder:+ * type: string+ * description: 'Placeholder text for the custom input'+ *+ * examples:+ * custom-inputs:+ * summary: Example of patching an existing Custom Input+ * value:+ * required: true+ ** parameters:* - in: path* name: id@@ -20,6 +58,13 @@ import { schemaQueryIdParseInt } from "~/lib/validations/shared/queryIdTransform* type: integer* required: true* description: ID of the eventTypeCustomInput to edit+ * - in: query+ * name: apiKey+ * required: true+ * schema:+ * type: string+ * description: Your API key+ ** tags:* - custom-inputs* responses:diff --git a/pages/api/custom-inputs/_get.ts b/pages/api/custom-inputs/_get.tsindex c08f9239c6a..db63434ddfe 100644--- a/pages/api/custom-inputs/_get.ts+++ b/pages/api/custom-inputs/_get.ts@@ -10,6 +10,13 @@ import { schemaEventTypeCustomInputPublic } from "~/lib/validations/event-type-c* /custom-inputs:* get:* summary: Find all eventTypeCustomInputs+ * parameters:+ * - in: query+ * name: apiKey+ * required: true+ * schema:+ * type: string+ * description: Your API key* tags:* - custom-inputs* responses:diff --git a/pages/api/custom-inputs/_post.ts b/pages/api/custom-inputs/_post.tsindex 815ceff04c9..56d15816a47 100644--- a/pages/api/custom-inputs/_post.ts+++ b/pages/api/custom-inputs/_post.ts@@ -8,11 +8,72 @@ import {schemaEventTypeCustomInputPublic,} from "~/lib/validations/event-type-custom-input";+// id: z.number().int(),+// eventTypeId: z.number().int(),+// label: z.string(),+// type: z.nativeEnum(EventTypeCustomInputType),+// required: z.boolean(),+// placeholder: z.string(),/*** @swagger* /custom-inputs:* post:* summary: Creates a new eventTypeCustomInput+ * parameters:+ * - in: query+ * name: apiKey+ * required: true+ * schema:+ * type: string+ * description: Your API key+ * requestBody:+ * description: Create a new custom input for an event type+ * required: true+ * content:+ * application/json:+ * schema:+ * type: object+ * required:+ * - eventTypeId+ * - label+ * - type+ * - required+ * - placeholder+ * properties:+ * eventTypeId:+ * type: integer+ * description: 'ID of the event type to which the custom input is being added'+ * label:+ * type: string+ * description: 'Label of the custom input'+ * type:+ * type: string+ * description: 'Type of the custom input. The value is ENUM; one of [TEXT, TEXTLONG, NUMBER, BOOL, RADIO, PHONE]'+ * options:+ * type: object+ * properties:+ * label:+ * type: string+ * type:+ * type: string+ * description: 'Options for the custom input'+ * required:+ * type: boolean+ * description: 'If the custom input is required before booking'+ * placeholder:+ * type: string+ * description: 'Placeholder text for the custom input'+ *+ * examples:+ * custom-inputs:+ * summary: An example of custom-inputs+ * value:+ * eventTypeID: 1+ * label: "Phone Number"+ * type: "PHONE"+ * required: true+ * placeholder: "100 101 1234"+ ** tags:* - custom-inputs* responses: