13237 lines
459 KiB
JSON
13237 lines
459 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"contact": {}
|
|
},
|
|
"paths": {
|
|
"/activity-logs": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all ActivityLogs",
|
|
"tags": [
|
|
"ActivityLogs"
|
|
],
|
|
"summary": "Get all ActivityLogs",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"name": "activityTypeId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "articleId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "url",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "userId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create ActivityLogs",
|
|
"tags": [
|
|
"ActivityLogs"
|
|
],
|
|
"summary": "Create ActivityLogs",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ActivityLogsCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/activity-logs/detail/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one ActivityLogs",
|
|
"tags": [
|
|
"ActivityLogs"
|
|
],
|
|
"summary": "Get one ActivityLogs",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "ActivityLogs ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/activity-logs/statistics": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for get activity stats ActivityLogs",
|
|
"tags": [
|
|
"ActivityLogs"
|
|
],
|
|
"summary": "Get activity stats ActivityLogs",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/activity-logs/{id}": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update ActivityLogs",
|
|
"tags": [
|
|
"ActivityLogs"
|
|
],
|
|
"summary": "update ActivityLogs",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ActivityLogsUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ActivityLogs ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete ActivityLogs",
|
|
"tags": [
|
|
"ActivityLogs"
|
|
],
|
|
"summary": "delete ActivityLogs",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ActivityLogs ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/approval-histories": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all ApprovalHistories",
|
|
"tags": [
|
|
"ApprovalHistories"
|
|
],
|
|
"summary": "Get all ApprovalHistories",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "action",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "approved_by",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "module_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "module_type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "status_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/approval-histories/{module_type}/{module_id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting approval history by module type and module id",
|
|
"tags": [
|
|
"ApprovalHistories"
|
|
],
|
|
"summary": "Get approval history by module",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Module Type (banners, galleries, products, sales_agents, promotions)",
|
|
"name": "module_type",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Module ID",
|
|
"name": "module_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-approvals": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all ArticleApprovals",
|
|
"tags": [
|
|
"ArticleApprovals"
|
|
],
|
|
"summary": "Get all ArticleApprovals",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"name": "approvalAtLevel",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "approvalBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "articleId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "message",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "statusId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create ArticleApprovals",
|
|
"tags": [
|
|
"ArticleApprovals"
|
|
],
|
|
"summary": "Create ArticleApprovals",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ArticleApprovalsCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-approvals/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one ArticleApprovals",
|
|
"tags": [
|
|
"ArticleApprovals"
|
|
],
|
|
"summary": "Get one ArticleApprovals",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleApprovals ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update ArticleApprovals",
|
|
"tags": [
|
|
"ArticleApprovals"
|
|
],
|
|
"summary": "update ArticleApprovals",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ArticleApprovalsUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleApprovals ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete ArticleApprovals",
|
|
"tags": [
|
|
"ArticleApprovals"
|
|
],
|
|
"summary": "delete ArticleApprovals",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleApprovals ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-categories": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all ArticleCategories",
|
|
"tags": [
|
|
"Article Categories"
|
|
],
|
|
"summary": "Get all ArticleCategories",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "UserLevelId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "UserLevelNumber",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "description",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"name": "isPublish",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "parentId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "statusId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "title",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create ArticleCategories",
|
|
"tags": [
|
|
"Article Categories"
|
|
],
|
|
"summary": "Create ArticleCategories",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ArticleCategoriesCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-categories/old/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one ArticleCategories",
|
|
"tags": [
|
|
"Article Categories"
|
|
],
|
|
"summary": "Get one ArticleCategories",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleCategories Old ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-categories/slug/{slug}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one ArticleCategories",
|
|
"tags": [
|
|
"Article Categories"
|
|
],
|
|
"summary": "Get one ArticleCategories",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "ArticleCategories Slug",
|
|
"name": "slug",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-categories/thumbnail/viewer/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for View Thumbnail of ArticleCategories",
|
|
"tags": [
|
|
"Article Categories"
|
|
],
|
|
"summary": "Viewer ArticleCategories",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "ArticleCategories ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-categories/thumbnail/{id}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for Upload ArticleCategories Thumbnail",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Article Categories"
|
|
],
|
|
"summary": "Upload ArticleCategories Thumbnail",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload thumbnail",
|
|
"name": "files",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleCategories ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-categories/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one ArticleCategories",
|
|
"tags": [
|
|
"Article Categories"
|
|
],
|
|
"summary": "Get one ArticleCategories",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleCategories ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update ArticleCategories",
|
|
"tags": [
|
|
"Article Categories"
|
|
],
|
|
"summary": "update ArticleCategories",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ArticleCategoriesUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleCategories ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete ArticleCategories",
|
|
"tags": [
|
|
"Article Categories"
|
|
],
|
|
"summary": "delete ArticleCategories",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleCategories ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-category-details": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all ArticleCategoryDetails",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Get all ArticleCategoryDetails",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create ArticleCategoryDetails",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Create ArticleCategoryDetails",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-category-details/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one ArticleCategoryDetails",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Get one ArticleCategoryDetails",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleCategoryDetails ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update ArticleCategoryDetails",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "update ArticleCategoryDetails",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleCategoryDetails ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete ArticleCategoryDetails",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "delete ArticleCategoryDetails",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleCategoryDetails ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-comments": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all ArticleComments",
|
|
"tags": [
|
|
"ArticleComments"
|
|
],
|
|
"summary": "Get all ArticleComments",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"name": "articleId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "commentFrom",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"name": "isPublic",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "message",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "parentId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create ArticleComments",
|
|
"tags": [
|
|
"ArticleComments"
|
|
],
|
|
"summary": "Create ArticleComments",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ArticleCommentsCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-comments/approval": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for Approval ArticleComments",
|
|
"tags": [
|
|
"ArticleComments"
|
|
],
|
|
"summary": "Approval ArticleComments",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ArticleCommentsApprovalRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-comments/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one ArticleComments",
|
|
"tags": [
|
|
"ArticleComments"
|
|
],
|
|
"summary": "Get one ArticleComments",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleComments ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update ArticleComments",
|
|
"tags": [
|
|
"ArticleComments"
|
|
],
|
|
"summary": "update ArticleComments",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ArticleCommentsUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleComments ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete ArticleComments",
|
|
"tags": [
|
|
"ArticleComments"
|
|
],
|
|
"summary": "delete ArticleComments",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleComments ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-files": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all ArticleFiles",
|
|
"tags": [
|
|
"Article Files"
|
|
],
|
|
"summary": "Get all ArticleFiles",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"name": "articleId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "fileName",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"name": "isPublish",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "statusId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-files/upload-status/{uploadId}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for GetUploadStatus ArticleFiles",
|
|
"tags": [
|
|
"Article Files"
|
|
],
|
|
"summary": "GetUploadStatus ArticleFiles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Upload ID of ArticleFiles",
|
|
"name": "uploadId",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-files/viewer/{filename}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for Viewer ArticleFiles",
|
|
"tags": [
|
|
"Article Files"
|
|
],
|
|
"summary": "Viewer ArticleFiles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Article File Name",
|
|
"name": "filename",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-files/{articleId}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create ArticleFiles",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Article Files"
|
|
],
|
|
"summary": "Upload ArticleFiles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload file",
|
|
"name": "files",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Article ID",
|
|
"name": "articleId",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/article-files/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one ArticleFiles",
|
|
"tags": [
|
|
"Article Files"
|
|
],
|
|
"summary": "Get one ArticleFiles",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleFiles ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update ArticleFiles",
|
|
"tags": [
|
|
"Article Files"
|
|
],
|
|
"summary": "Update ArticleFiles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ArticleFilesUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleFiles ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete ArticleFiles",
|
|
"tags": [
|
|
"Article Files"
|
|
],
|
|
"summary": "Delete ArticleFiles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ArticleFiles ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/articles": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all Articles",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "Get all Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "category",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "categoryId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "createdById",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "description",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"name": "isBanner",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"name": "isDraft",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"name": "isPublish",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "statusId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "tags",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "title",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "typeId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create Articles",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "Create Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ArticlesCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/articles/banner/{id}": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for Update Banner Articles",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "Update Banner Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Articles ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "Articles Banner Status",
|
|
"name": "isBanner",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/articles/old-id/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one Articles",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "Get one Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Articles Old ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/articles/publish-scheduling": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for Publish Schedule of Article",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "PublishScheduling Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "article id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "publish date",
|
|
"name": "date",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/articles/statistic/monthly": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for ArticleMonthlyStats of Article",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "ArticleMonthlyStats Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "year",
|
|
"name": "year",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/articles/statistic/summary": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for Summary Stats of Article",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "SummaryStats Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/articles/statistic/user-levels": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for ArticlePerUserLevelStats of Article",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "ArticlePerUserLevelStats Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "start date",
|
|
"name": "startDate",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "start date",
|
|
"name": "endDate",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/articles/thumbnail/viewer/{thumbnailName}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for View Thumbnail of Article",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "Viewer Articles Thumbnail",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Articles Thumbnail Name",
|
|
"name": "thumbnailName",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/articles/thumbnail/{id}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for Save Thumbnail of Articles",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "Save Thumbnail Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload thumbnail",
|
|
"name": "files",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Articles ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/articles/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one Articles",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "Get one Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Articles ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update Articles",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "Update Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ArticlesUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Articles ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete Articles",
|
|
"tags": [
|
|
"Articles"
|
|
],
|
|
"summary": "Delete Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Articles ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/banners": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all Banners",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Get all Banners",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "position",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "status",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "title",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for creating Banner with file upload",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Create Banner",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload file",
|
|
"name": "file",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Banner title",
|
|
"name": "title",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Banner description",
|
|
"name": "description",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Banner position",
|
|
"name": "position",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Banner status",
|
|
"name": "status",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/banners/viewer/{filename}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for viewing Banner file",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Viewer Banner",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Banner File Name (e.g., user_277788.png)",
|
|
"name": "filename",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "file"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/banners/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting Banner by ID",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Get Banner by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Banner ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for updating Banner with file upload",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Update Banner",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Banner ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload file",
|
|
"name": "file",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Banner title",
|
|
"name": "title",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Banner description",
|
|
"name": "description",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Banner position",
|
|
"name": "position",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Banner status",
|
|
"name": "status",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "Banner is_active",
|
|
"name": "is_active",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for deleting Banner (soft delete)",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Delete Banner",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Banner ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/banners/{id}/approve": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for approving Banner (only for admin with roleId = 1)",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Approve Banner",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Banner ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/banners/{id}/comment": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "API for comment Banner (only admin)",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Comment Banner",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Banner ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Comment payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/jaecoo-be_app_module_banners_request.CommentRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/banners/{id}/reject": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for rejecting Banner (only for admin with roleId = 1)",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Reject Banner",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Banner ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Rejection message",
|
|
"name": "message",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/cities": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all Cities",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Get all Cities",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create Cities",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Create Cities",
|
|
"parameters": [
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.CitiesCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/cities/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one Cities",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Get one Cities",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Cities ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update Cities",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Update Cities",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Cities ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.CitiesUpdateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete Cities",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Delete Cities",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Cities ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client-approval-settings": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting client approval settings",
|
|
"tags": [
|
|
"ClientApprovalSettings"
|
|
],
|
|
"summary": "Get Client Approval Settings",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for updating client approval settings",
|
|
"tags": [
|
|
"ClientApprovalSettings"
|
|
],
|
|
"summary": "Update Client Approval Settings",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UpdateClientApprovalSettingsRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for creating client approval settings",
|
|
"tags": [
|
|
"ClientApprovalSettings"
|
|
],
|
|
"summary": "Create Client Approval Settings",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.CreateClientApprovalSettingsRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for deleting client approval settings",
|
|
"tags": [
|
|
"ClientApprovalSettings"
|
|
],
|
|
"summary": "Delete Client Approval Settings",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client-approval-settings/default-workflow": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for setting default workflow for client",
|
|
"tags": [
|
|
"ClientApprovalSettings"
|
|
],
|
|
"summary": "Set Default Workflow",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.SetDefaultWorkflowRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client-approval-settings/disable": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for disabling approval system and auto-publish pending articles",
|
|
"tags": [
|
|
"ClientApprovalSettings"
|
|
],
|
|
"summary": "Disable Approval System",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.DisableApprovalRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client-approval-settings/enable": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for enabling approval system with smooth transition",
|
|
"tags": [
|
|
"ClientApprovalSettings"
|
|
],
|
|
"summary": "Enable Approval System",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.EnableApprovalRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client-approval-settings/exempt-categories/{action}/{category_id}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for adding/removing categories from approval exemption",
|
|
"tags": [
|
|
"ClientApprovalSettings"
|
|
],
|
|
"summary": "Manage Exempt Categories",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Action: add or remove",
|
|
"name": "action",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Category ID",
|
|
"name": "category_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client-approval-settings/exempt-roles/{action}/{role_id}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for adding/removing roles from approval exemption",
|
|
"tags": [
|
|
"ClientApprovalSettings"
|
|
],
|
|
"summary": "Manage Exempt Roles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Action: add or remove",
|
|
"name": "action",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Role ID",
|
|
"name": "role_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client-approval-settings/exempt-users/{action}/{user_id}": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for adding/removing users from approval exemption",
|
|
"tags": [
|
|
"ClientApprovalSettings"
|
|
],
|
|
"summary": "Manage Exempt Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Action: add or remove",
|
|
"name": "action",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/client-approval-settings/toggle": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for toggling approval requirement on/off",
|
|
"tags": [
|
|
"ClientApprovalSettings"
|
|
],
|
|
"summary": "Toggle Approval Requirement",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ToggleApprovalRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/clients": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all Clients",
|
|
"tags": [
|
|
"Clients"
|
|
],
|
|
"summary": "Get all Clients",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"name": "createdBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create Clients",
|
|
"tags": [
|
|
"Clients"
|
|
],
|
|
"summary": "Create Clients",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ClientsCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/clients/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one Clients",
|
|
"tags": [
|
|
"Clients"
|
|
],
|
|
"summary": "Get one Clients",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Clients ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update Clients",
|
|
"tags": [
|
|
"Clients"
|
|
],
|
|
"summary": "update Clients",
|
|
"parameters": [
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ClientsUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Clients ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete Clients",
|
|
"tags": [
|
|
"Clients"
|
|
],
|
|
"summary": "delete Clients",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Clients ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/custom-static-pages": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all CustomStaticPages",
|
|
"tags": [
|
|
"CustomStaticPages"
|
|
],
|
|
"summary": "Get all CustomStaticPages",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "description",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "htmlBody",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "slug",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "title",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create CustomStaticPages",
|
|
"tags": [
|
|
"CustomStaticPages"
|
|
],
|
|
"summary": "Create CustomStaticPages",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.CustomStaticPagesCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/custom-static-pages/slug/{slug}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one CustomStaticPages",
|
|
"tags": [
|
|
"CustomStaticPages"
|
|
],
|
|
"summary": "Get one CustomStaticPages",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "CustomStaticPages Slug",
|
|
"name": "slug",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/custom-static-pages/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one CustomStaticPages",
|
|
"tags": [
|
|
"CustomStaticPages"
|
|
],
|
|
"summary": "Get one CustomStaticPages",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "CustomStaticPages ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update CustomStaticPages",
|
|
"tags": [
|
|
"CustomStaticPages"
|
|
],
|
|
"summary": "update CustomStaticPages",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.CustomStaticPagesUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "CustomStaticPages ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete CustomStaticPages",
|
|
"tags": [
|
|
"CustomStaticPages"
|
|
],
|
|
"summary": "delete CustomStaticPages",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "CustomStaticPages ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/districts": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all Districts",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Get all Districts",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create Districts",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Create Districts",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/districts/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one Districts",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Get one Districts",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Districts ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update Districts",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Update Districts",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Districts ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete Districts",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Delete Districts",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Districts ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/feedbacks": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all Feedbacks",
|
|
"tags": [
|
|
"Feedbacks"
|
|
],
|
|
"summary": "Get all Feedbacks",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "commentFromEmail",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "commentFromName",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "endDate",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "message",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "startDate",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "statusId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create Feedbacks",
|
|
"tags": [
|
|
"Feedbacks"
|
|
],
|
|
"summary": "Create Feedbacks",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.FeedbacksCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/feedbacks/statistic/monthly": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for FeedbackMonthlyStats of Feedbacks",
|
|
"tags": [
|
|
"Feedbacks"
|
|
],
|
|
"summary": "FeedbackMonthlyStats Feedbacks",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "year",
|
|
"name": "year",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/feedbacks/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one Feedbacks",
|
|
"tags": [
|
|
"Feedbacks"
|
|
],
|
|
"summary": "Get one Feedbacks",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Feedbacks ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update Feedbacks",
|
|
"tags": [
|
|
"Feedbacks"
|
|
],
|
|
"summary": "update Feedbacks",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.FeedbacksUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Feedbacks ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete Feedbacks",
|
|
"tags": [
|
|
"Feedbacks"
|
|
],
|
|
"summary": "delete Feedbacks",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Feedbacks ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/galleries": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all Galleries",
|
|
"tags": [
|
|
"Galleries"
|
|
],
|
|
"summary": "Get all Galleries",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "title",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for creating Gallery",
|
|
"tags": [
|
|
"Galleries"
|
|
],
|
|
"summary": "Create Gallery",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.GalleriesCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/galleries/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting Gallery by ID",
|
|
"tags": [
|
|
"Galleries"
|
|
],
|
|
"summary": "Get Gallery by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Gallery ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for updating Gallery",
|
|
"tags": [
|
|
"Galleries"
|
|
],
|
|
"summary": "Update Gallery",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Gallery ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.GalleriesUpdateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for deleting Gallery (soft delete)",
|
|
"tags": [
|
|
"Galleries"
|
|
],
|
|
"summary": "Delete Gallery",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Gallery ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/galleries/{id}/approve": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for approving Gallery (only for admin with roleId = 1)",
|
|
"tags": [
|
|
"Galleries"
|
|
],
|
|
"summary": "Approve Gallery",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Gallery ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/galleries/{id}/comment": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "API for comment Banner (only admin)",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Comment Banner",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Banner ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Comment payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/jaecoo-be_app_module_galleries_request.CommentRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/galleries/{id}/reject": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for rejecting Gallery (only for admin with roleId = 1)",
|
|
"tags": [
|
|
"Galleries"
|
|
],
|
|
"summary": "Reject Gallery",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Gallery ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Rejection message",
|
|
"name": "message",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/gallery-files": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all GalleryFiles",
|
|
"tags": [
|
|
"GalleryFiles"
|
|
],
|
|
"summary": "Get all GalleryFiles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "gallery_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "title",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for creating GalleryFile with file upload",
|
|
"tags": [
|
|
"GalleryFiles"
|
|
],
|
|
"summary": "Create GalleryFile",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload file",
|
|
"name": "file",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Gallery ID",
|
|
"name": "gallery_id",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Gallery file title",
|
|
"name": "title",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/gallery-files/viewer/{filename}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for viewing GalleryFile file",
|
|
"tags": [
|
|
"GalleryFiles"
|
|
],
|
|
"summary": "Viewer GalleryFile",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Gallery File Name (e.g., user_277788.png)",
|
|
"name": "filename",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "file"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/gallery-files/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting GalleryFile by ID",
|
|
"tags": [
|
|
"GalleryFiles"
|
|
],
|
|
"summary": "Get GalleryFile by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "GalleryFile ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for updating GalleryFile with file upload",
|
|
"tags": [
|
|
"GalleryFiles"
|
|
],
|
|
"summary": "Update GalleryFile",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "GalleryFile ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload file",
|
|
"name": "file",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Gallery ID",
|
|
"name": "gallery_id",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Gallery file title",
|
|
"name": "title",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "Is active",
|
|
"name": "is_active",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for deleting GalleryFile (soft delete)",
|
|
"tags": [
|
|
"GalleryFiles"
|
|
],
|
|
"summary": "Delete GalleryFile",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "GalleryFile ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/product-specifications": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all ProductSpecifications",
|
|
"tags": [
|
|
"ProductSpecifications"
|
|
],
|
|
"summary": "Get all ProductSpecifications",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "product_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "title",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for creating ProductSpecification with file upload",
|
|
"tags": [
|
|
"ProductSpecifications"
|
|
],
|
|
"summary": "Create ProductSpecification",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload file",
|
|
"name": "file",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Product ID",
|
|
"name": "product_id",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Product specification title",
|
|
"name": "title",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/product-specifications/viewer/{filename}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for viewing ProductSpecification file",
|
|
"tags": [
|
|
"ProductSpecifications"
|
|
],
|
|
"summary": "Viewer ProductSpecification",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Product Specification File Name (e.g., user_277788.png)",
|
|
"name": "filename",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "file"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/product-specifications/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting ProductSpecification by ID",
|
|
"tags": [
|
|
"ProductSpecifications"
|
|
],
|
|
"summary": "Get ProductSpecification by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ProductSpecification ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for updating ProductSpecification",
|
|
"tags": [
|
|
"ProductSpecifications"
|
|
],
|
|
"summary": "Update ProductSpecification",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ProductSpecification ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.ProductSpecificationsUpdateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for deleting ProductSpecification (soft delete)",
|
|
"tags": [
|
|
"ProductSpecifications"
|
|
],
|
|
"summary": "Delete ProductSpecification",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "ProductSpecification ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/products": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all Products",
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Get all Products",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "status",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "title",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "variant",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for creating Product with file upload",
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Create Product",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload file",
|
|
"name": "file",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Product title",
|
|
"name": "title",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Product variant",
|
|
"name": "variant",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Product price",
|
|
"name": "price",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Product colors (JSON array)",
|
|
"name": "colors",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/products/viewer/{filename}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for viewing Product file",
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Viewer Product",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Product File Name (e.g., user_277788.png)",
|
|
"name": "filename",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "file"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/products/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting Product by ID",
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Get Product by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Product ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for updating Product with file upload",
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Update Product",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Product ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload file",
|
|
"name": "file",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Product title",
|
|
"name": "title",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Product variant",
|
|
"name": "variant",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Product price",
|
|
"name": "price",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Product colors (JSON array)",
|
|
"name": "colors",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "Product is_active",
|
|
"name": "is_active",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for deleting Product (soft delete)",
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Delete Product",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Product ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/products/{id}/approve": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for approving Product (only for admin with roleId = 1)",
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Approve Product",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Product ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/products/{id}/comment": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "API for comment Banner (only admin)",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Comment Banner",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Banner ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Comment payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/jaecoo-be_app_module_products_request.CommentRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/products/{id}/reject": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for rejecting Product (only for admin with roleId = 1)",
|
|
"tags": [
|
|
"Products"
|
|
],
|
|
"summary": "Reject Product",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Product ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Rejection message",
|
|
"name": "message",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/promotions": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all Promotions",
|
|
"tags": [
|
|
"Promotions"
|
|
],
|
|
"summary": "Get all Promotions",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "title",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for creating Promotion with file upload",
|
|
"tags": [
|
|
"Promotions"
|
|
],
|
|
"summary": "Create Promotion",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload file",
|
|
"name": "file",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Promotion title",
|
|
"name": "title",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Promotion description",
|
|
"name": "description",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/promotions/viewer/{filename}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for viewing Promotion file",
|
|
"tags": [
|
|
"Promotions"
|
|
],
|
|
"summary": "Viewer Promotion",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Promotion File Name (e.g., user_277788.png)",
|
|
"name": "filename",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "file"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/promotions/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting Promotion by ID",
|
|
"tags": [
|
|
"Promotions"
|
|
],
|
|
"summary": "Get Promotion by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Promotion ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for updating Promotion",
|
|
"tags": [
|
|
"Promotions"
|
|
],
|
|
"summary": "Update Promotion",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Promotion ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.PromotionsUpdateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for deleting Promotion (soft delete)",
|
|
"tags": [
|
|
"Promotions"
|
|
],
|
|
"summary": "Delete Promotion",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Promotion ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/promotions/{id}/approve": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for approving Promotion (only for admin with roleId = 1)",
|
|
"tags": [
|
|
"Promotions"
|
|
],
|
|
"summary": "Approve Promotion",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Promotion ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/promotions/{id}/comment": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "API for comment Banner (only admin)",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Comment Banner",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Banner ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Comment payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/jaecoo-be_app_module_promotions_request.CommentRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/promotions/{id}/reject": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for rejecting Promotion (only for admin with roleId = 1)",
|
|
"tags": [
|
|
"Promotions"
|
|
],
|
|
"summary": "Reject Promotion",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Promotion ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Rejection message",
|
|
"name": "message",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/provinces": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all Provinces",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Get all Provinces",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create Provinces",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Create Provinces",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/provinces/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one Provinces",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Get one Provinces",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Provinces ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update Provinces",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Update Provinces",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Provinces ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete Provinces",
|
|
"tags": [
|
|
"Untags"
|
|
],
|
|
"summary": "Delete Provinces",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Provinces ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sales-agents": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all SalesAgents",
|
|
"tags": [
|
|
"SalesAgents"
|
|
],
|
|
"summary": "Get all SalesAgents",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "agent_type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "job_title",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for creating SalesAgent with file upload",
|
|
"tags": [
|
|
"SalesAgents"
|
|
],
|
|
"summary": "Create SalesAgent",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload file",
|
|
"name": "file",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "SalesAgent name",
|
|
"name": "name",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "SalesAgent job title",
|
|
"name": "job_title",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "SalesAgent phone",
|
|
"name": "phone",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "SalesAgent agent type (JSON array)",
|
|
"name": "agent_type",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sales-agents/viewer/{filename}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for viewing SalesAgent profile picture file",
|
|
"tags": [
|
|
"SalesAgents"
|
|
],
|
|
"summary": "Viewer SalesAgent",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "SalesAgent File Name (e.g., user_277788.png)",
|
|
"name": "filename",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "file"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sales-agents/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting SalesAgent by ID",
|
|
"tags": [
|
|
"SalesAgents"
|
|
],
|
|
"summary": "Get SalesAgent by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "SalesAgent ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for updating SalesAgent with file upload",
|
|
"tags": [
|
|
"SalesAgents"
|
|
],
|
|
"summary": "Update SalesAgent",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "SalesAgent ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Upload file",
|
|
"name": "file",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "SalesAgent name",
|
|
"name": "name",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "SalesAgent job title",
|
|
"name": "job_title",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "SalesAgent phone",
|
|
"name": "phone",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "SalesAgent agent type (JSON array)",
|
|
"name": "agent_type",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "SalesAgent is_active",
|
|
"name": "is_active",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for deleting SalesAgent (soft delete)",
|
|
"tags": [
|
|
"SalesAgents"
|
|
],
|
|
"summary": "Delete SalesAgent",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "SalesAgent ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sales-agents/{id}/approve": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for approving SalesAgent (only for admin with roleId = 1)",
|
|
"tags": [
|
|
"SalesAgents"
|
|
],
|
|
"summary": "Approve SalesAgent",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "SalesAgent ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sales-agents/{id}/comment": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "API for comment Banner (only admin)",
|
|
"tags": [
|
|
"Banners"
|
|
],
|
|
"summary": "Comment Banner",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Banner ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Comment payload",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/jaecoo-be_app_module_sales_agents_request.CommentRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sales-agents/{id}/reject": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for rejecting SalesAgent (only for admin with roleId = 1)",
|
|
"tags": [
|
|
"SalesAgents"
|
|
],
|
|
"summary": "Reject SalesAgent",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Client-Key",
|
|
"name": "X-Client-Key",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "SalesAgent ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Rejection message",
|
|
"name": "message",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user-levels": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all UserLevels",
|
|
"tags": [
|
|
"UserLevels"
|
|
],
|
|
"summary": "Get all UserLevels",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"name": "levelNumber",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "parentLevelId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "provinceId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create UserLevels",
|
|
"tags": [
|
|
"UserLevels"
|
|
],
|
|
"summary": "Create UserLevels",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserLevelsCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user-levels/alias/{alias}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one UserLevels",
|
|
"tags": [
|
|
"UserLevels"
|
|
],
|
|
"summary": "Get one UserLevels",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "UserLevels Alias",
|
|
"name": "alias",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user-levels/enable-approval": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for Enable Approval of Article",
|
|
"tags": [
|
|
"UserLevels"
|
|
],
|
|
"summary": "EnableApproval Articles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserLevelsApprovalRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user-levels/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one UserLevels",
|
|
"tags": [
|
|
"UserLevels"
|
|
],
|
|
"summary": "Get one UserLevels",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "UserLevels ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update UserLevels",
|
|
"tags": [
|
|
"UserLevels"
|
|
],
|
|
"summary": "update UserLevels",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserLevelsUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "UserLevels ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete UserLevels",
|
|
"tags": [
|
|
"UserLevels"
|
|
],
|
|
"summary": "delete UserLevels",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "UserLevels ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user-role-accesses": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all UserRoleAccesses",
|
|
"tags": [
|
|
"UserRoleAccesses"
|
|
],
|
|
"summary": "Get all UserRoleAccesses",
|
|
"parameters": [
|
|
{
|
|
"type": "boolean",
|
|
"name": "isActive",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "menuId",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "userRoleId",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create UserRoleAccesses",
|
|
"tags": [
|
|
"UserRoleAccesses"
|
|
],
|
|
"summary": "Create UserRoleAccesses",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserRoleAccessesCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user-role-accesses/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one UserRoleAccesses",
|
|
"tags": [
|
|
"UserRoleAccesses"
|
|
],
|
|
"summary": "Get one UserRoleAccesses",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "UserRoleAccesses ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update UserRoleAccesses",
|
|
"tags": [
|
|
"UserRoleAccesses"
|
|
],
|
|
"summary": "update UserRoleAccesses",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserRoleAccessesUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "UserRoleAccesses ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete UserRoleAccesses",
|
|
"tags": [
|
|
"UserRoleAccesses"
|
|
],
|
|
"summary": "delete UserRoleAccesses",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "UserRoleAccesses ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user-role-level-details": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all UserRoleLevelDetails",
|
|
"tags": [
|
|
"Task"
|
|
],
|
|
"summary": "Get all UserRoleLevelDetails",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create UserRoleLevelDetails",
|
|
"tags": [
|
|
"Task"
|
|
],
|
|
"summary": "Create UserRoleLevelDetails",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user-role-level-details/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one UserRoleLevelDetails",
|
|
"tags": [
|
|
"Task"
|
|
],
|
|
"summary": "Get one UserRoleLevelDetails",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "UserRoleLevelDetails ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update UserRoleLevelDetails",
|
|
"tags": [
|
|
"Task"
|
|
],
|
|
"summary": "update UserRoleLevelDetails",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "UserRoleLevelDetails ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete UserRoleLevelDetails",
|
|
"tags": [
|
|
"Task"
|
|
],
|
|
"summary": "delete UserRoleLevelDetails",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "UserRoleLevelDetails ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable Entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user-roles": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all UserRoles",
|
|
"tags": [
|
|
"UserRoles"
|
|
],
|
|
"summary": "Get all UserRoles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "code",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "description",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "statusId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "userLevelId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create UserRoles",
|
|
"tags": [
|
|
"UserRoles"
|
|
],
|
|
"summary": "Create UserRoles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserRolesCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user-roles/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one UserRoles",
|
|
"tags": [
|
|
"UserRoles"
|
|
],
|
|
"summary": "Get one UserRoles",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "UserRoles ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update UserRoles",
|
|
"tags": [
|
|
"UserRoles"
|
|
],
|
|
"summary": "update UserRoles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserRolesUpdateRequest"
|
|
}
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "UserRoles ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete UserRoles",
|
|
"tags": [
|
|
"UserRoles"
|
|
],
|
|
"summary": "delete UserRoles",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "UserRoles ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting all Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Get all Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "degree",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "email",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "fullname",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "genderType",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "identityGroup",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "identityGroupNumber",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "identityNumber",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "identityType",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "phoneNumber",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "statusId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "userRoleId",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "username",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "workType",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "count",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "nextPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "previousPage",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sort",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "sortBy",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"name": "totalPage",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for create Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Create Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UsersCreateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/detail/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Get one Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Users ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/email-validation": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for Email Validation Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "EmailValidation Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserEmailValidationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/forgot-password": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for ForgotPassword Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "ForgotPassword Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserForgotPassword"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/info": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for ShowUserInfo",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "ShowInfo Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/login": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for Login Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Login Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserLogin"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/otp-request": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for OtpRequest Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "OtpRequest Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserOtpRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/otp-validation": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for OtpValidation Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "OtpValidation Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserOtpValidation"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/pareto-login": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for ParetoLogin Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "ParetoLogin Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserLogin"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/reset-password": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for ResetPassword Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "ResetPassword Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserResetPassword"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/save-password": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for SavePassword Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "SavePassword Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserSavePassword"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/setup-email": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for Setup Email Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "SetupEmail Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserEmailValidationRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/username/{username}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for getting one Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "Get one Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Username",
|
|
"name": "username",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/users/{id}": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for update Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "update Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"default": "Bearer \u003cAdd access token here\u003e",
|
|
"description": "Insert your access token",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Users ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Required payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UsersUpdateRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "API for delete Users",
|
|
"tags": [
|
|
"Users"
|
|
],
|
|
"summary": "delete Users",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Insert the X-Csrf-Token",
|
|
"name": "X-Csrf-Token",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Users ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.BadRequestError"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.UnauthorizedError"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.InternalServerError"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"jaecoo-be_app_module_banners_request.CommentRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"jaecoo-be_app_module_galleries_request.CommentRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"jaecoo-be_app_module_products_request.CommentRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"jaecoo-be_app_module_promotions_request.CommentRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"jaecoo-be_app_module_sales_agents_request.CommentRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"paginator.Pagination": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"limit": {
|
|
"type": "integer"
|
|
},
|
|
"nextPage": {
|
|
"type": "integer"
|
|
},
|
|
"page": {
|
|
"type": "integer"
|
|
},
|
|
"previousPage": {
|
|
"type": "integer"
|
|
},
|
|
"sort": {
|
|
"type": "string"
|
|
},
|
|
"sortBy": {
|
|
"type": "string"
|
|
},
|
|
"totalPage": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.ActivityLogsCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"activityTypeId",
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"activityTypeId": {
|
|
"type": "integer"
|
|
},
|
|
"articleId": {
|
|
"type": "integer"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"userId": {
|
|
"type": "integer"
|
|
},
|
|
"visitorIp": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.ActivityLogsUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"activityTypeId",
|
|
"id",
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"activityTypeId": {
|
|
"type": "integer"
|
|
},
|
|
"articleId": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"userId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.ArticleApprovalsCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"articleId",
|
|
"message",
|
|
"statusId"
|
|
],
|
|
"properties": {
|
|
"articleId": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"statusId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.ArticleApprovalsUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"articleId",
|
|
"id",
|
|
"message",
|
|
"statusId"
|
|
],
|
|
"properties": {
|
|
"articleId": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"statusId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.ArticleCategoriesCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"description",
|
|
"statusId",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"createdById": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"oldCategoryId": {
|
|
"type": "integer"
|
|
},
|
|
"parentId": {
|
|
"type": "integer"
|
|
},
|
|
"slug": {
|
|
"type": "string"
|
|
},
|
|
"statusId": {
|
|
"type": "integer"
|
|
},
|
|
"tags": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.ArticleCategoriesUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"description",
|
|
"id",
|
|
"statusId",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"createdById": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"isPublish": {
|
|
"type": "boolean"
|
|
},
|
|
"parentId": {
|
|
"type": "integer"
|
|
},
|
|
"publishedAt": {
|
|
"type": "string"
|
|
},
|
|
"slug": {
|
|
"type": "string"
|
|
},
|
|
"statusId": {
|
|
"type": "integer"
|
|
},
|
|
"tags": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.ArticleCommentsApprovalRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"statusId"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"statusId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.ArticleCommentsCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"articleId",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"articleId": {
|
|
"type": "integer"
|
|
},
|
|
"isPublic": {
|
|
"type": "boolean"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"parentId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.ArticleCommentsUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"articleId",
|
|
"id",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"articleId": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"isPublic": {
|
|
"type": "boolean"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"parentId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.ArticleFilesUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"articleId",
|
|
"id",
|
|
"isPublish",
|
|
"publishedAt",
|
|
"statusId"
|
|
],
|
|
"properties": {
|
|
"articleId": {
|
|
"type": "integer"
|
|
},
|
|
"fileAlt": {
|
|
"type": "string"
|
|
},
|
|
"fileName": {
|
|
"type": "string"
|
|
},
|
|
"filePath": {
|
|
"type": "string"
|
|
},
|
|
"fileThumbnail": {
|
|
"type": "string"
|
|
},
|
|
"fileUrl": {
|
|
"type": "string"
|
|
},
|
|
"heightPixel": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"isPublish": {
|
|
"type": "boolean"
|
|
},
|
|
"publishedAt": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "string"
|
|
},
|
|
"statusId": {
|
|
"type": "integer"
|
|
},
|
|
"widthPixel": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.ArticlesCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"categoryIds",
|
|
"description",
|
|
"htmlDescription",
|
|
"slug",
|
|
"tags",
|
|
"title",
|
|
"typeId"
|
|
],
|
|
"properties": {
|
|
"aiArticleId": {
|
|
"type": "integer"
|
|
},
|
|
"categoryIds": {
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"createdById": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"htmlDescription": {
|
|
"type": "string"
|
|
},
|
|
"isDraft": {
|
|
"type": "boolean"
|
|
},
|
|
"isPublish": {
|
|
"type": "boolean"
|
|
},
|
|
"oldId": {
|
|
"type": "integer"
|
|
},
|
|
"slug": {
|
|
"type": "string"
|
|
},
|
|
"tags": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"typeId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.ArticlesUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"categoryIds",
|
|
"description",
|
|
"htmlDescription",
|
|
"slug",
|
|
"tags",
|
|
"title",
|
|
"typeId"
|
|
],
|
|
"properties": {
|
|
"aiArticleId": {
|
|
"type": "integer"
|
|
},
|
|
"categoryIds": {
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"createdById": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"htmlDescription": {
|
|
"type": "string"
|
|
},
|
|
"isDraft": {
|
|
"type": "boolean"
|
|
},
|
|
"isPublish": {
|
|
"type": "boolean"
|
|
},
|
|
"slug": {
|
|
"type": "string"
|
|
},
|
|
"statusId": {
|
|
"type": "integer"
|
|
},
|
|
"tags": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"typeId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.CitiesCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"cityName",
|
|
"provId"
|
|
],
|
|
"properties": {
|
|
"cityName": {
|
|
"type": "string"
|
|
},
|
|
"provId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.CitiesUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"cityName",
|
|
"id",
|
|
"provId"
|
|
],
|
|
"properties": {
|
|
"cityName": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"provId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.ClientsCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"createdById": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.ClientsUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"createdById": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.CreateClientApprovalSettingsRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"approvalExemptCategories": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"approvalExemptRoles": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"approvalExemptUsers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"autoPublishArticles": {
|
|
"type": "boolean"
|
|
},
|
|
"defaultWorkflowId": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"isActive": {
|
|
"type": "boolean"
|
|
},
|
|
"requireApprovalFor": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"requiresApproval": {
|
|
"type": "boolean"
|
|
},
|
|
"skipApprovalFor": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"request.CustomStaticPagesCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"htmlBody",
|
|
"slug",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"htmlBody": {
|
|
"type": "string"
|
|
},
|
|
"slug": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.CustomStaticPagesUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"htmlBody",
|
|
"id",
|
|
"slug",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"htmlBody": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"slug": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.DisableApprovalRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"handleAction",
|
|
"reason"
|
|
],
|
|
"properties": {
|
|
"handleAction": {
|
|
"description": "How to handle pending articles",
|
|
"type": "string",
|
|
"enum": [
|
|
"auto_approve",
|
|
"keep_pending",
|
|
"reset_to_draft"
|
|
]
|
|
},
|
|
"reason": {
|
|
"type": "string",
|
|
"maxLength": 500
|
|
}
|
|
}
|
|
},
|
|
"request.EnableApprovalRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"defaultWorkflowId": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
},
|
|
"reason": {
|
|
"type": "string",
|
|
"maxLength": 500
|
|
}
|
|
}
|
|
},
|
|
"request.FeedbacksCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"commentFromEmail",
|
|
"commentFromName",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"commentFromEmail": {
|
|
"type": "string"
|
|
},
|
|
"commentFromName": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.FeedbacksUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"commentFromEmail",
|
|
"commentFromName",
|
|
"id",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"commentFromEmail": {
|
|
"type": "string"
|
|
},
|
|
"commentFromName": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.GalleriesCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"thumbnail_path": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.GalleriesUpdateRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"is_active": {
|
|
"type": "boolean"
|
|
},
|
|
"thumbnail_path": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.ProductSpecificationsUpdateRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"is_active": {
|
|
"type": "boolean"
|
|
},
|
|
"product_id": {
|
|
"type": "integer"
|
|
},
|
|
"thumbnail_path": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.PromotionsUpdateRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"is_active": {
|
|
"type": "boolean"
|
|
},
|
|
"thumbnail_path": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.SetDefaultWorkflowRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"workflowId": {
|
|
"type": "integer",
|
|
"minimum": 1
|
|
}
|
|
}
|
|
},
|
|
"request.ToggleApprovalRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"requiresApproval": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"request.UpdateClientApprovalSettingsRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"approvalExemptCategories": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"approvalExemptRoles": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"approvalExemptUsers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"autoPublishArticles": {
|
|
"type": "boolean"
|
|
},
|
|
"defaultWorkflowId": {
|
|
"description": "double pointer to allow nil",
|
|
"type": "integer"
|
|
},
|
|
"isActive": {
|
|
"type": "boolean"
|
|
},
|
|
"requireApprovalFor": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"requiresApproval": {
|
|
"type": "boolean"
|
|
},
|
|
"skipApprovalFor": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"request.UserEmailValidationRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"newEmail": {
|
|
"type": "string"
|
|
},
|
|
"oldEmail": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.UserForgotPassword": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.UserLevelsApprovalRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"ids",
|
|
"isApprovalActive"
|
|
],
|
|
"properties": {
|
|
"ids": {
|
|
"type": "string"
|
|
},
|
|
"isApprovalActive": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"request.UserLevelsCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"aliasName",
|
|
"levelNumber",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"aliasName": {
|
|
"type": "string"
|
|
},
|
|
"group": {
|
|
"type": "string"
|
|
},
|
|
"isActive": {
|
|
"type": "boolean"
|
|
},
|
|
"isApprovalActive": {
|
|
"type": "boolean"
|
|
},
|
|
"levelNumber": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parentLevelId": {
|
|
"type": "integer"
|
|
},
|
|
"provinceId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.UserLevelsUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"aliasName",
|
|
"levelNumber",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"aliasName": {
|
|
"type": "string"
|
|
},
|
|
"group": {
|
|
"type": "string"
|
|
},
|
|
"isApprovalActive": {
|
|
"type": "boolean"
|
|
},
|
|
"levelNumber": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parentLevelId": {
|
|
"type": "integer"
|
|
},
|
|
"provinceId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.UserLogin": {
|
|
"type": "object",
|
|
"properties": {
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"refreshToken": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.UserOtpRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.UserOtpValidation": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"otpCode": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.UserResetPassword": {
|
|
"type": "object",
|
|
"properties": {
|
|
"codeRequest": {
|
|
"type": "string"
|
|
},
|
|
"confirmPassword": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"userId": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.UserRoleAccessesCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"isAdminEnabled",
|
|
"isApprovalEnabled",
|
|
"isDeleteEnabled",
|
|
"isInsertEnabled",
|
|
"isUpdateEnabled",
|
|
"isViewEnabled",
|
|
"menuId"
|
|
],
|
|
"properties": {
|
|
"isAdminEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isApprovalEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isDeleteEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isInsertEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isUpdateEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isViewEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"menuId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.UserRoleAccessesUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"isAdminEnabled",
|
|
"isApprovalEnabled",
|
|
"isDeleteEnabled",
|
|
"isInsertEnabled",
|
|
"isUpdateEnabled",
|
|
"isViewEnabled",
|
|
"menuId",
|
|
"userRoleId"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"isAdminEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isApprovalEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isDeleteEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isInsertEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isUpdateEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"isViewEnabled": {
|
|
"type": "boolean"
|
|
},
|
|
"menuId": {
|
|
"type": "integer"
|
|
},
|
|
"userRoleId": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"request.UserRolesCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"description",
|
|
"name",
|
|
"statusId",
|
|
"userLevelIds",
|
|
"userRoleAccess"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"statusId": {
|
|
"type": "integer"
|
|
},
|
|
"userLevelIds": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"userRoleAccess": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/request.UserRoleAccessesCreateRequest"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"request.UserRolesUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"description",
|
|
"levelNumber",
|
|
"name",
|
|
"statusId",
|
|
"userLevelIds"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"levelNumber": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"statusId": {
|
|
"type": "integer"
|
|
},
|
|
"userLevelIds": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"request.UserSavePassword": {
|
|
"type": "object",
|
|
"properties": {
|
|
"confirmPassword": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.UsersCreateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"fullname",
|
|
"password",
|
|
"userLevelId",
|
|
"userRoleId",
|
|
"username"
|
|
],
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"dateOfBirth": {
|
|
"type": "string"
|
|
},
|
|
"degree": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"fullname": {
|
|
"type": "string"
|
|
},
|
|
"genderType": {
|
|
"type": "string"
|
|
},
|
|
"identityGroup": {
|
|
"type": "string"
|
|
},
|
|
"identityGroupNumber": {
|
|
"type": "string"
|
|
},
|
|
"identityNumber": {
|
|
"type": "string"
|
|
},
|
|
"identityType": {
|
|
"type": "string"
|
|
},
|
|
"lastEducation": {
|
|
"type": "string"
|
|
},
|
|
"lastJobTitle": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phoneNumber": {
|
|
"type": "string"
|
|
},
|
|
"userLevelId": {
|
|
"type": "integer"
|
|
},
|
|
"userRoleId": {
|
|
"type": "integer"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"whatsappNumber": {
|
|
"type": "string"
|
|
},
|
|
"workType": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"request.UsersUpdateRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"email",
|
|
"fullname",
|
|
"userLevelId",
|
|
"userRoleId",
|
|
"username"
|
|
],
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"dateOfBirth": {
|
|
"type": "string"
|
|
},
|
|
"degree": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"fullname": {
|
|
"type": "string"
|
|
},
|
|
"genderType": {
|
|
"type": "string"
|
|
},
|
|
"identityGroup": {
|
|
"type": "string"
|
|
},
|
|
"identityGroupNumber": {
|
|
"type": "string"
|
|
},
|
|
"identityNumber": {
|
|
"type": "string"
|
|
},
|
|
"identityType": {
|
|
"type": "string"
|
|
},
|
|
"lastEducation": {
|
|
"type": "string"
|
|
},
|
|
"lastJobTitle": {
|
|
"type": "string"
|
|
},
|
|
"phoneNumber": {
|
|
"type": "string"
|
|
},
|
|
"statusId": {
|
|
"type": "integer"
|
|
},
|
|
"userLevelId": {
|
|
"type": "integer"
|
|
},
|
|
"userRoleId": {
|
|
"type": "integer"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"whatsappNumber": {
|
|
"type": "string"
|
|
},
|
|
"workType": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"response.BadRequestError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"example": 400
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "bad request"
|
|
},
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": false
|
|
}
|
|
}
|
|
},
|
|
"response.InternalServerError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"example": 500
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "internal server error"
|
|
},
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": false
|
|
}
|
|
}
|
|
},
|
|
"response.Response": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"example": 200
|
|
},
|
|
"data": {},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {}
|
|
},
|
|
"meta": {},
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": true
|
|
}
|
|
}
|
|
},
|
|
"response.UnauthorizedError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"example": 401
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"example": "unauthorized access"
|
|
},
|
|
"success": {
|
|
"type": "boolean",
|
|
"example": false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |