add team availability doc (#11554)
This commit is contained in:
parent
468da1f35a
commit
a3a49f9069
|
@ -10,9 +10,9 @@ import { stringOrNumber } from "@calcom/prisma/zod-utils";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @swagger
|
* @swagger
|
||||||
* /availability:
|
* /teams/{teamId}/availability:
|
||||||
* get:
|
* get:
|
||||||
* summary: Find user or team availability
|
* summary: Find team availability
|
||||||
* parameters:
|
* parameters:
|
||||||
* - in: query
|
* - in: query
|
||||||
* name: apiKey
|
* name: apiKey
|
||||||
|
@ -21,25 +21,14 @@ import { stringOrNumber } from "@calcom/prisma/zod-utils";
|
||||||
* type: string
|
* type: string
|
||||||
* example: "1234abcd5678efgh"
|
* example: "1234abcd5678efgh"
|
||||||
* description: Your API key
|
* description: Your API key
|
||||||
* - in: query
|
* - in: path
|
||||||
* name: userId
|
|
||||||
* schema:
|
|
||||||
* type: integer
|
|
||||||
* example: 101
|
|
||||||
* description: ID of the user to fetch the availability for
|
|
||||||
* - in: query
|
|
||||||
* name: teamId
|
* name: teamId
|
||||||
|
* required: true
|
||||||
* schema:
|
* schema:
|
||||||
* type: integer
|
* type: integer
|
||||||
* example: 123
|
* example: 123
|
||||||
* description: ID of the team to fetch the availability for
|
* description: ID of the team to fetch the availability for
|
||||||
* - in: query
|
* - in: query
|
||||||
* name: username
|
|
||||||
* schema:
|
|
||||||
* type: string
|
|
||||||
* example: "alice"
|
|
||||||
* description: username of the user to fetch the availability for
|
|
||||||
* - in: query
|
|
||||||
* name: dateFrom
|
* name: dateFrom
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
|
@ -59,7 +48,7 @@ import { stringOrNumber } from "@calcom/prisma/zod-utils";
|
||||||
* type: integer
|
* type: integer
|
||||||
* example: 123
|
* example: 123
|
||||||
* description: Event Type ID of the event type to fetch the availability for
|
* description: Event Type ID of the event type to fetch the availability for
|
||||||
* operationId: availability
|
* operationId: team-availability
|
||||||
* tags:
|
* tags:
|
||||||
* - availability
|
* - availability
|
||||||
* responses:
|
* responses:
|
||||||
|
@ -96,7 +85,89 @@ import { stringOrNumber } from "@calcom/prisma/zod-utils";
|
||||||
* 401:
|
* 401:
|
||||||
* description: Authorization information is missing or invalid.
|
* description: Authorization information is missing or invalid.
|
||||||
* 404:
|
* 404:
|
||||||
* description: User not found | Team not found | Team has no members
|
* description: Team not found | Team has no members
|
||||||
|
*
|
||||||
|
* /availability:
|
||||||
|
* get:
|
||||||
|
* summary: Find user availability
|
||||||
|
* parameters:
|
||||||
|
* - in: query
|
||||||
|
* name: apiKey
|
||||||
|
* required: true
|
||||||
|
* schema:
|
||||||
|
* type: string
|
||||||
|
* example: "1234abcd5678efgh"
|
||||||
|
* description: Your API key
|
||||||
|
* - in: query
|
||||||
|
* name: userId
|
||||||
|
* schema:
|
||||||
|
* type: integer
|
||||||
|
* example: 101
|
||||||
|
* description: ID of the user to fetch the availability for
|
||||||
|
* - in: query
|
||||||
|
* name: username
|
||||||
|
* schema:
|
||||||
|
* type: string
|
||||||
|
* example: "alice"
|
||||||
|
* description: username of the user to fetch the availability for
|
||||||
|
* - in: query
|
||||||
|
* name: dateFrom
|
||||||
|
* schema:
|
||||||
|
* type: string
|
||||||
|
* format: date
|
||||||
|
* example: "2023-05-14 00:00:00"
|
||||||
|
* description: Start Date of the availability query
|
||||||
|
* - in: query
|
||||||
|
* name: dateTo
|
||||||
|
* schema:
|
||||||
|
* type: string
|
||||||
|
* format: date
|
||||||
|
* example: "2023-05-20 00:00:00"
|
||||||
|
* description: End Date of the availability query
|
||||||
|
* - in: query
|
||||||
|
* name: eventTypeId
|
||||||
|
* schema:
|
||||||
|
* type: integer
|
||||||
|
* example: 123
|
||||||
|
* description: Event Type ID of the event type to fetch the availability for
|
||||||
|
* operationId: user-availability
|
||||||
|
* tags:
|
||||||
|
* - availability
|
||||||
|
* responses:
|
||||||
|
* 200:
|
||||||
|
* description: OK
|
||||||
|
* content:
|
||||||
|
* application/json:
|
||||||
|
* schema:
|
||||||
|
* type: object
|
||||||
|
* example:
|
||||||
|
* busy:
|
||||||
|
* - start: "2023-05-14T10:00:00.000Z"
|
||||||
|
* end: "2023-05-14T11:00:00.000Z"
|
||||||
|
* title: "Team meeting between Alice and Bob"
|
||||||
|
* - start: "2023-05-15T14:00:00.000Z"
|
||||||
|
* end: "2023-05-15T15:00:00.000Z"
|
||||||
|
* title: "Project review between Carol and Dave"
|
||||||
|
* - start: "2023-05-16T09:00:00.000Z"
|
||||||
|
* end: "2023-05-16T10:00:00.000Z"
|
||||||
|
* - start: "2023-05-17T13:00:00.000Z"
|
||||||
|
* end: "2023-05-17T14:00:00.000Z"
|
||||||
|
* timeZone: "America/New_York"
|
||||||
|
* workingHours:
|
||||||
|
* - days: [1, 2, 3, 4, 5]
|
||||||
|
* startTime: 540
|
||||||
|
* endTime: 1020
|
||||||
|
* userId: 101
|
||||||
|
* dateOverrides:
|
||||||
|
* - date: "2023-05-15"
|
||||||
|
* startTime: 600
|
||||||
|
* endTime: 960
|
||||||
|
* userId: 101
|
||||||
|
* currentSeats: 4
|
||||||
|
* 401:
|
||||||
|
* description: Authorization information is missing or invalid.
|
||||||
|
* 404:
|
||||||
|
* description: User not found
|
||||||
*/
|
*/
|
||||||
interface MemberRoles {
|
interface MemberRoles {
|
||||||
[userId: number | string]: MembershipRole;
|
[userId: number | string]: MembershipRole;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user