242 lines
5.1 KiB
JavaScript
242 lines
5.1 KiB
JavaScript
import { Designation } from "../models";
|
|
|
|
export default {
|
|
"/admin/access": {
|
|
post: {
|
|
tags: ["Admin"],
|
|
summary: "Create Access for an Employee",
|
|
requestBody: {
|
|
required: true,
|
|
content: {
|
|
"application/json": {
|
|
schema: {
|
|
type: "object",
|
|
properties: {
|
|
user: {
|
|
type: "string",
|
|
required: true,
|
|
},
|
|
designation: {
|
|
type: "array",
|
|
required: true,
|
|
},
|
|
department: {
|
|
type: "string",
|
|
required: true,
|
|
},
|
|
role: {
|
|
type: "string",
|
|
required: true,
|
|
},
|
|
branch: {
|
|
type: "array",
|
|
items: {
|
|
type: "string",
|
|
},
|
|
required: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"/admin/branches": {
|
|
get: {
|
|
tags: ["Admin"],
|
|
summary: "Get All Branches",
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"/admin/designations": {
|
|
get: {
|
|
tags: ["Admin"],
|
|
summary: "Get All Designations",
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"/admin/departments": {
|
|
get: {
|
|
tags: ["Admin"],
|
|
summary: "Get All Departments",
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"/admin/roles": {
|
|
get: {
|
|
tags: ["Admin"],
|
|
summary: "Get All Roles",
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"/admin/branch": {
|
|
post: {
|
|
tags: ["Admin"],
|
|
summary: "Create New Branch",
|
|
requestBody: {
|
|
required: true,
|
|
content: {
|
|
"application/json": {
|
|
schema: {
|
|
type: "object",
|
|
properties: {
|
|
name: {
|
|
type: "string",
|
|
required: true,
|
|
},
|
|
address: {
|
|
type: "string",
|
|
required: true,
|
|
},
|
|
city: {
|
|
type: "string",
|
|
required: true,
|
|
},
|
|
state: {
|
|
type: "string",
|
|
required: true,
|
|
},
|
|
pincode: {
|
|
type: "string",
|
|
required: true,
|
|
},
|
|
coordinates: {
|
|
type: "object",
|
|
required: true,
|
|
properties: {
|
|
latitude: {
|
|
type: "number",
|
|
required: true,
|
|
},
|
|
longitude: {
|
|
type: "number",
|
|
required: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"/admin/designation": {
|
|
post: {
|
|
tags: ["Admin"],
|
|
summary: "Create New Designation",
|
|
requestBody: {
|
|
required: true,
|
|
content: {
|
|
"application/json": {
|
|
schema: {
|
|
type: "object",
|
|
properties: {
|
|
name: {
|
|
type: "string",
|
|
required: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"/admin/department": {
|
|
post: {
|
|
tags: ["Admin"],
|
|
summary: "Create New Department",
|
|
requestBody: {
|
|
required: true,
|
|
content: {
|
|
"application/json": {
|
|
schema: {
|
|
type: "object",
|
|
properties: {
|
|
name: {
|
|
type: "string",
|
|
required: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"/admin/role": {
|
|
post: {
|
|
tags: ["Admin"],
|
|
summary: "Create New Role",
|
|
requestBody: {
|
|
required: true,
|
|
content: {
|
|
"application/json": {
|
|
schema: {
|
|
type: "object",
|
|
properties: {
|
|
name: {
|
|
type: "string",
|
|
required: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|