these would be the features we would want if we would rewrite helpq
- lcs login
- get user data
- form to submit tickets
- retract tickets
- estimated wait
- see how many mentors are online and available with websocket/window.isFocused (wishlist) (websock)
- see live feed of tickets (websocket)
- claim a ticket
- unclaim a ticket
- complete a ticket
- mark yourself as offline (wishlist)
- most of what helpq provides for
- word frequency thing to see what people are asking for help with.
- how many tickets get answered
- hacker and mentor count
- promote user to mentor
- create user (local non lcs)
- see how many tickets are in the queue
- see all tickets
- set q status
- POST /login {username:"", password:""}
- {ok: true, user: {isMentor, name: ""}, token} if login was valid
- {ok: false, err: ""} if invalid login token will be given to firebase for login
Tickets will be done through client talking to firebase
- mentees should only be able to see their ticket and only have one ticket
- mentees shouldn't be able to submit tickets to a closed queue
- mentors shoul be able to see all tickets
- mentees should not delete tickets but can mark it as resolved
- mentors can mark any ticket as resolved
- GET /qstatus /qstatus contains one document {mentorsOnline, mentorsOnShift, qOpen, avgResponseTime}
##js api
- login(username, pass): promise<{token, user: {isMentor: bool, name: ""}> throws BadLogin
- loginToken(token): promise<token, isMentor: bool> throws BadLogin
- login in puts token in local storage
- logOut()
- removes token from local storage
- start(token): promise opens websoc
- onNewTicket: (ticket)=>unit
- onNewQStatus: (qStatus)=>unit
- newTicket(ticketData): promise throws AlreadyDone, BadTicket
- getTicket(): promise
- retractTicket(): promise throws NoTicket gives the retracted ticket
- for user to potentialy update
- getQStatus(): promise
- claimTicket(ticketId): promise thows AlreadyDone, NoTicket
- unClaimTicket(): promise throws NoTicket
- getTickets(alsoCompletedOnes): promise<array>
- mentorStatus(here) tell help queue you're here or away.
- could be hooked into window.onfocus and window.onblur
- complete(ticketId): promise throws NoTicket, AlreadyDone
- BadLogin
- NoTicket
- BadTicket
- AlreadyDone
- user
- token
- webSocket