Skip to content

Scheduling infrastructure for absolutely everyone.

Adds the rest of the bodies and responses for API docs (#585)

Bailey Pumfleet4d3b258bf2ea
diff --git a/calendso.yaml b/calendso.yaml
index 6cd18e8c60d..030ce2d26af 100644
--- a/calendso.yaml
+++ b/calendso.yaml
@@ -450,29 +450,266 @@ paths:
properties: {}
'500':
description: Internal Server Error
- '/api/book/:user':
+ '/api/book/{user}':
post:
description: Creates a booking in the user's calendar.
summary: Creates a booking for a user
tags:
- Booking
+ parameters: []
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ start:
+ type: string
+ end:
+ type: string
+ rescheduleUid:
+ type: string
+ eventTypeId:
+ type: string
+ email:
+ type: string
+ name:
+ type: string
+ timeZone:
+ type: string
+ guests:
+ type: array
+ items: {}
+ notes:
+ type: string
+ location:
+ type: string
+ responses:
+ '204':
+ description: No Content
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ '500':
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ examples: {}
+ parameters:
+ - schema:
+ type: string
+ name: user
+ in: path
+ required: true
+ description: The user whom you wish to book
/api/book/confirm:
post:
description: Accepts an opt-in booking.
summary: Accepts an opt-in booking
tags:
- Booking
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ id:
+ type: string
+ confirmed:
+ type: string
+ responses:
+ '204':
+ description: No Content
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ '500':
+ description: Internal Server Error
/api/integrations:
get:
description: Gets a list of the user's integrations.
summary: Gets the user's integrations
tags:
- Integrations
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ description: ''
+ type: object
+ x-examples:
+ example-1:
+ pageProps:
+ integrations:
+ - installed: true
+ credential:
+ id: 83
+ type: google_calendar
+ key:
+ scope: 'https://www.googleapis.com/auth/calendar.readonly https://www.googleapis.com/auth/calendar.events'
+ token_type: Bearer
+ expiry_date: 1630838974808
+ access_token: ya29.a0ARrdaM89R686rUyBBluTuD69oQ6WIIjjMa2xjJ0qe_5u-9ShDL09KNN1mCYoks3NP54FUMzYKmqTzb8nzCJX9jlNKP7X7-gukO4--HUyfOUbFHlHbfQ2Ei05F8AQn_xS0E_awhDgyn2anvrvEw72U3_65Zi4v6Y
+ refresh_token: 1//0dWZWomYrTVUjCgYIARAAGA0SNwF-L9Ir6e5rp9G_nAiwq6PAp37d228O2UfUn-b_LoWk_pTFFKQZ9Cgf_F3u0tJV5h5sDmL1tM4
+ type: google_calendar
+ title: Google Calendar
+ imageSrc: integrations/google-calendar.svg
+ description: For personal and business calendars
+ - installed: true
+ type: office365_calendar
+ credential: null
+ title: Office 365 / Outlook.com Calendar
+ imageSrc: integrations/outlook.svg
+ description: For personal and business calendars
+ - installed: true
+ type: zoom_video
+ credential: null
+ title: Zoom
+ imageSrc: integrations/zoom.svg
+ description: Video Conferencing
+ - installed: true
+ type: caldav_calendar
+ credential: null
+ title: CalDav Server
+ imageSrc: integrations/caldav.svg
+ description: For personal and business calendars
+ __N_SSP: true
+ properties:
+ pageProps:
+ type: object
+ required:
+ - integrations
+ properties:
+ integrations:
+ type: array
+ uniqueItems: true
+ minItems: 1
+ items:
+ type: object
+ properties:
+ installed:
+ type: boolean
+ credential:
+ type: object
+ properties:
+ id:
+ type: number
+ type:
+ type: string
+ minLength: 1
+ key:
+ type: object
+ required:
+ - scope
+ - token_type
+ - expiry_date
+ - access_token
+ - refresh_token
+ properties:
+ scope:
+ type: string
+ minLength: 1
+ token_type:
+ type: string
+ minLength: 1
+ expiry_date:
+ type: number
+ access_token:
+ type: string
+ minLength: 1
+ refresh_token:
+ type: string
+ minLength: 1
+ required:
+ - id
+ - type
+ - key
+ type:
+ type: string
+ minLength: 1
+ title:
+ type: string
+ minLength: 1
+ imageSrc:
+ type: string
+ minLength: 1
+ description:
+ type: string
+ minLength: 1
+ required:
+ - installed
+ - type
+ - title
+ - imageSrc
+ - description
+ required:
+ - pageProps
+ '500':
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
delete:
description: Deletes a user's integration
summary: Deletes a user's integration
tags:
- Integrations
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ id:
+ type: number
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ '401':
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ '500':
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
/api/integrations/googlecalendar/add:
get:
description: Gets the OAuth URL for a Google Calendar integration.
@@ -515,45 +752,262 @@ paths:
summary: Updates a user's profile
tags:
- User
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ name:
+ type: string
+ description:
+ type: string
+ avatar:
+ type: string
+ timeZone:
+ type: string
+ weekStart:
+ type: string
+ hideBranding:
+ type: string
+ theme:
+ type: string
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ '401':
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ '500':
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
/api/user/membership:
get:
description: Get a list of the teams the user has joined.
summary: Get the teams a user is joined to
tags:
- User
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ '401':
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ '500':
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
patch:
description: Accept team invitation
summary: Accept team invitation.
tags:
- User
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ teamId:
+ type: string
delete:
description: Leave team or decline membership invite of current user
summary: Leave team or decline team invite.
tags:
- User
- '/api/:team':
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ teamId:
+ type: string
+ '/api/{team}':
delete:
description: Deletes a team
summary: Deletes a team
tags:
- Teams
- '/api/:team/invite':
+ parameters: []
+ responses:
+ '204':
+ description: No Content
+ '401':
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ '500':
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ parameters:
+ - schema:
+ type: string
+ name: team
+ in: path
+ required: true
+ description: The team which you wish to modify
+ '/api/{team}/invite':
post:
description: Invites someone to a team.
summary: Invites someone to a team
tags:
- Teams
- '/api/:team/membership':
+ parameters: []
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ usernameOrEmail:
+ type: string
+ role:
+ type: string
+ sendEmailInvitation:
+ type: boolean
+ parameters:
+ - schema:
+ type: string
+ name: team
+ in: path
+ required: true
+ description: The team which you wish to send the invite for
+ '/api/{team}/membership':
get:
description: Lists the members of a team.
summary: Lists members of a team
tags:
- Teams
+ parameters: []
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ members:
+ type: array
+ items: {}
+ '401':
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ '500':
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
delete:
description: Cancels a membership (invite) to a team
summary: Cancels a membership
tags:
- Teams
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ userId:
+ type: number
+ responses:
+ '200':
+ description: OK
+ content:
+ application/json:
+ schema:
+ type: object
+ properties: {}
+ '401':
+ description: Unauthorized
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ '500':
+ description: Internal Server Error
+ content:
+ application/json:
+ schema:
+ type: object
+ properties:
+ message:
+ type: string
+ parameters:
+ - schema:
+ type: string
+ name: team
+ in: path
+ required: true
+ description: The team which you wish to list members of
servers:
- url: 'https://app.calendso.com'
description: Production