|
|
|
@ -31,6 +31,10 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
|
//name: { type: 'string' },
|
|
|
|
|
|
|
|
|
|
team: { type: 'string', default: null },
|
|
|
|
|
zone: { type: 'string', default: null },
|
|
|
|
|
designation: { type: 'string', default: null },
|
|
|
|
|
reportingManager: { type: 'string', default: null },
|
|
|
|
|
departmentName: { type: 'string', default: null },
|
|
|
|
|
manager: { type: 'string', default: null },
|
|
|
|
|
address: { type: 'string', default: null },
|
|
|
|
|
address1: { type: 'string', default: null },
|
|
|
|
@ -102,6 +106,10 @@ fastify.post('/api/stores', {
|
|
|
|
|
properties: {
|
|
|
|
|
storename: { type: "string" },
|
|
|
|
|
password: {type: "string"},
|
|
|
|
|
zone: { type: 'string', default: null },
|
|
|
|
|
designation: { type: 'string', default: null },
|
|
|
|
|
reportingManager: { type: 'string', default: null },
|
|
|
|
|
departmentName: { type: 'string', default: null },
|
|
|
|
|
phone: { type: "string", unique: true, trim: true },
|
|
|
|
|
contactPersonName: { type: "string" },
|
|
|
|
|
contactPersonPhone: { type: "string", unique: true, trim: true },
|
|
|
|
@ -143,6 +151,11 @@ fastify.post('/api/salesSignUp', {
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
|
username: { type: "string" },
|
|
|
|
|
designation: { type: 'string', default: null },
|
|
|
|
|
reportingManager: { type: 'string', default: null },
|
|
|
|
|
departmentName: { type: 'string', default: null },
|
|
|
|
|
zone: { type: 'string', default: null },
|
|
|
|
|
|
|
|
|
|
phone: { type: "string" },
|
|
|
|
|
password: { type: "string" },
|
|
|
|
|
emails: { type: "string" },
|
|
|
|
@ -153,6 +166,10 @@ fastify.post('/api/salesSignUp', {
|
|
|
|
|
firstName: { type: "string" },
|
|
|
|
|
lastName: { type: "string" },
|
|
|
|
|
address: { type: "string" },
|
|
|
|
|
city: { type: 'string', default: null },
|
|
|
|
|
state: { type: 'string', default: null },
|
|
|
|
|
zip: { type: 'string', default: null },
|
|
|
|
|
country: { type: 'string', default: null },
|
|
|
|
|
},
|
|
|
|
|
required: ["firstName", "lastName"]
|
|
|
|
|
}
|
|
|
|
@ -262,6 +279,10 @@ fastify.put('/api/editSalesUser/:salesId', {
|
|
|
|
|
properties: {
|
|
|
|
|
username: { type: "string" },
|
|
|
|
|
phone: { type: "string" },
|
|
|
|
|
zone: { type: 'string', default: null },
|
|
|
|
|
designation: { type: 'string', default: null },
|
|
|
|
|
reportingManager: { type: 'string', default: null },
|
|
|
|
|
departmentName: { type: 'string', default: null },
|
|
|
|
|
password: { type: "string" },
|
|
|
|
|
emails: { type: "string" },
|
|
|
|
|
address: { type: "string" },
|
|
|
|
@ -270,7 +291,11 @@ fastify.put('/api/editSalesUser/:salesId', {
|
|
|
|
|
properties: {
|
|
|
|
|
firstName: { type: "string" },
|
|
|
|
|
lastName: { type: "string" },
|
|
|
|
|
address: { type: "string" }
|
|
|
|
|
address: { type: "string" },
|
|
|
|
|
city: { type: 'string', default: null },
|
|
|
|
|
state: { type: 'string', default: null },
|
|
|
|
|
zip: { type: 'string', default: null },
|
|
|
|
|
country: { type: 'string', default: null },
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
@ -302,6 +327,10 @@ fastify.put('/api/editStore/:storeId', {
|
|
|
|
|
address1: { type: "string" },
|
|
|
|
|
address2: { type: "string" },
|
|
|
|
|
emails: { type: "string" },
|
|
|
|
|
zone: { type: 'string', default: null },
|
|
|
|
|
designation: { type: 'string', default: null },
|
|
|
|
|
reportingManager: { type: 'string', default: null },
|
|
|
|
|
departmentName: { type: 'string', default: null },
|
|
|
|
|
profile: {
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
@ -400,9 +429,9 @@ fastify.delete("/api/deleteInstaller/:installationId", {
|
|
|
|
|
|
|
|
|
|
fastify.put("/api/updaeInstaller/:installationId", {
|
|
|
|
|
schema: {
|
|
|
|
|
description: "Update user details by installationId",
|
|
|
|
|
description: "Update installer details by installationId",
|
|
|
|
|
tags: ["Install Management"],
|
|
|
|
|
summary: "Update user",
|
|
|
|
|
summary: "Update installer details by installationId",
|
|
|
|
|
params: {
|
|
|
|
|
type: "object",
|
|
|
|
|
properties: {
|
|
|
|
@ -417,6 +446,10 @@ fastify.put("/api/updaeInstaller/:installationId", {
|
|
|
|
|
password: { type: "string" },
|
|
|
|
|
emails: { type: "array", items: { type: "object", properties: { email: { type: "string" } } } },
|
|
|
|
|
team: { type: "string" },
|
|
|
|
|
zone: { type: 'string', default: null },
|
|
|
|
|
designation: { type: 'string', default: null },
|
|
|
|
|
reportingManager: { type: 'string', default: null },
|
|
|
|
|
departmentName: { type: 'string', default: null },
|
|
|
|
|
manager: { type: "string" },
|
|
|
|
|
address: { type: "string" },
|
|
|
|
|
address1: { type: "string" },
|
|
|
|
|