cyntaria / constructionerp-backend Goto Github PK
View Code? Open in Web Editor NEWA REST API backend system for the construction ERP software made with NodeJS
License: Creative Commons Zero v1.0 Universal
A REST API backend system for the construction ERP software made with NodeJS
License: Creative Commons Zero v1.0 Universal
As a contractor
, I should be able to create laborer accounts, so that I can manage them on projects.
GIVEN an contractor
is creating a laborer account in the desktop app
WHEN the app hits the /laborers
endpoint with a valid POST request, containing:
THEN the app should receive a status 201
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
"first_name": "...",
"affected_rows": 1,
....
}
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
As a contractor
, I should be able to update the details of a laborer, so that I can remove old or inconsistent laborer records.
GIVEN a contractor
is editing a laborer in the desktop app
WHEN the app hits the laborers/:id
endpoint with a valid PATCH request, containing:-
The path parameter:
:id
, the unique id of the laborer whose details are edited.And any of the following body parameters:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "The specified item was updated successfully"
}
body: {}
{Some complementary notes if necessary}
/laborers/:id
endpoint/laborers/:id
endpoint should return the laborer profile with the updated information i.e. matching the initially sent body.This epic is a sub goal of the epic for Milestones API and provides information regarding materials. This epic requires few endpoints to be setup and tested along with their detailed documentation.
This API impacts our project management module as without materials we can't work on milestones. We want to be able to see all possible materials to choose from while ordering in milestones. However, it is not necessary implement before the Milestone Stages API.
The following is true by the end of this API
We must have Authentication API setup prior to this. In the end we need to have a collection of following endpoints:
None
1 week is needed to setup all the foundation, along with testing and documentation. No blockers expected.
As a on-site manager
, I should be able to login, so that I can access the features of this ERP
GIVEN a on-site manager is logging in in the mobile app
WHEN the app hits the auth/login
endpoint with a valid request, containing:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
first_name: "...",
...
}
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
As a contractor
, I should be able to login, so that I can access the features of this ERP
GIVEN a contractor is logging in in the desktop app
WHEN the app hits the auth/login
endpoint with a valid request, containing:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
first_name: "...",
...
}
[Some complementary notes if necessary:]
[notes for QA, with examples if applicable]
As a contractor
, I should be able to search for laborers using the name, so that I can view their details.
GIVEN an contractor
is searching for laborers in the desktop app
WHEN the app hits the /laborers
endpoint with a valid GET request, containing:
the query parameters:
name=starts_with
, for getting a filtered subset of laborers based on their names.THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: [
{
id: 0,
....
},
....
]
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
As a contractor
, I should be able to get all possible roles, so that I can assign one while creating a person/laborer account.
GIVEN an contractor
is requesting all possible roles in the desktop app
WHEN the app hits the /roles
endpoint with a valid GET request
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: [
{
role_id: 0,
role: "contractor"
role_type: "app_user"
},
{
role_id: 5,
role: "plumber"
role_type: "laborer"
},
....
]
GIVEN an contractor
is requesting all roles for a role type in the desktop app
WHEN the app hits the /roles
endpoint with a valid GET request containing the query parameters:
role_type="type_enum"
, where type_enum is one of [app_user, laborer]THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
For query parameter role_type=app_user:
headers: {
error: 0,
message: "..."
}
body: [
{
role_id: 0,
role: "contractor"
role_type: "app_user"
},
{
role_id: 5,
role: "inspector"
role_type: "app_user"
},
....
]
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
As a contractor
, I should be able to get all possible rate types, so that I can choose one while renting equipment.
GIVEN an contractor
is requesting all possible rate types in the desktop app
WHEN the app hits the /rate-types
endpoint with a valid GET request
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: [
{
rate_type_id: 0,
rate_type: "hourly"
},
{
rate_type_id: 1,
rate_type: "daily"
},
....
]
This endpoint is going to be accessible and work the same way for the product owner as well.
{notes for QA, with examples if applicable}
As a product owner
, I should be able to delete a label, so that I can remove old or inconsistent labels.
GIVEN a product owner
is deleting a label in the desktop app
WHEN the app hits the labels/:id
endpoint with a valid DELETE request, containing the path parameter:
:id
, the unique id of the label being removed.THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "The specified item was deleted successfully"
}
body: {}
{Some complementary notes if necessary}
/labels
endpoint.id
returned from the POST, make a DELETE request to /labels/:id
endpoint./labels/:id
endpoint should return a 404 not found status code./labels/:id
endpoint using a contractor
account token.As a product owner
, I should be able to create permissions, so that I can assign them to persons to control modules' access.
GIVEN an product owner
is creating a permissions in the desktop app
WHEN the app hits the /permissions
endpoint with a valid POST request, containing:
THEN the app should receive a status 201
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
"perm_id": "...",
"affected_rows": 1
}
{Some complementary notes if necessary}
/permissions
endpoint and ensure a 201
status code is returned.id
returned by the response in a subsequent GET request to /permissions/:id
endpoint and ensure a 200
status code is returned./permissions
endpoint with an incorrect key name in the body422
status code is returnedcode
parameter should contain an error pointing out failed validation.As a contractor
, I should be able to delete a laborer, so that I can remove old or inconsistent laborer records.
GIVEN a contractor
is deleting a laborer in the desktop app
WHEN the app hits the laborers/:id
endpoint with a valid DELETE request, containing the path parameter:
:id
, the unique id of the laborer whose details are needed.THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "The specified item was deleted sucessfully"
}
body: {}
{Some complementary notes if necessary}
A typical test case for a DELETE request would look like this:
/laborers
endpointid
returned from the POST, make a DELETE request to /laborers/:id
endpoint/laborers/:id
endpoint should return a 404 not found status code.This epic is a sub goal of the epic for Persons API and provides information regarding roles. This epic requires few endpoints to be setup and tested along with their detailed documentation.
We want to be able to see all possible roles so that we can assign one to a person during account signup. This is the 1st API that should be worked on under Persons API, after Authentication API is complete.
The following is true by the end of this API
We must have Authentication API setup prior to this. In the end we need to have a collection of following endpoints:
Note: ๐ symbol indicates the route is protected and accessible to product owner only
None
A single role can have one of the following role types:
app_user
, used for contractors, inspectors, home owners etc.laborer
, used for plumbers, electricians, carpenter etc.2 days are needed to setup all the foundation, along with testing and documentation. No blockers expected.
This epic is a sub goal of the epic for Equipment API and provides information regarding rate types. This epic requires few endpoints to be setup and tested along with their detailed documentation.
We want to be able to see all possible rate types so that we can assign a rate during equipment rental in milestones. However, it is not necessary until to implement this until we are working on the Equipment API.
The following is true by the end of this API
We must have Authentication API setup prior to this. In the end we need to have a collection of following endpoints:
Note: ๐ symbol indicates the route is protected and accessible to product owner only
None
2 days are needed to setup all the foundation, along with testing and documentation. No blockers expected.
As a home owner
, I should be able to login, so that I can access the reports of my projects
GIVEN a home owner is logging in in the mobile app
WHEN the app hits the auth/login
endpoint with a valid request, containing:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
first_name: "...",
...
}
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
As a contractor
, I should be able to get all possible labels, so that I can assign them to a milestone to describe its scope of work.
GIVEN an contractor
is requesting all possible labels in the desktop app
WHEN the app hits the /labels
endpoint with a valid GET request
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: [
{
label_id: 0,
label: "foundation"
},
{
label_id: 1,
label: "basement"
},
....
]
This endpoint is going to be accessible and work the same way for the product owner as well.
{notes for QA, with examples if applicable}
As a product owner
, I should be able to get all possible permissions, so that I can assign them to a person to control their access to modules.
GIVEN an product owner
is requesting all possible permissions in the desktop app
WHEN the app hits the /permissions
endpoint with a valid GET request
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: [
{
perm_id: 0,
permission: "read"
},
{
perm_id: 5,
permission: "write"
},
....
]
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
As a product owner
, I should be able to signup, so that I can access features of this ERP.
GIVEN a product owner signs up in the desktop app
WHEN the app hits the auth/signup
endpoint with a valid request, containing:
THEN the app should receive a status 201
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
first_name: "...",
...
token: "....",
}
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
This epic is a goal of the larger epic of Milestones API and contains functionality for equipment rentals in our project. This epic requires multiple endpoints to be setup and tested along with their detailed documentation.
This epic is a sub part of the Milestones API and is needed to provide management of equipment under a milestone. However, it is not necessary for all milestones to require rented equipment so this API can be pushed towards the end.
The API must provide management of equipment under a milestone. This epic is considered complete when the following features are complete:
We must have Authentication API setup prior to this. In the end we need to have a collection of following endpoints:
None
3 days are needed to setup all the foundation, along with testing and documentation. No blockers expected.
This epic is a sub goal of the epic for Payments API and provides information regarding payment types. This epic requires few endpoints to be setup and tested along with their detailed documentation.
We want to be able to see all possible reasons for a payment so that we can choose a type as reason during payment in milestones. However, it is not necessary until to implement this till we're working on the Payments API.
The following is true by the end of this API
We must have Authentication API setup prior to this. In the end we need to have a collection of following endpoints:
Note: ๐ symbol indicates the route is protected and accessible to product owner only
None
2 days are needed to setup all the foundation, along with testing and documentation. No blockers expected.
This epic is a sub goal of the epic for Permissions API and provides information regarding types of permissions. This epic requires few endpoints to be setup and tested along with their detailed documentation.
We want to be able to see all possible permissions so that we can assign to a person for access control. This is the 2nd API that should be worked on under Persons API, after Authentication API is complete.
The following is true by the end of this API
We must have Authentication API setup prior to this. In the end we need to have a collection of following endpoints:
Note: ๐ symbol indicates the route is protected and accessible to product owner only
None
2 days are needed to setup all the foundation, along with testing and documentation. No blockers expected.
As a contractor
, I should be able to get details of a laborer, so that I can view his profile and assign him work.
GIVEN a contractor
is requesting details of a laborer in the desktop app
WHEN the app hits the laborers/:id
endpoint with a valid GET request, containing the path parameter:
:id
, the unique id of the laborer whose details are needed.THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
id: 0,
first_name: "...."
....
}
{Some complementary notes if necessary}
GIVEN a contractor
is requesting details of a laborer in the desktop app
WHEN the laborers/:id` endpoint receives valid GET request, containing the path parameter:
:id
THEN the app should receive a status 200
AND the {id}
in the body should be same as the :id
in the path parameter
As an product owner
, I should be able to login, so that I can access the features of this ERP
GIVEN a product owner
is logging in in the desktop app
WHEN the app hits the auth/login
endpoint with a valid request, containing:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
first_name: "...",
...
token: "....",
}
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
As a contractor
, I should be able to get details of a single role, so that I can understand which person is it for.
GIVEN a contractor
is requesting details of a role in the desktop app
WHEN the app hits the roles/:id
endpoint with a valid GET request, containing the path parameter:
:id
, the unique id of the role whose details are needed.THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
role_id: 0,
role: "home_owner"
role_type: "app_user"
}
{Some complementary notes if necessary}
GIVEN a contractor
is requesting details of a role in the desktop app
WHEN the app hits the roles/:id
endpoint with a valid GET request, containing the path parameter:
:id
THEN the app should receive a status 200
AND the {id}
in the body should be same as the :id
in the path parameter
As a product owner
, I should be able to get details of a single permission, so that I can understand what is the scope of the access it allows.
GIVEN a product owner
is requesting details of a permission in the desktop app
WHEN the app hits the permissions/:id
endpoint with a valid GET request, containing the path parameter:
:id
, the unique id of the permission whose details are needed.THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
perm_id: 0,
permission: "write"
}
{Some complementary notes if necessary}
GIVEN a product owner
is requesting details of a permission in the desktop app
WHEN the app hits the permissions/:id
endpoint with a valid GET request, containing the path parameter:
:id
THEN the app should receive a status 200
AND the {id}
in the body should be same as the :id
in the path parameter
As a product owner
, I should be able to create roles, so that I can assign them to persons/laborers.
GIVEN an product owner
is creating a role in the desktop app
WHEN the app hits the /roles
endpoint with a valid POST request, containing:
THEN the app should receive a status 201
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
"role_id": "0",
"affected_rows": 1
}
{Some complementary notes if necessary}
/roles
endpoint and ensure a 201
status code is returned.id
returned by the response in a subsequent GET request to /roles/:id
endpoint and ensure a 200
status code is returned./roles
endpoint with the role_type
containing a value not in [app_user,laborer].422
status code is returnedcode
parameter should contain an error pointing out failed validation.This epic is a goal of the larger epic of REST API and contains functionality for project management in our project. This epic requires multiple endpoints to be setup and tested along with their detailed documentation.
This epic is a core part of the overall project.
The API must provide management and information for projects. This epic is considered complete when the following features are complete:
We must have Authentication and Persons API setup prior to this. In the end we need to have a collection of following endpoints:
None
2 weeks are needed to setup all the foundation, along with testing and documentation plus an additional week to test the merged sub epics. The structure of materials and payments endpoint might change in order to reduce joins to improve search queries.
As a product owner
, I should be able to delete a permission, so that I can remove old or inconsistent permissions.
GIVEN a product owner
is deleting a permission in the desktop app
WHEN the app hits the permissions/:id
endpoint with a valid DELETE request, containing the path parameter:
:id
, the unique id of the permission being removed.THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "The specified item was deleted successfully"
}
body: {}
{Some complementary notes if necessary}
A typical test case for a DELETE request would look like this:
/permissions
endpointid
returned from the POST, make a DELETE request to /permissions/:id
endpoint/permissions/:id
endpoint should return a 404 not found status code.This epic is a goal of the larger epic of Milestones API and contains functionality for label assignment in our project. This epic requires multiple endpoints to be setup and tested along with their detailed documentation.
This epic is a sub part of the Milestones API.
The API must provide management of labels. This epic is considered complete when the following features are complete:
We must have Authentication API setup prior to this. In the end we need to have a collection of following endpoints:
Note: ๐ symbol indicates the route is protected and accessible to product owner only
None
2 days are needed to setup all the foundation, along with testing and documentation. No blockers expected.
As a product owner
, I should be able to create accounts, so that I can signup contractors, their workforce and home owners.
GIVEN an product owner
is creating a user account in the desktop app
WHEN the app hits the /persons
endpoint with a valid POST request, containing:
THEN the app should receive a status 201
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
first_name: "...",
...
token: "..."
}
GIVEN when a request arrives for creating an account
AND the role id belongs to the type contractor
THEN the app should receive a status 403
(Forbidden)
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 1,
code: "SOME_ERROR_KEY"
message: "..."
}
body: {}
As an inspector
, I should be able to login, so that I can access the features of this ERP
GIVEN an inspector
is logging in in the mobile app
WHEN the app hits the auth/login
endpoint with a valid request, containing:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
first_name: "...",
...
}
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
As a contractor
, I should be able to get details of a single label, so that I can understand what kind of work it describes/represents.
GIVEN a contractor
is requesting details of a label in the desktop app
WHEN the app hits the labels/:id
endpoint with a valid GET request, containing the path parameter:
:id
, the unique id of the label for which the details are needed.THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
label_id: 0,
label: "interior"
}
This endpoint is accessible by and serves the product owner in the same way.
GIVEN a contractor
is requesting details of a label in the desktop app
WHEN the app hits the labels/:id
endpoint with a valid GET request, containing the path parameter:
:id
THEN the app should receive a status 200
AND the {id}
in the body should be same as the :id
in the path parameter
As a product owner
, I should be able to update the details of a role, so that I can fix old or inconsistent roles.
GIVEN a product owner
is editing a role in the desktop app
WHEN the app hits the roles/:id
endpoint with a valid PATCH request, containing:-
The path parameter:
:id
, the unique id of the role whose details are edited.And any of the following body parameters:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "The specified item was updated successfully"
}
body: {}
{Some complementary notes if necessary}
/roles/:id
endpoint/roles/:id
endpoint should return the role details with the updated information i.e. matching the initially sent body.This epic is a sub goal of the epic for Milestones API and provides management and information of stages in a milestone. This epic requires few endpoints to be setup and tested along with their detailed documentation.
This API impacts our project management module as without stages we can't progress the milestones. We want to be able to set different criteria stages in milestones to track progress. It is the first thing that we need to work on under Milestones API.
The following is true by the end of this API
We must have Authentication and Persons API setup prior to this. In the end we need to have a collection of following endpoints:
None
10 days are needed to setup all the foundation, along with testing and documentation. Using of project role id instead of person permission id might be something that will change and can cause a few endpoints to be refactored as well as their tests
This epic is a goal of the larger epic of REST API and contains functionality for persons in our project. This epic requires multiple endpoints to be setup and tested along with their detailed documentation.
This epic is a high impact goal as it provided the foundation for other API Epics.
The API must provide person profile features, roles and permissions. This epic is considered complete when the following features are complete:
We need Authentication API to be complete only for the endpoints of this API, not for some internal functionality. This API only focuses on user related tasks. It should make sure the entire Roles API and Permissions API is complete as well.
None
2 weeks are needed to setup all the foundation, along with testing and documentation. No blockers so far
As a product owner
, I should be able to delete a role, so that I can remove old or inconsistent roles.
GIVEN a product owner
is deleting a role in the desktop app
WHEN the app hits the roles/:id
endpoint with a valid DELETE request, containing the path parameter:
:id
, the unique id of the role being removed.THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "The specified item was deleted successfully"
}
body: {}
{Some complementary notes if necessary}
A typical test case for a DELETE request would look like this:
/roles
endpointid
returned from the POST, make a DELETE request to /roles/:id
endpoint/roles/:id
endpoint should return a 404 not found status code.This epic is a goal of the larger epic of REST API and contains functionality for authentication in our project. This epic requires multiple endpoints to be setup and tested along with their detailed documentation.
This epic is a high impact goal as it provided the foundation for other API Epics.
The API must provide person authentication, request validation and request verification. This epic is considered complete when the following features are complete:
We must have person types and roles setup to control permissions in this API. This API only focuses on auth related tasks for persons, requests and apps.
None
2 weeks are needed to setup all the foundation, along with testing and documentation. No blockers so far
This epic is a sub goal of the epic for Projects API and provides functionality surrounding project milestones. This epic requires multiple endpoints to be setup and tested along with their detailed documentation.
This API impacts our project management module as without milestones we can't create tasks for our project and we can't proceed. We want to be able to divide a project into milestones each with it's own materials, stages, payments and equipment. We can track what labor is working on each milestone daily. We can assign labels to a milestone to indicate what is it's scope. We should work on this immediately after setting up Projects API.
The following is true by the end of this API
We must have Authentication, Projects and Labors API setup prior to this. In the end we need to have a collection of following endpoints:
None
5 weeks are needed to setup all the foundation, along with testing and documentation. No blockers expected.
As a person
, I should be able to change my password, so that I can choose an updated one for security reasons.
GIVEN a person
is logged in in the desktop app
AND they change their password
WHEN the app hits the auth/change_password
endpoint with a valid request, containing:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
rows_updated: 1,
}
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
This epic is a sub goal of the Complete REST API and provides information regarding permissions. This epic requires few endpoints to be setup and tested along with their detailed documentation.
We want to be able to see all possible permissions so that we can assign to a person during account access setup. This is the 1st API that should be worked on after Persons API is complete.
The following is true by the end of this API
We must have Authentication API setup prior to this. In the end we need to have a collection of following endpoints:
None
2 days are needed to setup all the foundation, along with testing and documentation. No blockers expected.
This epic is a large component of the overall project and is used to communicate between our server and our apps. This epic needs to prepare a working, fully functional REST API with multiple endpoints for use cases.
It is high impact since it used to communicate between our server and our apps so without this the project can not work.
A documented API is received in the end containing all functionalities for the project. These are the endpoint collections it must have:
We need documentation, tested API endpoint URLs, Postman collection for each endpoints and a backup of the database schema and data.
@diablo-shotgun @sfurqan2 are members of the engineering team who will verify the completion.
3 months is the approximate timeline, a working deployable server is needed for the API as well as the DB instance. Currently, there are no identified blockers.
As a contractor
, I should be able to create accounts, so that I can create user accounts for inspectors and on-site managers.
GIVEN an contractor
is creating a user account in the desktop app
WHEN the app hits the /persons
endpoint with a valid POST request, containing:
THEN the app should receive a status 201
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
first_name: "...",
...
token: "..."
}
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
As a contractor
, I should be able to get details of a single rate type, so that I can understand what kind of rate it describes/represents.
GIVEN a contractor
is requesting details of a rate type in the desktop app
WHEN the app hits the rate-types/:id
endpoint with a valid GET request, containing the path parameter:
:id
, the unique id of the rate type for which the details are needed.THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
rate_type_id: 0,
rate_type: "hourly"
}
This endpoint is accessible by and serves the product owner in the same way.
GIVEN a contractor
is requesting details of a rate type in the desktop app
WHEN the app hits the rate-types/:id
endpoint with a valid GET request, containing the path parameter:
:id
THEN the app should receive a status 200
AND the {id}
in the body should be same as the :id
in the path parameter
As a product owner
, I should be able to update the details of a label, so that I can fix old or inconsistent labels.
GIVEN a product owner
is editing a label in the desktop app
WHEN the app hits the labels/:id
endpoint with a valid PATCH request, containing:-
The path parameter:
:id
, the unique id of the label of which the details are edited.And any of the following body parameters:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "The specified item was updated successfully"
}
body: {}
{Some complementary notes if necessary}
/labels/:id
endpoint/labels/:id
endpoint should return a status code 200 and the permission details with the updated information i.e. matching the initially sent body./labels/:id
endpoint using a contractor
account token.As a person
, I should be able to reset my password, so that I can gain access to my account.
GIVEN a person
is choosing forget password in the desktop app
WHEN the app hits the auth/forgot_password
endpoint with a valid request, containing:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "OTP sent to mail"
}
body: {}
GIVEN a person
is verifying otp in the desktop app
WHEN the app hits the auth/verify_otp
endpoint with a valid request, containing:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "OTP verified"
}
body: {}
GIVEN a person
is resetting password in the desktop app
WHEN the app hits the auth/reset_password
endpoint with a valid request, containing:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "Password Reset Successful"
}
body: {}
{Some complementary notes if necessary}
{notes for QA, with examples if applicable}
This epic is a goal of the larger epic of REST API and contains functionality for laborers management in our project. This epic requires multiple endpoints to be setup and tested along with their detailed documentation.
This epic is is essential to the working of the entire project but has to be implemented near the end of the REST API Epic.
The API must provide management for laborers. This epic is considered complete when the following features are complete:
We must have Authentication and Users API setup. In the end we need to have a collection of following endpoints:
None
1 weeks are needed to setup all the foundation, along with testing and documentation. No blockers so far
As a product owner
, I should be able to update the details of a permission, so that I can fix old or inconsistent permissions.
GIVEN a product owner
is editing a permission in the desktop app
WHEN the app hits the permissions/:id
endpoint with a valid PATCH request, containing:-
The path parameter:
:id
, the unique id of the permission whose details are edited.And any of the following body parameters:
THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "The specified item was updated successfully"
}
body: {}
{Some complementary notes if necessary}
/permissions/:id
endpoint/permissions/:id
endpoint should return the permission details with the updated information i.e. matching the initially sent body.As a product owner
, I should be able to create labels, so that the contractor can assign them to milestones.
GIVEN an product owner
is creating a label in the desktop app
WHEN the app hits the /labels
endpoint with a valid POST request, containing:
THEN the app should receive a status 201
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
"label_id": "...",
"affected_rows": 1
}
{Some complementary notes if necessary}
/labels
endpoint and ensure a 201 status code is returned.id
returned by the response in a subsequent GET request to /labels/:id
endpoint and ensure a 200 status code is returned./labels
endpoint with an incorrect key name in the bodycode
parameter should contain an error pointing out failed validation./labels
endpoint with a contractor
account token.code
parameter should contain an error pointing out failed access.This epic is a sub goal of the epic for Milestones API and provides management of payments. This epic requires multiple endpoints to be setup and tested along with their detailed documentation.
We want to be able to see all create, manage, retrieve and summarize payments under a milestone. However, it is not necessary until to implement this till all other sub goals of a milestone are complete.
The following is true by the end of this API
We must have Authentication API setup prior to this. In the end we need to have a collection of following endpoints:
None
1 week is needed to setup all the foundation, along with testing and documentation. No blockers expected.
As a contractor
, I should be able to get details of a single label, so that I can understand what kind of work it describes/represents.
GIVEN a contractor
is requesting details of a label in the desktop app
WHEN the app hits the labels/:id
endpoint with a valid GET request, containing the path parameter:
:id
, the unique id of the label for which the details are needed.THEN the app should receive a status 200
AND in the response, the following information should be returned:
Sample Request/Sample Response
headers: {
error: 0,
message: "..."
}
body: {
label_id: 0,
label: "interior"
}
This endpoint is accessible by and serves the product owner in the same way.
GIVEN a contractor
is requesting details of a label in the desktop app
WHEN the app hits the labels/:id
endpoint with a valid GET request, containing the path parameter:
:id
THEN the app should receive a status 200
AND the {id}
in the body should be same as the :id
in the path parameter
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.