Contains Routes Related to Authentication and Signup
- User SIGN in token verification and cookie creation in FE
- Input json payload expected
{ "idToken" = "Firebasae ID token" }
- Output json on Success 200
{ "status" = "Success", user_details = { "access_token" = "timeLimitedAuthToken valid for 7 days", "email" = "[email protected]" } }
- Route to set user data for 1st time
- Input json payload expected
{ "name" = "Some Dummy", "dob" = "yyyy-mm-dd", "phone" = "+1 1010101010", "personalEmail" = "email.example.com" }
- Output json on Success 200
{ "status" = "Success", "user_id" = "some_user_id" }
- Remove the HTTP only cookie for login
- Output json on Success 200
{ "status" = "Success", "user_id" = "some_user_id" }
Contains Routes that Permitted to all employees
Note: Make sure to have the Authentication Header while making request or access_token Cookie in the FE
- Get User Info
- Output json on Success 200
{ "status" = "Success", "user_data" = { "user_id" = "User ID", "name" = "Name Name", "dob" = "yyyy-mm-dd", "phone" = "+100 1001001001", "email" = "[email protected]", "personal_email" = "[email protected]", "role" = "SDE1", "team_id" = "MY TEAM", "team_name" = "MY TEAM NAME", "salary" = 101.00, "is_manager" = True, "manager_id" = "MAN ID", "manager_name" = "MAN NAME", "manager_email" = "[email protected]", "payments" = [ { "date" = "yyyy-mm-dd", "description" = "Some random Payment", "amount" = 101.00, "type" = "Debit" }, { "date" = "yyyy-mm-dd", "description" = "Some other random Payment", "amount" = 10.00, "type" = "Credit" } ] } }
- Update the data that is accessable to all employees
- Input json payload expected
{ "name" = "Name Name", "dob" = "yyyy-mm-dd", "phone" = "+100 1001001001" "personal_email" = "[email protected]" }
- Output json on Success 200
{ "status" = "Success" }
- Allows employees to request for leaves
- Input json payload expected
{ "leave_start" = "yyyy-mm-dd", "leave_end" = "yyyy-mm-dd", "created" = "yyyy-mm-dd", "description" = "Some Random reason" }
- Output json on Success 200
{ "status" = "Success" }
- Allows employees to request for leaves
- Input json payload expected
{ "type" = "loan/raise", "amount" = 100.10, "created" = "yyyy-mm-dd", "description" = "Some Random reason" }
- Output json on Success 200
{ "status" = "Success" }
- reqType can be one of "leave", "loan", "raise"
- markedAs can be one of "pending", "accept", "reject"
- Allows employees to get their requested leaves/loans/raise
- Output json on Success 200
{ "status" = "Success", "loan" = { "created" = "2021-01-24", "creator_email" = "[email protected]", "creator_id" = "0TXsyoWB2", "creator_name" = "Some Name", "description" = "Test", "leave_end" = "2021-01-25", "leave_id" = "0ToWB2-07LM", "leave_start" = "2021-01-25", "marked_as" = "pending", "marked_by_email" = "", "marked_by_name" = "", "marked_by_uid" = "", "type" = "leave" } }
Documentation for the rest is under Progress