139 lines
3.2 KiB
TypeScript
139 lines
3.2 KiB
TypeScript
|
|
export const staticticsSwaggerDocs = {
|
|
"/api/statictics": {
|
|
post: {
|
|
tags: ["statictics"],
|
|
summary: "Create new statictics",
|
|
description: "",
|
|
requestBody: {
|
|
|
|
required: true,
|
|
content: {
|
|
"application/json": {
|
|
example: JSON.stringify({}), // put your request body
|
|
},
|
|
},
|
|
},
|
|
responses: {
|
|
201: { description: "statictics created successfully" },
|
|
500: { description: "Validation error or internal server error" },
|
|
},
|
|
},
|
|
get: {
|
|
tags: ["statictics"],
|
|
summary: "Get all statictics",
|
|
description: "",
|
|
parameters: [
|
|
{
|
|
name: "page",
|
|
in: "query",
|
|
required: false,
|
|
schema: { type: "number" },
|
|
},
|
|
{
|
|
name: "limit",
|
|
in: "query",
|
|
required: false,
|
|
schema: { type: "number" },
|
|
},
|
|
],
|
|
responses: {
|
|
200: { description: "statictics fetched successfully" },
|
|
401: { description: "unauthorized" },
|
|
},
|
|
},
|
|
},
|
|
"/api/statictics/seller": {
|
|
get: {
|
|
tags: ["statistics"],
|
|
summary: "Get seller statistics",
|
|
description: "Fetch seller dashboard stats (7d, 30d, all)",
|
|
|
|
parameters: [
|
|
{
|
|
name: "range",
|
|
in: "query",
|
|
required: false,
|
|
schema: {
|
|
type: "string",
|
|
enum: ["7d", "30d", "all"],
|
|
default: "7d",
|
|
},
|
|
description: "Time range for statistics",
|
|
},
|
|
],
|
|
|
|
responses: {
|
|
200: {
|
|
description: "Statistics fetched successfully",
|
|
},
|
|
401: {
|
|
description: "Unauthorized",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
"/api/statictics/{id}": {
|
|
get: {
|
|
tags: ["statictics"],
|
|
summary: "Get single statictics",
|
|
description: "",
|
|
parameters: [
|
|
{
|
|
name: "id",
|
|
in: "path",
|
|
required: true,
|
|
schema: { type: "string" },
|
|
},
|
|
],
|
|
responses: {
|
|
200: { description: "statictics fetched successfully" },
|
|
401: { description: "unauthorized" },
|
|
},
|
|
},
|
|
patch: {
|
|
tags: ["statictics"],
|
|
summary: "Update statictics",
|
|
description: "",
|
|
parameters: [
|
|
{
|
|
name: "id",
|
|
in: "path",
|
|
required: true,
|
|
schema: { type: "string" },
|
|
},
|
|
],
|
|
requestBody: {
|
|
required: true,
|
|
content: {
|
|
"application/json": {
|
|
example: JSON.stringify({}), // put your request body
|
|
},
|
|
},
|
|
},
|
|
responses: {
|
|
200: { description: "statictics updated successfully" },
|
|
500: { description: "Validation error or internal server error" },
|
|
},
|
|
},
|
|
delete: {
|
|
tags: ["statictics"],
|
|
summary: "Delete statictics",
|
|
description: "",
|
|
parameters: [
|
|
{
|
|
name: "id",
|
|
in: "path",
|
|
required: true,
|
|
schema: { type: "string" },
|
|
},
|
|
],
|
|
responses: {
|
|
200: { description: "statictics delete successfully" },
|
|
401: { description: "unauthorized" },
|
|
},
|
|
},
|
|
},
|
|
};
|