real-dev-squad / website-api-contracts Goto Github PK
View Code? Open in Web Editor NEWAll the API contracts that we will use in our apps
Home Page: https://api.realdevsquad.com/
License: MIT License
All the API contracts that we will use in our apps
Home Page: https://api.realdevsquad.com/
License: MIT License
Schema for this entity is as follows:
- featureFlag
+ name [String] <Unique>
+ title [String]
+ id [String] <Unique>
+ created_at [Timestamp]
+ updated_at [Timestamp]
+ config [Object]
- enabled [Boolean]
+ owner [String] (Unique identifier for user)
+ launched_at [Timestamp]
These are the routes required for CRUD over this entity.
The dashboard work is blocked on the create route and GET route, so we should finalize that part and the rest can be done async.
API contract to be validated according to the code in backend, currently there are few routes out of sync
Right now when we try to get tasks through the GET /tasks
API we get all of them regardless of what is the status of them.
So we need to add a query param status
to our endpoint so that we can filter the data based on the status of the tasks on the backend only and then use it in any manner we would like to do so.
API Endpoint: https://api.realdevsquad.com/users/picture
Update User API contract to add new field:
The API that deals with updating the Archived role to true if the user is not in our discord was put under the PATCH /users endpoint with a request body differentiating it from the previous API that exists for the same route.
But, this API is not following the best API naming convention as it is not representing the resources it is modifying correctly.
This RFC aims at finding the API name that follows a better API naming convention.
We have created a new API that will mark all the users Archived that are not in our discord i.e. set the archived=true
for users that have in_discord=false
.
Initially, the API name was PATCH /users/update-archived
. As this is not correct because the verb is defined by the action PATCH
so adding update
in the endpoint is not correct.
Then, possible route names are proposed.
As in these routes archived
is not representing a resource another solution proposed was,
Put the API under PATCH /users by defining the proper body. This is the current implementation.
Here is the API contact: https://github.com/Real-Dev-Squad/website-api-contracts/tree/main/users#patch-users
Add API contracts for question and answers feature in live-site.
assignee
and title
queries are missing in queries details for GET /tasks request.
Relates to task for #1
This is to extend the ability of the GET /tasks
API from the backend to also support filtering by parameters passed as queries.
The functioning would be as follows:-
limit or offset
then the response will get all the tasks there are in the database or default to a no. of documents to return.limit and offset
is passed then it would return all the documents which are created after the created time of the <task_object> whose id = offset
, plus would only return n
no. of documents where n = limit
and therefore would also work as a paginated API.Real-Dev-Squad/website-www#343
This PR provides API contracts for live site - Real-Dev-Squad/website-www#343 and Real-Dev-Squad/website-www#427.
remove POST/save
, POST/purchase
api contracts
POST/send
/ POST/request
->
${amout} credited/debited to ${user}
)GET/transactions
->
userid
as param and limit
as queryGET/userinfo
->
Real-Dev-Squad/website-www#343
Below APIs require documentation as per the 2nd release cycle of live site with moderator controls & kickout feature.
Route | Description |
---|---|
POST /events/:id/peers | Add a peer to a specific event. |
PATCH /events/:id/peers/kickout | Kick out a peer from a specific event. |
POST /events/:id/codes | Generate event codes for a specific event. |
GET /events/:id/codes | Get event codes for a specific event. |
After running the Real-Dev-Squad/website-backend#1227, we will be removing token field.
Update the Users API contract to remove token field from it.
Since the signup form is now taking phone number and email address, we should not send them as response for every API. No user should be able to see other user's phone number and email address.
No route other than GET users/self
should return phone
and email
and that too only if query private
is set to true
Skills
property, which will be an array and contain the skills document idcreate API contract for /tasks/:id/details
Details :- Real-Dev-Squad/website-members#293
Create GET POST PATCH... APIs for auction page.
Return recruiters collection data
Returns the availability of username.
username=[string]
<JWT>
{ 'isUsernameAvailable': <boolean> }
{ 'statusCode': 401, 'error': 'Unauthorized', 'message': 'Unauthenticated User' }
{ 'statusCode': 500, 'error': 'Internal Server Error', 'message': 'An internal server error occurred' }
Returns the availability of username.
firstname=[string]
(The first name of the user)lastname=[string]
(The last name of the user)dev=[boolean]
(dev is passed to get username in the developer mode with the feature that are flagged)<JWT>
{ 'username': <string> }
{ 'statusCode': 401, 'error': 'Unauthorized', 'message': 'Unauthenticated User' }
{ 'statusCode': 500, 'error': 'Internal Server Error', 'message': 'An internal server error occurred' }
Title: Create API Contract for /request
Route
Develop and document the API contract for the unified /request
endpoint. The API contract should clearly define the request and response structures, including all required and optional fields for task creation requests.
A documented and approved API contract that includes all necessary fields and validation rules for the /request
endpoint.
No existing API contract for the /request
endpoint.
N/A
N/A
Ensure the API contract is reviewed with the team for feedback and approval.
/link
or /verify
command is being run.{
title: String,
description: String,
status: Enum,
tasks: [
<TaskId>
<TaskId>
],
featureOwner: <UserId>,
backendEngineer: <UserId>,
frontendEngineer: <UserId>,
StartedOn: Epoch,
EndsOn: Epoch, // Due date
}
Can we take a look here please: https://github.com/Real-Dev-Squad/website-api-contracts/pull/40/files#r593776779
Contract to return all users who are members of RDS who are not assigned tasks
Add unAssigned
status in task
object
Discord discussion
Task object to be changed
There are no error responses in Challenges API contracts, please add the same.
Error responses can be collected from the code.
Define new member API contract to implement the feature request.
Required Changes
/migrations/addDefaultColorProperty this API adds a colors
field to all existing users, who do not have a colors property
The API contract needs to be changed to
{
"id": "String",
"userId": "String",
"first_name": "String",
"Last_name": "String",
"picture": {
"publicId": "String",
"url": "String"
},
"status": {
"until":"TimeStamp",
"updatedAt": "TimeStamp",
"state": "String",
"message": "String",
"from": "TimeStamp"
},
"monthlyHours": {
"committed": "Integer",
"updatedAt": "TimeStamp"
}
}
/cache
/logs/:type
The route /users/userId/:userId
is missing in the API Contracts of /users
. Need to update it
If we make each API as a main folder under the repo, it would be difficult to navigate and understand the hierarchy.
For example, we would now have an auction page and investment page under crypto-site, so
crypto-site
crypto-site
|---- README.md
|---- auction
| |---- README.md
|---- investment
|---- README.md
instead of
.
|---- README.md
|---- auction
| |---- README.md
|---- investment
|---- README.md
Description:
Create comprehensive API Contracts for the /requests
API to ensure clarity and consistency in request and response structures.
Details:
/requests
dev
(for development environment)Requirements:
Purpose:
Facilitate clear communication between frontend and backend teams, ensuring a smooth integration process.
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.