Add lock files for package management and update architecture documentation
- Introduced bun.lock and package-lock.json to manage dependencies for the project. - Enhanced backend API architecture documentation with additional security and documentation guidelines. - Made minor formatting adjustments across various files for consistency and clarity.
This commit is contained in:
@@ -28,9 +28,9 @@ export async function clientRoutes(fastify: FastifyInstance) {
|
||||
withStats: {
|
||||
type: 'string',
|
||||
enum: ['true', 'false'],
|
||||
description: 'Include invoice statistics for each client',
|
||||
},
|
||||
},
|
||||
description: 'Include invoice statistics for each client'
|
||||
}
|
||||
}
|
||||
},
|
||||
response: {
|
||||
200: {
|
||||
@@ -49,14 +49,14 @@ export async function clientRoutes(fastify: FastifyInstance) {
|
||||
address: {type: 'string', nullable: true},
|
||||
notes: {type: 'string', nullable: true},
|
||||
createdAt: {type: 'string'},
|
||||
updatedAt: {type: 'string'},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
updatedAt: {type: 'string'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
clientController.getAll.bind(clientController)
|
||||
);
|
||||
@@ -76,11 +76,11 @@ export async function clientRoutes(fastify: FastifyInstance) {
|
||||
description: 'Total revenue',
|
||||
type: 'object',
|
||||
properties: {
|
||||
totalRevenue: {type: 'number'},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
totalRevenue: {type: 'number'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
clientController.getTotalRevenue.bind(clientController)
|
||||
);
|
||||
@@ -98,8 +98,8 @@ export async function clientRoutes(fastify: FastifyInstance) {
|
||||
params: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {type: 'string'},
|
||||
},
|
||||
id: {type: 'string'}
|
||||
}
|
||||
},
|
||||
response: {
|
||||
200: {
|
||||
@@ -116,13 +116,13 @@ export async function clientRoutes(fastify: FastifyInstance) {
|
||||
address: {type: 'string', nullable: true},
|
||||
notes: {type: 'string', nullable: true},
|
||||
createdAt: {type: 'string'},
|
||||
updatedAt: {type: 'string'},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
updatedAt: {type: 'string'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
clientController.getOne.bind(clientController)
|
||||
);
|
||||
@@ -145,19 +145,19 @@ export async function clientRoutes(fastify: FastifyInstance) {
|
||||
email: {type: 'string', format: 'email'},
|
||||
phone: {type: 'string', maxLength: 50},
|
||||
address: {type: 'string'},
|
||||
notes: {type: 'string'},
|
||||
},
|
||||
notes: {type: 'string'}
|
||||
}
|
||||
},
|
||||
response: {
|
||||
201: {
|
||||
description: 'Client created successfully',
|
||||
type: 'object',
|
||||
properties: {
|
||||
client: {type: 'object'},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
client: {type: 'object'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
clientController.create.bind(clientController)
|
||||
);
|
||||
@@ -175,8 +175,8 @@ export async function clientRoutes(fastify: FastifyInstance) {
|
||||
params: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {type: 'string'},
|
||||
},
|
||||
id: {type: 'string'}
|
||||
}
|
||||
},
|
||||
body: {
|
||||
type: 'object',
|
||||
@@ -185,19 +185,19 @@ export async function clientRoutes(fastify: FastifyInstance) {
|
||||
email: {type: 'string', format: 'email'},
|
||||
phone: {type: 'string', maxLength: 50},
|
||||
address: {type: 'string'},
|
||||
notes: {type: 'string'},
|
||||
},
|
||||
notes: {type: 'string'}
|
||||
}
|
||||
},
|
||||
response: {
|
||||
200: {
|
||||
description: 'Client updated successfully',
|
||||
type: 'object',
|
||||
properties: {
|
||||
client: {type: 'object'},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
client: {type: 'object'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
clientController.update.bind(clientController)
|
||||
);
|
||||
@@ -215,16 +215,16 @@ export async function clientRoutes(fastify: FastifyInstance) {
|
||||
params: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {type: 'string'},
|
||||
},
|
||||
id: {type: 'string'}
|
||||
}
|
||||
},
|
||||
response: {
|
||||
204: {
|
||||
description: 'Client deleted successfully',
|
||||
type: 'null',
|
||||
},
|
||||
},
|
||||
},
|
||||
type: 'null'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
clientController.delete.bind(clientController)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user