# Required meeting APIs Here are APIs we need on fron-end for `meeting`. # Update/Create meeting We need to determine `attendees` and `teams` of a meeting, either when creating or updating a meeting. A meeting is related to a single `Organization` and has a `Creator` user. ## Input In Addition to existing items, we need these items too: 1. `attendees` [Optional]: An array of `user.id`. They should be added as attendees to the meeting. 2. `teams` [Optional]: An array of `team.id` which their members should be added as attendees to the meeting. The attendees should be distinct. 3. `organizationId` [Required]: This item will be only available on `Create` API and determines, which organization this meeting belongs to. This parameter would not be changed, once the meeting has been created. 4. `certainDate` [Optional]: The user who has created the meeting is capable to change this field. When certain date is picked, the meeting is assumed as completed, and in UI we've to prevent the attendees from polling. This parameter may be cleared on updating meeting. As a suggestion we can wrap all these stuff into a single `meeting` object. So, I think this way every single has its own `id` and distinguishing between what to update, delete an added will be super easy. For instance, if the `creator` updates the time slots, on BE it would be easy to distinguish which slots has been updated, which slots removed, and which items has to established. # Meetings query Another needed API let the FE to fetch the meetings that: - [x] 1. The user is an attendee of (meetingsCreatedByUser(userId: ID!)) - [x] 2. The user is the `creator` of (meetingsAttendedByUser(userId: ID!)) ## Input 1. `userId`: To fetch user's meetings. 2. `OrganizationId` : To filter the meetings by the selected organization. 3. `onlyUpcomings` [optional]: If `true`, fetches only the meetings that either, their `finalDateRange` is not set or the start of their `finalDateRange` still not reached. [color=#a0dd1a] May be in future we need more items on input, to filter more stuff, but I think it's enough for now. Any opinion? On FE side I can easily translate them into this concrete design: ![](https://i.imgur.com/pf9QkM7.jpg)