Add Link API
johnytiago opened this issue · comments
Draft of the linking api
The link is a feature that allows companies to save the names of the attendees in which they are the most interested in contacting later. This has the potential to allow us to fetch only the CVs of only those users in which the company is interested. It also lays ground for future features to be built upon.
Links are aggregated by company. Moreover, it is the company that links to particular attendee. Not an employee that links to an attendee.
Requirements of the feature
Cannon's users' roles will be further extended (as represented here from the most privileged to the least):
admin
;- new
team
: users of the SINFO team (fetched from deck, or updated manually); - new
company
: a user of typecompany
is an employee working for a company; user
- regular SINFO attendees;
Links
A link has the following structure:
link = {
date: String,
userId: String, # id of the user employee
attendeeId: String,
note: String # notes the user takes of the attendee
}
In the database links are aggregated by company as such:
company: {
edition: [ link ]
}
This structure makes it easy to search only the links a company has made in the current edition
Company users
The issue of promoting a regular user to company is addressed in issue INSERT NUMBER
API
GET
- /company/{companyId}/link
- Lists the links a company has
POST
- /company/{companyId}/link
- Creates a new link
PUT
- /company/{companyId}/link/{id}
- Updates the link
PATCH
- /company/{companyId}/link/{id}
- Updates the link (same as PUT)
DELETE
- /company/{companyId}/link/{id}
- Delete the link