 faa67e0bb6
			
		
	
	
		faa67e0bb6
		
			
		
	
	
	
	
		
			
			* feat: add ApiKey model for new Api auth, owned by a user * fix: remove metadata:Json and add note:String instead in new apiKey model * fix: rename apiKey to apiKeys in moder User relation in schema.prisma * feat: add hashedKey to apiKey and lastUsedAt datetime to keep track of usage of keys and makiung them securely stored in db * fix 30 day -> 30 days in expiresAt * feat: api keys frontend in security page * adds hashedKey to api key model, add frontend api keys in security page * Make frontend work to create api keys with or without expiry, note, defaults to 1 month expiry * remove migration for now, add env.example to swagger, sync api * feat: hashed api keys * fix: minor refactor and cleanup in apiKeys generator * add api key success modal * sync apps/api * feat: We have API Keys in Security =) * remove swagger env from pr * apps api sync * remove comments in password section * feat: migration for api keys schema * sync api w main * delete apps/api * add back apps/api * make min date and disabled optional props in datepicker * feat fix type check errors * fix : types * fix: rmeove renaming of verificationrequest token indexes in migration * fix: remove extra div * Fixes for feedback in PR * fix button /> * fix: rename weird naming of translation for you_will_only_view_it_once * fix: remove ternary and use && to avoid null for false * fix sync apps/api with main not old commit * fix empty className * fix: remove unused imports * fix remove commented jsx fragment close * fix rename editing * improve translations * feat: adds beta tag in security tab under api keys * fix: use api keys everywhere * fix: cleanup code in api keys * fix: use watch and controller for neverexpires/datepicker * Fixes: improve api key never expires * add back change password h2 title section in security page * fix update env API_KEY_ prefix default to cal_ * fix: improve eidt api keys modal * fix: update edit mutation in viewer.apiKeys * Update apps/web/ee/components/apiKeys/ApiKeyListItem.tsx Co-authored-by: Alex van Andel <me@alexvanandel.com> * fix: item: any to pass build Co-authored-by: Agusti Fernandez Pardo <git@agusti.me> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Omar López <zomars@me.com> Co-authored-by: Alex van Andel <me@alexvanandel.com>
		
			
				
	
	
		
			1064 lines
		
	
	
	
		
			23 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			1064 lines
		
	
	
	
		
			23 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
| {
 | |
|   "$schema": "http://json-schema.org/draft-07/schema#",
 | |
|   "definitions": {
 | |
|     "EventType": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "title": {
 | |
|           "type": "string",
 | |
|           "description": "@zod.nonempty()"
 | |
|         },
 | |
|         "slug": {
 | |
|           "type": "string",
 | |
|           "description": "@zod.custom(imports.eventTypeSlug)"
 | |
|         },
 | |
|         "description": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "position": {
 | |
|           "type": "integer",
 | |
|           "default": 0
 | |
|         },
 | |
|         "locations": {
 | |
|           "type": ["number", "string", "boolean", "object", "array", "null"],
 | |
|           "description": "@zod.custom(imports.eventTypeLocations)"
 | |
|         },
 | |
|         "length": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "hidden": {
 | |
|           "type": "boolean",
 | |
|           "default": false
 | |
|         },
 | |
|         "users": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/User"
 | |
|           }
 | |
|         },
 | |
|         "userId": {
 | |
|           "type": ["integer", "null"]
 | |
|         },
 | |
|         "team": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/Team"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "bookings": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Booking"
 | |
|           }
 | |
|         },
 | |
|         "availability": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Availability"
 | |
|           }
 | |
|         },
 | |
|         "webhooks": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Webhook"
 | |
|           }
 | |
|         },
 | |
|         "destinationCalendar": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/DestinationCalendar"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "eventName": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "customInputs": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/EventTypeCustomInput"
 | |
|           }
 | |
|         },
 | |
|         "timeZone": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "periodType": {
 | |
|           "type": "string",
 | |
|           "default": "UNLIMITED",
 | |
|           "enum": ["UNLIMITED", "ROLLING", "RANGE"]
 | |
|         },
 | |
|         "periodStartDate": {
 | |
|           "type": ["string", "null"],
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "periodEndDate": {
 | |
|           "type": ["string", "null"],
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "periodDays": {
 | |
|           "type": ["integer", "null"]
 | |
|         },
 | |
|         "periodCountCalendarDays": {
 | |
|           "type": ["boolean", "null"]
 | |
|         },
 | |
|         "requiresConfirmation": {
 | |
|           "type": "boolean",
 | |
|           "default": false
 | |
|         },
 | |
|         "disableGuests": {
 | |
|           "type": "boolean",
 | |
|           "default": false
 | |
|         },
 | |
|         "minimumBookingNotice": {
 | |
|           "type": "integer",
 | |
|           "default": 120
 | |
|         },
 | |
|         "beforeEventBuffer": {
 | |
|           "type": "integer",
 | |
|           "default": 0
 | |
|         },
 | |
|         "afterEventBuffer": {
 | |
|           "type": "integer",
 | |
|           "default": 0
 | |
|         },
 | |
|         "schedulingType": {
 | |
|           "type": ["string", "null"],
 | |
|           "enum": ["ROUND_ROBIN", "COLLECTIVE"]
 | |
|         },
 | |
|         "schedule": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/Schedule"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "price": {
 | |
|           "type": "integer",
 | |
|           "default": 0
 | |
|         },
 | |
|         "currency": {
 | |
|           "type": "string",
 | |
|           "default": "usd"
 | |
|         },
 | |
|         "slotInterval": {
 | |
|           "type": ["integer", "null"]
 | |
|         },
 | |
|         "metadata": {
 | |
|           "type": ["number", "string", "boolean", "object", "array", "null"]
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "Credential": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "type": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "key": {
 | |
|           "type": ["number", "string", "boolean", "object", "array", "null"]
 | |
|         },
 | |
|         "user": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/User"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "DestinationCalendar": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "integration": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "externalId": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "user": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/User"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "booking": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/Booking"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "eventType": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/EventType"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "User": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "username": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "name": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "email": {
 | |
|           "type": "string",
 | |
|           "description": "@zod.email()"
 | |
|         },
 | |
|         "emailVerified": {
 | |
|           "type": ["string", "null"],
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "password": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "bio": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "avatar": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "timeZone": {
 | |
|           "type": "string",
 | |
|           "default": "Europe/London"
 | |
|         },
 | |
|         "weekStart": {
 | |
|           "type": "string",
 | |
|           "default": "Sunday"
 | |
|         },
 | |
|         "startTime": {
 | |
|           "type": "integer",
 | |
|           "default": 0
 | |
|         },
 | |
|         "endTime": {
 | |
|           "type": "integer",
 | |
|           "default": 1440
 | |
|         },
 | |
|         "bufferTime": {
 | |
|           "type": "integer",
 | |
|           "default": 0
 | |
|         },
 | |
|         "hideBranding": {
 | |
|           "type": "boolean",
 | |
|           "default": false
 | |
|         },
 | |
|         "theme": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "createdDate": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "trialEndsAt": {
 | |
|           "type": ["string", "null"],
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "eventTypes": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/EventType"
 | |
|           }
 | |
|         },
 | |
|         "credentials": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Credential"
 | |
|           }
 | |
|         },
 | |
|         "teams": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Membership"
 | |
|           }
 | |
|         },
 | |
|         "bookings": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Booking"
 | |
|           }
 | |
|         },
 | |
|         "schedules": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Schedule"
 | |
|           }
 | |
|         },
 | |
|         "defaultScheduleId": {
 | |
|           "type": ["integer", "null"]
 | |
|         },
 | |
|         "selectedCalendars": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/SelectedCalendar"
 | |
|           }
 | |
|         },
 | |
|         "completedOnboarding": {
 | |
|           "type": "boolean",
 | |
|           "default": false
 | |
|         },
 | |
|         "locale": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "timeFormat": {
 | |
|           "type": ["integer", "null"],
 | |
|           "default": 12
 | |
|         },
 | |
|         "twoFactorSecret": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "twoFactorEnabled": {
 | |
|           "type": "boolean",
 | |
|           "default": false
 | |
|         },
 | |
|         "identityProvider": {
 | |
|           "type": "string",
 | |
|           "default": "CAL",
 | |
|           "enum": ["CAL", "GOOGLE", "SAML"]
 | |
|         },
 | |
|         "identityProviderId": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "availability": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Availability"
 | |
|           }
 | |
|         },
 | |
|         "invitedTo": {
 | |
|           "type": ["integer", "null"]
 | |
|         },
 | |
|         "plan": {
 | |
|           "type": "string",
 | |
|           "default": "TRIAL",
 | |
|           "enum": ["FREE", "TRIAL", "PRO"]
 | |
|         },
 | |
|         "webhooks": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Webhook"
 | |
|           }
 | |
|         },
 | |
|         "brandColor": {
 | |
|           "type": "string",
 | |
|           "default": "#292929"
 | |
|         },
 | |
|         "darkBrandColor": {
 | |
|           "type": "string",
 | |
|           "default": "#fafafa"
 | |
|         },
 | |
|         "destinationCalendar": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/DestinationCalendar"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "away": {
 | |
|           "type": "boolean",
 | |
|           "default": false
 | |
|         },
 | |
|         "metadata": {
 | |
|           "type": ["number", "string", "boolean", "object", "array", "null"]
 | |
|         },
 | |
|         "verified": {
 | |
|           "type": ["boolean", "null"],
 | |
|           "default": false
 | |
|         },
 | |
|         "apiKeys": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/ApiKey"
 | |
|           }
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "Team": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "name": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "slug": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "logo": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "bio": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "hideBranding": {
 | |
|           "type": "boolean",
 | |
|           "default": false
 | |
|         },
 | |
|         "members": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Membership"
 | |
|           }
 | |
|         },
 | |
|         "eventTypes": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/EventType"
 | |
|           }
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "Membership": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "accepted": {
 | |
|           "type": "boolean",
 | |
|           "default": false
 | |
|         },
 | |
|         "role": {
 | |
|           "type": "string",
 | |
|           "enum": ["MEMBER", "ADMIN", "OWNER"]
 | |
|         },
 | |
|         "team": {
 | |
|           "$ref": "#/definitions/Team"
 | |
|         },
 | |
|         "user": {
 | |
|           "$ref": "#/definitions/User"
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "VerificationRequest": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "identifier": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "token": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "expires": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "createdAt": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "updatedAt": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "BookingReference": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "type": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "uid": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "meetingId": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "meetingPassword": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "meetingUrl": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "booking": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/Booking"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "Attendee": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "email": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "name": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "timeZone": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "locale": {
 | |
|           "type": ["string", "null"],
 | |
|           "default": "en"
 | |
|         },
 | |
|         "booking": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/Booking"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "DailyEventReference": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "dailyurl": {
 | |
|           "type": "string",
 | |
|           "default": "dailycallurl"
 | |
|         },
 | |
|         "dailytoken": {
 | |
|           "type": "string",
 | |
|           "default": "dailytoken"
 | |
|         },
 | |
|         "booking": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/Booking"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "Booking": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "uid": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "user": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/User"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "references": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/BookingReference"
 | |
|           }
 | |
|         },
 | |
|         "eventType": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/EventType"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "title": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "description": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "startTime": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "endTime": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "attendees": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Attendee"
 | |
|           }
 | |
|         },
 | |
|         "location": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "dailyRef": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/DailyEventReference"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "createdAt": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "updatedAt": {
 | |
|           "type": ["string", "null"],
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "confirmed": {
 | |
|           "type": "boolean",
 | |
|           "default": true
 | |
|         },
 | |
|         "rejected": {
 | |
|           "type": "boolean",
 | |
|           "default": false
 | |
|         },
 | |
|         "status": {
 | |
|           "type": "string",
 | |
|           "default": "ACCEPTED",
 | |
|           "enum": ["CANCELLED", "ACCEPTED", "REJECTED", "PENDING"]
 | |
|         },
 | |
|         "paid": {
 | |
|           "type": "boolean",
 | |
|           "default": false
 | |
|         },
 | |
|         "payment": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Payment"
 | |
|           }
 | |
|         },
 | |
|         "destinationCalendar": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/DestinationCalendar"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "cancellationReason": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "rejectionReason": {
 | |
|           "type": ["string", "null"]
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "Schedule": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "user": {
 | |
|           "$ref": "#/definitions/User"
 | |
|         },
 | |
|         "eventType": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/EventType"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "name": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "timeZone": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "availability": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "$ref": "#/definitions/Availability"
 | |
|           }
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "Availability": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "user": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/User"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "eventType": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/EventType"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "days": {
 | |
|           "type": "array",
 | |
|           "items": {
 | |
|             "type": "integer"
 | |
|           }
 | |
|         },
 | |
|         "startTime": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "endTime": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "date": {
 | |
|           "type": ["string", "null"],
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "Schedule": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/Schedule"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "SelectedCalendar": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "user": {
 | |
|           "$ref": "#/definitions/User"
 | |
|         },
 | |
|         "integration": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "externalId": {
 | |
|           "type": "string"
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "EventTypeCustomInput": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "eventType": {
 | |
|           "$ref": "#/definitions/EventType"
 | |
|         },
 | |
|         "label": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "type": {
 | |
|           "type": "string",
 | |
|           "enum": ["TEXT", "TEXTLONG", "NUMBER", "BOOL"]
 | |
|         },
 | |
|         "required": {
 | |
|           "type": "boolean"
 | |
|         },
 | |
|         "placeholder": {
 | |
|           "type": "string",
 | |
|           "default": ""
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "ResetPasswordRequest": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "createdAt": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "updatedAt": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "email": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "expires": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "ReminderMail": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "referenceId": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "reminderType": {
 | |
|           "type": "string",
 | |
|           "enum": ["PENDING_BOOKING_CONFIRMATION"]
 | |
|         },
 | |
|         "elapsedMinutes": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "createdAt": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "Payment": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "uid": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "type": {
 | |
|           "type": "string",
 | |
|           "enum": ["STRIPE"]
 | |
|         },
 | |
|         "booking": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/Booking"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "amount": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "fee": {
 | |
|           "type": "integer"
 | |
|         },
 | |
|         "currency": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "success": {
 | |
|           "type": "boolean"
 | |
|         },
 | |
|         "refunded": {
 | |
|           "type": "boolean"
 | |
|         },
 | |
|         "data": {
 | |
|           "type": ["number", "string", "boolean", "object", "array", "null"]
 | |
|         },
 | |
|         "externalId": {
 | |
|           "type": "string"
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "Webhook": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "subscriberUrl": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "payloadTemplate": {
 | |
|           "type": ["string", "null"]
 | |
|         },
 | |
|         "createdAt": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "active": {
 | |
|           "type": "boolean",
 | |
|           "default": true
 | |
|         },
 | |
|         "eventTriggers": {
 | |
|           "type": "array",
 | |
|           "enum": ["BOOKING_CREATED", "BOOKING_RESCHEDULED", "BOOKING_CANCELLED"]
 | |
|         },
 | |
|         "user": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/User"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "eventType": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/EventType"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         }
 | |
|       }
 | |
|     },
 | |
|     "ApiKey": {
 | |
|       "type": "object",
 | |
|       "properties": {
 | |
|         "id": {
 | |
|           "type": "string"
 | |
|         },
 | |
|         "user": {
 | |
|           "anyOf": [
 | |
|             {
 | |
|               "$ref": "#/definitions/User"
 | |
|             },
 | |
|             {
 | |
|               "type": "null"
 | |
|             }
 | |
|           ]
 | |
|         },
 | |
|         "createdAt": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "expiresAt": {
 | |
|           "type": "string",
 | |
|           "format": "date-time"
 | |
|         },
 | |
|         "note": {
 | |
|           "type": ["string", "null"]
 | |
|         }
 | |
|       }
 | |
|     }
 | |
|   },
 | |
|   "type": "object",
 | |
|   "properties": {
 | |
|     "eventType": {
 | |
|       "$ref": "#/definitions/EventType"
 | |
|     },
 | |
|     "credential": {
 | |
|       "$ref": "#/definitions/Credential"
 | |
|     },
 | |
|     "destinationCalendar": {
 | |
|       "$ref": "#/definitions/DestinationCalendar"
 | |
|     },
 | |
|     "user": {
 | |
|       "$ref": "#/definitions/User"
 | |
|     },
 | |
|     "team": {
 | |
|       "$ref": "#/definitions/Team"
 | |
|     },
 | |
|     "membership": {
 | |
|       "$ref": "#/definitions/Membership"
 | |
|     },
 | |
|     "verificationRequest": {
 | |
|       "$ref": "#/definitions/VerificationRequest"
 | |
|     },
 | |
|     "bookingReference": {
 | |
|       "$ref": "#/definitions/BookingReference"
 | |
|     },
 | |
|     "attendee": {
 | |
|       "$ref": "#/definitions/Attendee"
 | |
|     },
 | |
|     "dailyEventReference": {
 | |
|       "$ref": "#/definitions/DailyEventReference"
 | |
|     },
 | |
|     "booking": {
 | |
|       "$ref": "#/definitions/Booking"
 | |
|     },
 | |
|     "schedule": {
 | |
|       "$ref": "#/definitions/Schedule"
 | |
|     },
 | |
|     "availability": {
 | |
|       "$ref": "#/definitions/Availability"
 | |
|     },
 | |
|     "selectedCalendar": {
 | |
|       "$ref": "#/definitions/SelectedCalendar"
 | |
|     },
 | |
|     "eventTypeCustomInput": {
 | |
|       "$ref": "#/definitions/EventTypeCustomInput"
 | |
|     },
 | |
|     "resetPasswordRequest": {
 | |
|       "$ref": "#/definitions/ResetPasswordRequest"
 | |
|     },
 | |
|     "reminderMail": {
 | |
|       "$ref": "#/definitions/ReminderMail"
 | |
|     },
 | |
|     "payment": {
 | |
|       "$ref": "#/definitions/Payment"
 | |
|     },
 | |
|     "webhook": {
 | |
|       "$ref": "#/definitions/Webhook"
 | |
|     },
 | |
|     "apiKey": {
 | |
|       "$ref": "#/definitions/ApiKey"
 | |
|     }
 | |
|   }
 | |
| }
 |