282 lines
5.8 KiB
JavaScript
282 lines
5.8 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/metadata": {
|
|
get: {
|
|
tags: ["Admin"],
|
|
summary: "Get All Metadata",
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"/admin/employees": {
|
|
get: {
|
|
tags: ["Admin"],
|
|
summary: "Get All Employees",
|
|
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: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"/admin/employee/{id}": {
|
|
get: {
|
|
tags: ["Admin"],
|
|
summary: "Get Employee Details by ID",
|
|
parameters: [
|
|
{
|
|
in: "path",
|
|
name: "id",
|
|
required: true,
|
|
schema: {
|
|
type: "string",
|
|
},
|
|
},
|
|
],
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"/admin/employee/{user}/locations": {
|
|
get: {
|
|
tags: ["Admin"],
|
|
summary: "Get Employee Details by ID",
|
|
parameters: [
|
|
{
|
|
in: "path",
|
|
name: "user",
|
|
required: true,
|
|
schema: {
|
|
type: "string",
|
|
},
|
|
},
|
|
{
|
|
in: "query",
|
|
name: "date",
|
|
required: true,
|
|
schema: {
|
|
type: "string",
|
|
},
|
|
},
|
|
],
|
|
responses: {
|
|
200: {
|
|
description: "OK",
|
|
content: {},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|