node-prisma-structure
Version:
A Node.js API structure using Prisma ORM for scalable and modular development. This package includes a complete authentication API (signup, login, logout, password reset, and token-based authentication) and provides a well-organized directory structure fo
196 lines (193 loc) • 6.19 kB
JavaScript
const { BASE_URL_WITHOUT_API_DOC } = require("./config/node_prisma.constants");
let i = 1;
const apiDoc =[
{},
{
"new_tag": "2",
"color": "red",
"title": "AUTH API",
"icon": "person"
},
{
"new_tag": "0",
"color": "green",
"icon": "person",
"title": `${i++} : AUTH`,
"name": "SIGN UP",
"meth": "POST",
"link": `${BASE_URL_WITHOUT_API_DOC}auth/signup`,
"mandatory": "email, password",
"optional": "",
"is_header": "YES",
"is_push": "NO",
"header": "API-KEY",
"notes": "This Api is used to user Sign Up",
"example": "",
"status": "<br>1. HTTP_OK [200] - status : success <br>2. HTTP_OK [201] - status : error ",
"imp": ""
},
{
"new_tag": "0",
"color": "green",
"icon": "person",
"title": `${i++} : AUTH`,
"name": "LOGIN",
"meth": "POST",
"link": `${BASE_URL_WITHOUT_API_DOC}auth/login`,
"mandatory": "email, password",
"optional": "",
"is_header": "YES",
"is_push": "NO",
"header": "API-KEY",
"notes": "This Api is used to login",
"example": "",
"status": "<br>1. HTTP_OK [200] - status : success <br>2. HTTP_OK [201] - status : error <br>3. HTTP_OK [201] - status : verify <br>4. HTTP_OK [200] - status : complete ",
"imp": ""
},
{
"new_tag": "0",
"color": "green",
"icon": "person",
"title": `${i++} : AUTH`,
"name": "RESEND EMAIL",
"meth": "POST",
"link": `${BASE_URL_WITHOUT_API_DOC}auth/resend-email`,
"mandatory": "user_id",
"optional": "",
"is_header": "YES",
"is_push": "NO",
"header": "API-KEY",
"notes": "This Api is used to resend email",
"example": "",
"status": "<br>1. HTTP_OK [200] - status : success <br>2. HTTP_OK [201] - status : error ",
"imp": ""
},
{
"new_tag": "0",
"color": "green",
"icon": "person",
"title": `${i++} : AUTH`,
"name": "VERIFY ACCOUNT",
"meth": "POST",
"link": `${BASE_URL_WITHOUT_API_DOC}auth/verify-account`,
"mandatory": "verify_token",
"optional": "",
"is_header": "YES",
"is_push": "NO",
"header": "API-KEY",
"notes": "This Api is used to verify account",
"example": "",
"status": "<br>1. HTTP_OK [200] - status : success <br>2. HTTP_OK [201] - status : error ",
"imp": ""
},
{
"new_tag": "0",
"color": "green",
"icon": "person",
"title": `${i++} : AUTH`,
"name": "FORGOT PASSWORD",
"meth": "POST",
"link": `${BASE_URL_WITHOUT_API_DOC}auth/forgot-password`,
"mandatory": "email",
"optional": "",
"is_header": "YES",
"is_push": "NO",
"header": "API-KEY",
"notes": "This Api is used to forgot password",
"example": "",
"status": "<br>1. HTTP_OK [200] - status : success <br>2. HTTP_OK [201] - status : error ",
"imp": ""
},
{
"new_tag": "0",
"color": "green",
"icon": "person",
"title": `${i++} : AUTH`,
"name": "RESET PASSWORD",
"meth": "POST",
"link": `${BASE_URL_WITHOUT_API_DOC}auth/reset-password`,
"mandatory": "forgot_token, new_password, confirm_password",
"optional": "",
"is_header": "YES",
"is_push": "NO",
"header": "API-KEY",
"notes": "This Api is used to reset password",
"example": "",
"status": "<br>1. HTTP_OK [200] - status : success <br>2. HTTP_OK [201] - status : error ",
"imp": ""
},
{
"new_tag": "0",
"color": "green",
"icon": "person",
"title": `${i++} : AUTH`,
"name": "CHANGE PASSWORD",
"meth": "POST",
"link": `${BASE_URL_WITHOUT_API_DOC}auth/change-password`,
"mandatory": "current_password, new_password, confirm_password",
"optional": "",
"is_header": "YES",
"is_push": "NO",
"header": "API-KEY, TOKEN",
"notes": "This Api is used to change password",
"example": "",
"status": "<br>1. HTTP_OK [200] - status : success <br>2. HTTP_OK [201] - status : error ",
"imp": ""
},
{
"new_tag": "0",
"color": "green",
"icon": "person",
"title": `${i++} : AUTH`,
"name": "LOGOUT",
"meth": "GET",
"link": `${BASE_URL_WITHOUT_API_DOC}auth/logout`,
"mandatory": "",
"optional": "",
"is_header": "YES",
"is_push": "NO",
"header": "API-KEY, TOKEN",
"notes": "This Api is used to logout",
"example": "",
"status": "<br>1. HTTP_OK [200] - status : success <br>2. HTTP_OK [201] - status : error ",
"imp": ""
},
{
"new_tag": "0",
"color": "green",
"icon": "person",
"title": `${i++} : AUTH`,
"name": "USER DETAILS",
"meth": "GET",
"link": `${BASE_URL_WITHOUT_API_DOC}auth/user-details`,
"mandatory": "",
"optional": "",
"is_header": "YES",
"is_push": "NO",
"header": "API-KEY, TOKEN",
"notes": "This Api is used to get user details",
"example": "",
"status": "<br>1. HTTP_OK [200] - status : success <br>2. HTTP_OK [201] - status : error ",
"imp": ""
},
{
"new_tag": "0",
"color": "green",
"icon": "person",
"title": `${i++} : AUTH`,
"name": "EDIT PROFILE",
"meth": "POST",
"link": `${BASE_URL_WITHOUT_API_DOC}auth/edit-profile`,
"mandatory": "email",
"optional": "name",
"is_header": "YES",
"is_push": "NO",
"header": "API-KEY, TOKEN",
"notes": "This Api is used to edit profile",
"example": "",
"status": "<br>1. HTTP_OK [200] - status : success <br>2. HTTP_OK [201] - status : error ",
"imp": ""
},
{}
]
module.exports=apiDoc;