Adds the rest of the bodies and responses for API docs (#585)
* Added bodies and responses for availability calls * Finished the rest of the bodies and responses Co-authored-by: bailey <bailey@calendso.com>
This commit is contained in:
parent
1d22c32904
commit
4d3b258bf2
1 changed files with 458 additions and 4 deletions
462
calendso.yaml
462
calendso.yaml
|
@ -450,29 +450,266 @@ paths:
|
||||||
properties: {}
|
properties: {}
|
||||||
'500':
|
'500':
|
||||||
description: Internal Server Error
|
description: Internal Server Error
|
||||||
'/api/book/:user':
|
'/api/book/{user}':
|
||||||
post:
|
post:
|
||||||
description: Creates a booking in the user's calendar.
|
description: Creates a booking in the user's calendar.
|
||||||
summary: Creates a booking for a user
|
summary: Creates a booking for a user
|
||||||
tags:
|
tags:
|
||||||
- Booking
|
- 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:
|
/api/book/confirm:
|
||||||
post:
|
post:
|
||||||
description: Accepts an opt-in booking.
|
description: Accepts an opt-in booking.
|
||||||
summary: Accepts an opt-in booking
|
summary: Accepts an opt-in booking
|
||||||
tags:
|
tags:
|
||||||
- Booking
|
- 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:
|
/api/integrations:
|
||||||
get:
|
get:
|
||||||
description: Gets a list of the user's integrations.
|
description: Gets a list of the user's integrations.
|
||||||
summary: Gets the user's integrations
|
summary: Gets the user's integrations
|
||||||
tags:
|
tags:
|
||||||
- Integrations
|
- 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:
|
delete:
|
||||||
description: Deletes a user's integration
|
description: Deletes a user's integration
|
||||||
summary: Deletes a user's integration
|
summary: Deletes a user's integration
|
||||||
tags:
|
tags:
|
||||||
- Integrations
|
- 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:
|
/api/integrations/googlecalendar/add:
|
||||||
get:
|
get:
|
||||||
description: Gets the OAuth URL for a Google Calendar integration.
|
description: Gets the OAuth URL for a Google Calendar integration.
|
||||||
|
@ -515,45 +752,262 @@ paths:
|
||||||
summary: Updates a user's profile
|
summary: Updates a user's profile
|
||||||
tags:
|
tags:
|
||||||
- User
|
- 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:
|
/api/user/membership:
|
||||||
get:
|
get:
|
||||||
description: Get a list of the teams the user has joined.
|
description: Get a list of the teams the user has joined.
|
||||||
summary: Get the teams a user is joined to
|
summary: Get the teams a user is joined to
|
||||||
tags:
|
tags:
|
||||||
- User
|
- 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:
|
patch:
|
||||||
description: Accept team invitation
|
description: Accept team invitation
|
||||||
summary: Accept team invitation.
|
summary: Accept team invitation.
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
teamId:
|
||||||
|
type: string
|
||||||
delete:
|
delete:
|
||||||
description: Leave team or decline membership invite of current user
|
description: Leave team or decline membership invite of current user
|
||||||
summary: Leave team or decline team invite.
|
summary: Leave team or decline team invite.
|
||||||
tags:
|
tags:
|
||||||
- User
|
- User
|
||||||
'/api/:team':
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
teamId:
|
||||||
|
type: string
|
||||||
|
'/api/{team}':
|
||||||
delete:
|
delete:
|
||||||
description: Deletes a team
|
description: Deletes a team
|
||||||
summary: Deletes a team
|
summary: Deletes a team
|
||||||
tags:
|
tags:
|
||||||
- Teams
|
- 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:
|
post:
|
||||||
description: Invites someone to a team.
|
description: Invites someone to a team.
|
||||||
summary: Invites someone to a team
|
summary: Invites someone to a team
|
||||||
tags:
|
tags:
|
||||||
- Teams
|
- 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:
|
get:
|
||||||
description: Lists the members of a team.
|
description: Lists the members of a team.
|
||||||
summary: Lists members of a team
|
summary: Lists members of a team
|
||||||
tags:
|
tags:
|
||||||
- Teams
|
- 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:
|
delete:
|
||||||
description: Cancels a membership (invite) to a team
|
description: Cancels a membership (invite) to a team
|
||||||
summary: Cancels a membership
|
summary: Cancels a membership
|
||||||
tags:
|
tags:
|
||||||
- Teams
|
- 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:
|
servers:
|
||||||
- url: 'https://app.calendso.com'
|
- url: 'https://app.calendso.com'
|
||||||
description: Production
|
description: Production
|
||||||
|
|
Loading…
Reference in a new issue