0f7af70b90
Updated Docker configuration, refactored middleware for improved error handling, and restructured account, order, plan, profile, and support modules, including their routes, services, and validations. Enhanced email processing queues and utilities for token generation, pagination, and response management to streamline the application architecture and enhance maintainability.
110 lines
3.4 KiB
JavaScript
110 lines
3.4 KiB
JavaScript
export const supportSwaggerDocs = {
|
|
"/api/support": {
|
|
post: {
|
|
tags: ["support"],
|
|
summary: "Create new support",
|
|
description: "",
|
|
requestBody: {
|
|
required: true,
|
|
content: {
|
|
"application/json": {
|
|
example: JSON.stringify({
|
|
"issueName": "Your issue name",
|
|
"description": "Issue description",
|
|
"type": "Issue Type"
|
|
}), // put your request body
|
|
},
|
|
},
|
|
},
|
|
responses: {
|
|
201: { description: "support created successfully" },
|
|
500: { description: "Validation error or internal server error" },
|
|
},
|
|
},
|
|
get: {
|
|
tags: ["support"],
|
|
summary: "Get all support",
|
|
description: "",
|
|
parameters: [
|
|
{
|
|
name: "page",
|
|
in: "query",
|
|
required: false,
|
|
schema: { type: "number" },
|
|
},
|
|
{
|
|
name: "limit",
|
|
in: "query",
|
|
required: false,
|
|
schema: { type: "number" },
|
|
},
|
|
],
|
|
responses: {
|
|
200: { description: "support fetched successfully" },
|
|
401: { description: "unauthorized" },
|
|
},
|
|
},
|
|
},
|
|
"/api/support/{id}": {
|
|
get: {
|
|
tags: ["support"],
|
|
summary: "Get single support",
|
|
description: "",
|
|
parameters: [
|
|
{
|
|
name: "id",
|
|
in: "path",
|
|
required: true,
|
|
schema: { type: "string" },
|
|
},
|
|
],
|
|
responses: {
|
|
200: { description: "support fetched successfully" },
|
|
401: { description: "unauthorized" },
|
|
},
|
|
},
|
|
patch: {
|
|
tags: ["support"],
|
|
summary: "Update support",
|
|
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: "support updated successfully" },
|
|
500: { description: "Validation error or internal server error" },
|
|
},
|
|
},
|
|
delete: {
|
|
tags: ["support"],
|
|
summary: "Delete support",
|
|
description: "",
|
|
parameters: [
|
|
{
|
|
name: "id",
|
|
in: "path",
|
|
required: true,
|
|
schema: { type: "string" },
|
|
},
|
|
],
|
|
responses: {
|
|
200: { description: "support delete successfully" },
|
|
401: { description: "unauthorized" },
|
|
},
|
|
},
|
|
},
|
|
};
|