From 6da67768dfd64b300be57e1b9e66d7ce5e6e7ee1 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Tue, 20 Jan 2026 08:08:14 +0700 Subject: [PATCH] feat: update approval on 5 main module --- app/database/entity/banners.entity.go | 1 + app/database/entity/galleries.entity.go | 1 + app/database/entity/products.entity.go | 1 + app/database/entity/promotions.entity.go | 1 + app/database/entity/sales_agents.entity.go | 1 + app/module/banners/banners.module.go | 1 + .../banners/controller/banners.controller.go | 47 + app/module/banners/mapper/banners.mapper.go | 1 + .../banners/repository/banners.repository.go | 7 + .../banners/response/banners.response.go | 1 + app/module/banners/service/banners.service.go | 30 + .../controller/galleries.controller.go | 47 + app/module/galleries/galleries.module.go | 1 + .../galleries/mapper/galleries.mapper.go | 1 + .../repository/galleries.repository.go | 7 + .../galleries/response/galleries.response.go | 1 + .../galleries/service/galleries.service.go | 30 + .../controller/products.controller.go | 47 + app/module/products/mapper/products.mapper.go | 1 + app/module/products/products.module.go | 1 + .../repository/products.repository.go | 7 + .../products/response/products.response.go | 1 + .../products/service/products.service.go | 30 + .../controller/promotions.controller.go | 47 + .../promotions/mapper/promotions.mapper.go | 1 + app/module/promotions/promotions.module.go | 1 + .../repository/promotions.repository.go | 6 + .../response/promotions.response.go | 1 + .../promotions/service/promotions.service.go | 30 + .../controller/sales_agents.controller.go | 47 + .../mapper/sales_agents.mapper.go | 1 + .../repository/sales_agents.repository.go | 7 + .../response/sales_agents.response.go | 1 + .../sales_agents/sales_agents.module.go | 1 + .../service/sales_agents.service.go | 30 + docs/swagger/docs.go | 1117 +- docs/swagger/swagger.json | 23420 ++++++++-------- docs/swagger/swagger.yaml | 9262 +++--- 38 files changed, 18911 insertions(+), 15327 deletions(-) diff --git a/app/database/entity/banners.entity.go b/app/database/entity/banners.entity.go index e1a7005..e8980db 100644 --- a/app/database/entity/banners.entity.go +++ b/app/database/entity/banners.entity.go @@ -11,6 +11,7 @@ type Banners struct { ThumbnailPath *string `json:"thumbnail_path" gorm:"type:varchar"` Position *string `json:"position" gorm:"type:varchar"` Status *string `json:"status" gorm:"type:varchar"` + StatusId *int `json:"status_id" gorm:"type:int4;default:1"` IsActive *bool `json:"is_active" gorm:"type:bool;default:true"` CreatedAt time.Time `json:"created_at" gorm:"default:now()"` UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` diff --git a/app/database/entity/galleries.entity.go b/app/database/entity/galleries.entity.go index 6a34dcb..b2ec383 100644 --- a/app/database/entity/galleries.entity.go +++ b/app/database/entity/galleries.entity.go @@ -9,6 +9,7 @@ type Galleries struct { Title string `json:"title" gorm:"type:varchar"` Description *string `json:"description" gorm:"type:text"` ThumbnailPath *string `json:"thumbnail_path" gorm:"type:varchar"` + StatusId *int `json:"status_id" gorm:"type:int4;default:1"` IsActive *bool `json:"is_active" gorm:"type:bool;default:true"` CreatedAt time.Time `json:"created_at" gorm:"default:now()"` UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` diff --git a/app/database/entity/products.entity.go b/app/database/entity/products.entity.go index 9f286a3..0698156 100644 --- a/app/database/entity/products.entity.go +++ b/app/database/entity/products.entity.go @@ -12,6 +12,7 @@ type Products struct { ThumbnailPath *string `json:"thumbnail_path" gorm:"type:varchar"` Colors *string `json:"colors" gorm:"type:text"` // JSON array stored as text Status *string `json:"status" gorm:"type:varchar"` + StatusId *int `json:"status_id" gorm:"type:int4;default:1"` IsActive *bool `json:"is_active" gorm:"type:bool;default:true"` CreatedAt time.Time `json:"created_at" gorm:"default:now()"` UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` diff --git a/app/database/entity/promotions.entity.go b/app/database/entity/promotions.entity.go index 73b6cb4..e4fd417 100644 --- a/app/database/entity/promotions.entity.go +++ b/app/database/entity/promotions.entity.go @@ -9,6 +9,7 @@ type Promotions struct { Title string `json:"title" gorm:"type:varchar"` Description *string `json:"description" gorm:"type:text"` ThumbnailPath *string `json:"thumbnail_path" gorm:"type:varchar"` + StatusId *int `json:"status_id" gorm:"type:int4;default:1"` IsActive *bool `json:"is_active" gorm:"type:bool;default:true"` CreatedAt time.Time `json:"created_at" gorm:"default:now()"` UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` diff --git a/app/database/entity/sales_agents.entity.go b/app/database/entity/sales_agents.entity.go index c0d056d..0c6a0c8 100644 --- a/app/database/entity/sales_agents.entity.go +++ b/app/database/entity/sales_agents.entity.go @@ -11,6 +11,7 @@ type SalesAgents struct { Phone *string `json:"phone" gorm:"type:varchar"` AgentType *string `json:"agent_type" gorm:"type:text"` // JSON array stored as text ProfilePicturePath *string `json:"profile_picture_path" gorm:"type:varchar"` + StatusId *int `json:"status_id" gorm:"type:int4;default:1"` IsActive *bool `json:"is_active" gorm:"type:bool;default:true"` CreatedAt time.Time `json:"created_at" gorm:"default:now()"` UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"` diff --git a/app/module/banners/banners.module.go b/app/module/banners/banners.module.go index f6f9a8b..687aeae 100644 --- a/app/module/banners/banners.module.go +++ b/app/module/banners/banners.module.go @@ -50,6 +50,7 @@ func (_i *BannersRouter) RegisterBannersRoutes() { router.Get("/:id", bannersController.Show) router.Post("/", bannersController.Save) router.Put("/:id", bannersController.Update) + router.Put("/:id/approve", bannersController.Approve) router.Delete("/:id", bannersController.Delete) }) } diff --git a/app/module/banners/controller/banners.controller.go b/app/module/banners/controller/banners.controller.go index cfa0175..2195a87 100644 --- a/app/module/banners/controller/banners.controller.go +++ b/app/module/banners/controller/banners.controller.go @@ -1,6 +1,7 @@ package controller import ( + "jaecoo-be/app/database/entity/users" "jaecoo-be/app/module/banners/request" "jaecoo-be/app/module/banners/service" "jaecoo-be/utils/paginator" @@ -21,6 +22,7 @@ type BannersController interface { Save(c *fiber.Ctx) error Update(c *fiber.Ctx) error Delete(c *fiber.Ctx) error + Approve(c *fiber.Ctx) error Viewer(c *fiber.Ctx) error } @@ -271,6 +273,51 @@ func (_i *bannersController) Delete(c *fiber.Ctx) error { }) } +// Approve Banner +// @Summary Approve Banner +// @Description API for approving Banner (only for admin with roleId = 1) +// @Tags Banners +// @Security Bearer +// @Param X-Client-Key header string true "Insert the X-Client-Key" +// @Param id path int true "Banner ID" +// @Success 200 {object} response.Response +// @Failure 400 {object} response.BadRequestError +// @Failure 401 {object} response.UnauthorizedError +// @Failure 500 {object} response.InternalServerError +// @Router /banners/{id}/approve [put] +func (_i *bannersController) Approve(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + // Get user from context + user := c.Locals("user") + if user == nil { + return utilRes.Resp(c, utilRes.Response{ + Success: false, + Messages: utilRes.Messages{"Unauthorized: user not found"}, + }) + } + + // Type assert to get user role ID + userRoleId := uint(0) + if userData, ok := user.(*users.Users); ok { + userRoleId = userData.UserRoleId + } + + bannerData, err := _i.bannersService.Approve(uint(id), userRoleId) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Success: true, + Messages: utilRes.Messages{"Banner successfully approved"}, + Data: bannerData, + }) +} + // Viewer Banner // @Summary Viewer Banner // @Description API for viewing Banner file diff --git a/app/module/banners/mapper/banners.mapper.go b/app/module/banners/mapper/banners.mapper.go index 846b527..2ec3bf3 100644 --- a/app/module/banners/mapper/banners.mapper.go +++ b/app/module/banners/mapper/banners.mapper.go @@ -18,6 +18,7 @@ func BannersResponseMapper(banner *entity.Banners, host string) *res.BannersResp ThumbnailPath: banner.ThumbnailPath, Position: banner.Position, Status: banner.Status, + StatusId: banner.StatusId, IsActive: banner.IsActive, CreatedAt: banner.CreatedAt, UpdatedAt: banner.UpdatedAt, diff --git a/app/module/banners/repository/banners.repository.go b/app/module/banners/repository/banners.repository.go index 0fc73fc..8bf054d 100644 --- a/app/module/banners/repository/banners.repository.go +++ b/app/module/banners/repository/banners.repository.go @@ -22,6 +22,7 @@ type BannersRepository interface { Update(id uint, banner *entity.Banners) (err error) Delete(id uint) (err error) FindByThumbnailPath(thumbnailPath string) (banner *entity.Banners, err error) + Approve(id uint) (err error) } func NewBannersRepository(db *database.Database, log zerolog.Logger) BannersRepository { @@ -97,3 +98,9 @@ func (_i *bannersRepository) FindByThumbnailPath(thumbnailPath string) (banner * err = _i.DB.DB.Where("thumbnail_path LIKE ? AND is_active = ?", "%"+thumbnailPath, true).First(banner).Error return } + +func (_i *bannersRepository) Approve(id uint) (err error) { + statusId := 2 // Approved status + err = _i.DB.DB.Model(&entity.Banners{}).Where("id = ?", id).Update("status_id", statusId).Error + return +} diff --git a/app/module/banners/response/banners.response.go b/app/module/banners/response/banners.response.go index d328636..1024e5c 100644 --- a/app/module/banners/response/banners.response.go +++ b/app/module/banners/response/banners.response.go @@ -12,6 +12,7 @@ type BannersResponse struct { ThumbnailUrl *string `json:"thumbnail_url"` Position *string `json:"position"` Status *string `json:"status"` + StatusId *int `json:"status_id"` IsActive *bool `json:"is_active"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` diff --git a/app/module/banners/service/banners.service.go b/app/module/banners/service/banners.service.go index 8e9876f..4cdea3d 100644 --- a/app/module/banners/service/banners.service.go +++ b/app/module/banners/service/banners.service.go @@ -37,6 +37,7 @@ type BannersService interface { Create(c *fiber.Ctx, req request.BannersCreateRequest) (banner *response.BannersResponse, err error) Update(c *fiber.Ctx, id uint, req request.BannersUpdateRequest) (banner *response.BannersResponse, err error) Delete(id uint) (err error) + Approve(id uint, userRoleId uint) (banner *response.BannersResponse, err error) UploadFileToMinio(c *fiber.Ctx, fileKey string) (filePath *string, err error) Viewer(c *fiber.Ctx) (err error) } @@ -197,6 +198,35 @@ func (_i *bannersService) Delete(id uint) (err error) { return } +func (_i *bannersService) Approve(id uint, userRoleId uint) (banner *response.BannersResponse, err error) { + // Check if user has admin role (roleId = 1) + if userRoleId != 1 { + err = errors.New("unauthorized: only admin can approve") + return + } + + // Approve banner (update status_id to 2) + err = _i.Repo.Approve(id) + if err != nil { + return + } + + // Get updated banner data + bannerEntity, err := _i.Repo.FindOne(id) + if err != nil { + return + } + + if bannerEntity == nil { + err = errors.New("banner not found") + return + } + + host := _i.Cfg.App.Domain + banner = mapper.BannersResponseMapper(bannerEntity, host) + return +} + func (_i *bannersService) Viewer(c *fiber.Ctx) (err error) { filename := c.Params("filename") diff --git a/app/module/galleries/controller/galleries.controller.go b/app/module/galleries/controller/galleries.controller.go index 2c3bb46..c80f5a4 100644 --- a/app/module/galleries/controller/galleries.controller.go +++ b/app/module/galleries/controller/galleries.controller.go @@ -1,6 +1,7 @@ package controller import ( + "jaecoo-be/app/database/entity/users" "jaecoo-be/app/module/galleries/request" "jaecoo-be/app/module/galleries/service" "jaecoo-be/utils/paginator" @@ -22,6 +23,7 @@ type GalleriesController interface { Save(c *fiber.Ctx) error Update(c *fiber.Ctx) error Delete(c *fiber.Ctx) error + Approve(c *fiber.Ctx) error } func NewGalleriesController(galleriesService service.GalleriesService) GalleriesController { @@ -192,3 +194,48 @@ func (_i *galleriesController) Delete(c *fiber.Ctx) error { Messages: utilRes.Messages{"Gallery successfully deleted"}, }) } + +// Approve Gallery +// @Summary Approve Gallery +// @Description API for approving Gallery (only for admin with roleId = 1) +// @Tags Galleries +// @Security Bearer +// @Param X-Client-Key header string true "Insert the X-Client-Key" +// @Param id path int true "Gallery ID" +// @Success 200 {object} response.Response +// @Failure 400 {object} response.BadRequestError +// @Failure 401 {object} response.UnauthorizedError +// @Failure 500 {object} response.InternalServerError +// @Router /galleries/{id}/approve [put] +func (_i *galleriesController) Approve(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + // Get user from context + user := c.Locals("user") + if user == nil { + return utilRes.Resp(c, utilRes.Response{ + Success: false, + Messages: utilRes.Messages{"Unauthorized: user not found"}, + }) + } + + // Type assert to get user role ID + userRoleId := uint(0) + if userData, ok := user.(*users.Users); ok { + userRoleId = userData.UserRoleId + } + + galleryData, err := _i.galleriesService.Approve(uint(id), userRoleId) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Success: true, + Messages: utilRes.Messages{"Gallery successfully approved"}, + Data: galleryData, + }) +} diff --git a/app/module/galleries/galleries.module.go b/app/module/galleries/galleries.module.go index ea76591..e871667 100644 --- a/app/module/galleries/galleries.module.go +++ b/app/module/galleries/galleries.module.go @@ -49,6 +49,7 @@ func (_i *GalleriesRouter) RegisterGalleriesRoutes() { router.Get("/:id", galleriesController.Show) router.Post("/", galleriesController.Save) router.Put("/:id", galleriesController.Update) + router.Put("/:id/approve", galleriesController.Approve) router.Delete("/:id", galleriesController.Delete) }) } diff --git a/app/module/galleries/mapper/galleries.mapper.go b/app/module/galleries/mapper/galleries.mapper.go index b436dfd..cbeb068 100644 --- a/app/module/galleries/mapper/galleries.mapper.go +++ b/app/module/galleries/mapper/galleries.mapper.go @@ -15,6 +15,7 @@ func GalleriesResponseMapper(gallery *entity.Galleries, host string) *res.Galler Title: gallery.Title, Description: gallery.Description, ThumbnailPath: gallery.ThumbnailPath, + StatusId: gallery.StatusId, IsActive: gallery.IsActive, CreatedAt: gallery.CreatedAt, UpdatedAt: gallery.UpdatedAt, diff --git a/app/module/galleries/repository/galleries.repository.go b/app/module/galleries/repository/galleries.repository.go index e542723..d0a7f81 100644 --- a/app/module/galleries/repository/galleries.repository.go +++ b/app/module/galleries/repository/galleries.repository.go @@ -21,6 +21,7 @@ type GalleriesRepository interface { Create(gallery *entity.Galleries) (galleryReturn *entity.Galleries, err error) Update(id uint, gallery *entity.Galleries) (err error) Delete(id uint) (err error) + Approve(id uint) (err error) } func NewGalleriesRepository(db *database.Database, log zerolog.Logger) GalleriesRepository { @@ -82,3 +83,9 @@ func (_i *galleriesRepository) Delete(id uint) (err error) { err = _i.DB.DB.Model(&entity.Galleries{}).Where("id = ?", id).Update("is_active", false).Error return } + +func (_i *galleriesRepository) Approve(id uint) (err error) { + statusId := 2 // Approved status + err = _i.DB.DB.Model(&entity.Galleries{}).Where("id = ?", id).Update("status_id", statusId).Error + return +} diff --git a/app/module/galleries/response/galleries.response.go b/app/module/galleries/response/galleries.response.go index a245792..a169b79 100644 --- a/app/module/galleries/response/galleries.response.go +++ b/app/module/galleries/response/galleries.response.go @@ -10,6 +10,7 @@ type GalleriesResponse struct { Description *string `json:"description"` ThumbnailPath *string `json:"thumbnail_path"` ThumbnailUrl *string `json:"thumbnail_url"` + StatusId *int `json:"status_id"` IsActive *bool `json:"is_active"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` diff --git a/app/module/galleries/service/galleries.service.go b/app/module/galleries/service/galleries.service.go index c52179f..599738d 100644 --- a/app/module/galleries/service/galleries.service.go +++ b/app/module/galleries/service/galleries.service.go @@ -24,6 +24,7 @@ type GalleriesService interface { Create(req request.GalleriesCreateRequest) (gallery *response.GalleriesResponse, err error) Update(id uint, req request.GalleriesUpdateRequest) (gallery *response.GalleriesResponse, err error) Delete(id uint) (err error) + Approve(id uint, userRoleId uint) (gallery *response.GalleriesResponse, err error) } func NewGalleriesService(repo repository.GalleriesRepository, log zerolog.Logger, cfg *config.Config) GalleriesService { @@ -105,3 +106,32 @@ func (_i *galleriesService) Delete(id uint) (err error) { err = _i.Repo.Delete(id) return } + +func (_i *galleriesService) Approve(id uint, userRoleId uint) (gallery *response.GalleriesResponse, err error) { + // Check if user has admin role (roleId = 1) + if userRoleId != 1 { + err = errors.New("unauthorized: only admin can approve") + return + } + + // Approve gallery (update status_id to 2) + err = _i.Repo.Approve(id) + if err != nil { + return + } + + // Get updated gallery data + galleryEntity, err := _i.Repo.FindOne(id) + if err != nil { + return + } + + if galleryEntity == nil { + err = errors.New("gallery not found") + return + } + + host := _i.Cfg.App.Domain + gallery = mapper.GalleriesResponseMapper(galleryEntity, host) + return +} diff --git a/app/module/products/controller/products.controller.go b/app/module/products/controller/products.controller.go index 87b1218..c747f72 100644 --- a/app/module/products/controller/products.controller.go +++ b/app/module/products/controller/products.controller.go @@ -2,6 +2,7 @@ package controller import ( "encoding/json" + "jaecoo-be/app/database/entity/users" "jaecoo-be/app/module/products/request" "jaecoo-be/app/module/products/service" "jaecoo-be/utils/paginator" @@ -22,6 +23,7 @@ type ProductsController interface { Save(c *fiber.Ctx) error Update(c *fiber.Ctx) error Delete(c *fiber.Ctx) error + Approve(c *fiber.Ctx) error Viewer(c *fiber.Ctx) error } @@ -279,6 +281,51 @@ func (_i *productsController) Delete(c *fiber.Ctx) error { }) } +// Approve Product +// @Summary Approve Product +// @Description API for approving Product (only for admin with roleId = 1) +// @Tags Products +// @Security Bearer +// @Param X-Client-Key header string true "Insert the X-Client-Key" +// @Param id path int true "Product ID" +// @Success 200 {object} response.Response +// @Failure 400 {object} response.BadRequestError +// @Failure 401 {object} response.UnauthorizedError +// @Failure 500 {object} response.InternalServerError +// @Router /products/{id}/approve [put] +func (_i *productsController) Approve(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + // Get user from context + user := c.Locals("user") + if user == nil { + return utilRes.Resp(c, utilRes.Response{ + Success: false, + Messages: utilRes.Messages{"Unauthorized: user not found"}, + }) + } + + // Type assert to get user role ID + userRoleId := uint(0) + if userData, ok := user.(*users.Users); ok { + userRoleId = userData.UserRoleId + } + + productData, err := _i.productsService.Approve(uint(id), userRoleId) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Success: true, + Messages: utilRes.Messages{"Product successfully approved"}, + Data: productData, + }) +} + // Viewer Product // @Summary Viewer Product // @Description API for viewing Product file diff --git a/app/module/products/mapper/products.mapper.go b/app/module/products/mapper/products.mapper.go index 7c4a8af..60f6e02 100644 --- a/app/module/products/mapper/products.mapper.go +++ b/app/module/products/mapper/products.mapper.go @@ -25,6 +25,7 @@ func ProductsResponseMapper(product *entity.Products, host string) *res.Products ThumbnailPath: product.ThumbnailPath, Colors: colors, Status: product.Status, + StatusId: product.StatusId, IsActive: product.IsActive, CreatedAt: product.CreatedAt, UpdatedAt: product.UpdatedAt, diff --git a/app/module/products/products.module.go b/app/module/products/products.module.go index 4973eea..0953bce 100644 --- a/app/module/products/products.module.go +++ b/app/module/products/products.module.go @@ -50,6 +50,7 @@ func (_i *ProductsRouter) RegisterProductsRoutes() { router.Get("/:id", productsController.Show) router.Post("/", productsController.Save) router.Put("/:id", productsController.Update) + router.Put("/:id/approve", productsController.Approve) router.Delete("/:id", productsController.Delete) }) } diff --git a/app/module/products/repository/products.repository.go b/app/module/products/repository/products.repository.go index 9523516..4414d27 100644 --- a/app/module/products/repository/products.repository.go +++ b/app/module/products/repository/products.repository.go @@ -22,6 +22,7 @@ type ProductsRepository interface { Update(id uint, product *entity.Products) (err error) Delete(id uint) (err error) FindByThumbnailPath(thumbnailPath string) (product *entity.Products, err error) + Approve(id uint) (err error) } func NewProductsRepository(db *database.Database, log zerolog.Logger) ProductsRepository { @@ -98,3 +99,9 @@ func (_i *productsRepository) FindByThumbnailPath(thumbnailPath string) (product return } +func (_i *productsRepository) Approve(id uint) (err error) { + statusId := 2 // Approved status + err = _i.DB.DB.Model(&entity.Products{}).Where("id = ?", id).Update("status_id", statusId).Error + return +} + diff --git a/app/module/products/response/products.response.go b/app/module/products/response/products.response.go index 251f197..1a78495 100644 --- a/app/module/products/response/products.response.go +++ b/app/module/products/response/products.response.go @@ -13,6 +13,7 @@ type ProductsResponse struct { ThumbnailUrl *string `json:"thumbnail_url"` Colors []string `json:"colors"` Status *string `json:"status"` + StatusId *int `json:"status_id"` IsActive *bool `json:"is_active"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` diff --git a/app/module/products/service/products.service.go b/app/module/products/service/products.service.go index 448a5bc..f615679 100644 --- a/app/module/products/service/products.service.go +++ b/app/module/products/service/products.service.go @@ -37,6 +37,7 @@ type ProductsService interface { Create(c *fiber.Ctx, req request.ProductsCreateRequest) (product *response.ProductsResponse, err error) Update(c *fiber.Ctx, id uint, req request.ProductsUpdateRequest) (product *response.ProductsResponse, err error) Delete(id uint) (err error) + Approve(id uint, userRoleId uint) (product *response.ProductsResponse, err error) UploadFileToMinio(c *fiber.Ctx, fileKey string) (filePath *string, err error) Viewer(c *fiber.Ctx) (err error) } @@ -272,3 +273,32 @@ func getFileExtension(filename string) string { // ambil ekstensi terakhir return parts[len(parts)-1] } + +func (_i *productsService) Approve(id uint, userRoleId uint) (product *response.ProductsResponse, err error) { + // Check if user has admin role (roleId = 1) + if userRoleId != 1 { + err = errors.New("unauthorized: only admin can approve") + return + } + + // Approve product (update status_id to 2) + err = _i.Repo.Approve(id) + if err != nil { + return + } + + // Get updated product data + productEntity, err := _i.Repo.FindOne(id) + if err != nil { + return + } + + if productEntity == nil { + err = errors.New("product not found") + return + } + + host := _i.Cfg.App.Domain + product = mapper.ProductsResponseMapper(productEntity, host) + return +} diff --git a/app/module/promotions/controller/promotions.controller.go b/app/module/promotions/controller/promotions.controller.go index 5b1ec89..0bf7da4 100644 --- a/app/module/promotions/controller/promotions.controller.go +++ b/app/module/promotions/controller/promotions.controller.go @@ -1,6 +1,7 @@ package controller import ( + "jaecoo-be/app/database/entity/users" "jaecoo-be/app/module/promotions/request" "jaecoo-be/app/module/promotions/service" "jaecoo-be/utils/paginator" @@ -22,6 +23,7 @@ type PromotionsController interface { Save(c *fiber.Ctx) error Update(c *fiber.Ctx) error Delete(c *fiber.Ctx) error + Approve(c *fiber.Ctx) error Viewer(c *fiber.Ctx) error } @@ -222,6 +224,51 @@ func (_i *promotionsController) Delete(c *fiber.Ctx) error { }) } +// Approve Promotion +// @Summary Approve Promotion +// @Description API for approving Promotion (only for admin with roleId = 1) +// @Tags Promotions +// @Security Bearer +// @Param X-Client-Key header string true "Insert the X-Client-Key" +// @Param id path int true "Promotion ID" +// @Success 200 {object} response.Response +// @Failure 400 {object} response.BadRequestError +// @Failure 401 {object} response.UnauthorizedError +// @Failure 500 {object} response.InternalServerError +// @Router /promotions/{id}/approve [put] +func (_i *promotionsController) Approve(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + // Get user from context + user := c.Locals("user") + if user == nil { + return utilRes.Resp(c, utilRes.Response{ + Success: false, + Messages: utilRes.Messages{"Unauthorized: user not found"}, + }) + } + + // Type assert to get user role ID + userRoleId := uint(0) + if userData, ok := user.(*users.Users); ok { + userRoleId = userData.UserRoleId + } + + promotionData, err := _i.promotionsService.Approve(uint(id), userRoleId) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Success: true, + Messages: utilRes.Messages{"Promotion successfully approved"}, + Data: promotionData, + }) +} + // Viewer Promotion // @Summary Viewer Promotion // @Description API for viewing Promotion file diff --git a/app/module/promotions/mapper/promotions.mapper.go b/app/module/promotions/mapper/promotions.mapper.go index f2b1f94..ec36608 100644 --- a/app/module/promotions/mapper/promotions.mapper.go +++ b/app/module/promotions/mapper/promotions.mapper.go @@ -16,6 +16,7 @@ func PromotionsResponseMapper(promotion *entity.Promotions, host string) *res.Pr Title: promotion.Title, Description: promotion.Description, ThumbnailPath: promotion.ThumbnailPath, + StatusId: promotion.StatusId, IsActive: promotion.IsActive, CreatedAt: promotion.CreatedAt, UpdatedAt: promotion.UpdatedAt, diff --git a/app/module/promotions/promotions.module.go b/app/module/promotions/promotions.module.go index ab55a04..d297672 100644 --- a/app/module/promotions/promotions.module.go +++ b/app/module/promotions/promotions.module.go @@ -50,6 +50,7 @@ func (_i *PromotionsRouter) RegisterPromotionsRoutes() { router.Get("/:id", promotionsController.Show) router.Post("/", promotionsController.Save) router.Put("/:id", promotionsController.Update) + router.Put("/:id/approve", promotionsController.Approve) router.Delete("/:id", promotionsController.Delete) }) } diff --git a/app/module/promotions/repository/promotions.repository.go b/app/module/promotions/repository/promotions.repository.go index c8900d9..a6ffbe3 100644 --- a/app/module/promotions/repository/promotions.repository.go +++ b/app/module/promotions/repository/promotions.repository.go @@ -22,6 +22,7 @@ type PromotionsRepository interface { Update(id uint, promotion *entity.Promotions) (err error) Delete(id uint) (err error) FindByThumbnailPath(thumbnailPath string) (promotion *entity.Promotions, err error) + Approve(id uint) (err error) } func NewPromotionsRepository(db *database.Database, log zerolog.Logger) PromotionsRepository { @@ -90,3 +91,8 @@ func (_i *promotionsRepository) FindByThumbnailPath(thumbnailPath string) (promo return } +func (_i *promotionsRepository) Approve(id uint) (err error) { + statusId := 2 // Approved status + err = _i.DB.DB.Model(&entity.Promotions{}).Where("id = ?", id).Update("status_id", statusId).Error + return +} diff --git a/app/module/promotions/response/promotions.response.go b/app/module/promotions/response/promotions.response.go index f2dfb6b..aa6a099 100644 --- a/app/module/promotions/response/promotions.response.go +++ b/app/module/promotions/response/promotions.response.go @@ -10,6 +10,7 @@ type PromotionsResponse struct { Description *string `json:"description"` ThumbnailPath *string `json:"thumbnail_path"` ThumbnailUrl *string `json:"thumbnail_url"` + StatusId *int `json:"status_id"` IsActive *bool `json:"is_active"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` diff --git a/app/module/promotions/service/promotions.service.go b/app/module/promotions/service/promotions.service.go index c0228cb..669554b 100644 --- a/app/module/promotions/service/promotions.service.go +++ b/app/module/promotions/service/promotions.service.go @@ -37,6 +37,7 @@ type PromotionsService interface { Create(c *fiber.Ctx, req request.PromotionsCreateRequest) (promotion *response.PromotionsResponse, err error) Update(id uint, req request.PromotionsUpdateRequest) (promotion *response.PromotionsResponse, err error) Delete(id uint) (err error) + Approve(id uint, userRoleId uint) (promotion *response.PromotionsResponse, err error) UploadFileToMinio(c *fiber.Ctx, fileKey string) (filePath *string, err error) Viewer(c *fiber.Ctx) (err error) } @@ -267,3 +268,32 @@ func getFileExtension(filename string) string { // ambil ekstensi terakhir return parts[len(parts)-1] } + +func (_i *promotionsService) Approve(id uint, userRoleId uint) (promotion *response.PromotionsResponse, err error) { + // Check if user has admin role (roleId = 1) + if userRoleId != 1 { + err = errors.New("unauthorized: only admin can approve") + return + } + + // Approve promotion (update status_id to 2) + err = _i.Repo.Approve(id) + if err != nil { + return + } + + // Get updated promotion data + promotionEntity, err := _i.Repo.FindOne(id) + if err != nil { + return + } + + if promotionEntity == nil { + err = errors.New("promotion not found") + return + } + + host := _i.Cfg.App.Domain + promotion = mapper.PromotionsResponseMapper(promotionEntity, host) + return +} diff --git a/app/module/sales_agents/controller/sales_agents.controller.go b/app/module/sales_agents/controller/sales_agents.controller.go index e05d350..0bd2fe9 100644 --- a/app/module/sales_agents/controller/sales_agents.controller.go +++ b/app/module/sales_agents/controller/sales_agents.controller.go @@ -2,6 +2,7 @@ package controller import ( "encoding/json" + "jaecoo-be/app/database/entity/users" "jaecoo-be/app/module/sales_agents/request" "jaecoo-be/app/module/sales_agents/service" "jaecoo-be/utils/paginator" @@ -22,6 +23,7 @@ type SalesAgentsController interface { Save(c *fiber.Ctx) error Update(c *fiber.Ctx) error Delete(c *fiber.Ctx) error + Approve(c *fiber.Ctx) error Viewer(c *fiber.Ctx) error } @@ -280,6 +282,51 @@ func (_i *salesAgentsController) Delete(c *fiber.Ctx) error { }) } +// Approve SalesAgent +// @Summary Approve SalesAgent +// @Description API for approving SalesAgent (only for admin with roleId = 1) +// @Tags SalesAgents +// @Security Bearer +// @Param X-Client-Key header string true "Insert the X-Client-Key" +// @Param id path int true "SalesAgent ID" +// @Success 200 {object} response.Response +// @Failure 400 {object} response.BadRequestError +// @Failure 401 {object} response.UnauthorizedError +// @Failure 500 {object} response.InternalServerError +// @Router /sales-agents/{id}/approve [put] +func (_i *salesAgentsController) Approve(c *fiber.Ctx) error { + id, err := strconv.ParseUint(c.Params("id"), 10, 0) + if err != nil { + return err + } + + // Get user from context + user := c.Locals("user") + if user == nil { + return utilRes.Resp(c, utilRes.Response{ + Success: false, + Messages: utilRes.Messages{"Unauthorized: user not found"}, + }) + } + + // Type assert to get user role ID + userRoleId := uint(0) + if userData, ok := user.(*users.Users); ok { + userRoleId = userData.UserRoleId + } + + agentData, err := _i.salesAgentsService.Approve(uint(id), userRoleId) + if err != nil { + return err + } + + return utilRes.Resp(c, utilRes.Response{ + Success: true, + Messages: utilRes.Messages{"SalesAgent successfully approved"}, + Data: agentData, + }) +} + // Viewer SalesAgent // @Summary Viewer SalesAgent // @Description API for viewing SalesAgent profile picture file diff --git a/app/module/sales_agents/mapper/sales_agents.mapper.go b/app/module/sales_agents/mapper/sales_agents.mapper.go index 6f1918a..e75f647 100644 --- a/app/module/sales_agents/mapper/sales_agents.mapper.go +++ b/app/module/sales_agents/mapper/sales_agents.mapper.go @@ -24,6 +24,7 @@ func SalesAgentsResponseMapper(agent *entity.SalesAgents, host string) *res.Sale Phone: agent.Phone, AgentType: agentType, ProfilePicturePath: agent.ProfilePicturePath, + StatusId: agent.StatusId, IsActive: agent.IsActive, CreatedAt: agent.CreatedAt, UpdatedAt: agent.UpdatedAt, diff --git a/app/module/sales_agents/repository/sales_agents.repository.go b/app/module/sales_agents/repository/sales_agents.repository.go index e56f9be..f9477fa 100644 --- a/app/module/sales_agents/repository/sales_agents.repository.go +++ b/app/module/sales_agents/repository/sales_agents.repository.go @@ -22,6 +22,7 @@ type SalesAgentsRepository interface { Update(id uint, agent *entity.SalesAgents) (err error) Delete(id uint) (err error) FindByProfilePicturePath(profilePicturePath string) (agent *entity.SalesAgents, err error) + Approve(id uint) (err error) } func NewSalesAgentsRepository(db *database.Database, log zerolog.Logger) SalesAgentsRepository { @@ -98,3 +99,9 @@ func (_i *salesAgentsRepository) FindByProfilePicturePath(profilePicturePath str return } +func (_i *salesAgentsRepository) Approve(id uint) (err error) { + statusId := 2 // Approved status + err = _i.DB.DB.Model(&entity.SalesAgents{}).Where("id = ?", id).Update("status_id", statusId).Error + return +} + diff --git a/app/module/sales_agents/response/sales_agents.response.go b/app/module/sales_agents/response/sales_agents.response.go index 59707c0..b20d73c 100644 --- a/app/module/sales_agents/response/sales_agents.response.go +++ b/app/module/sales_agents/response/sales_agents.response.go @@ -12,6 +12,7 @@ type SalesAgentsResponse struct { AgentType []string `json:"agent_type"` ProfilePicturePath *string `json:"profile_picture_path"` ProfilePictureUrl *string `json:"profile_picture_url"` + StatusId *int `json:"status_id"` IsActive *bool `json:"is_active"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` diff --git a/app/module/sales_agents/sales_agents.module.go b/app/module/sales_agents/sales_agents.module.go index d6d1254..3d948fc 100644 --- a/app/module/sales_agents/sales_agents.module.go +++ b/app/module/sales_agents/sales_agents.module.go @@ -50,6 +50,7 @@ func (_i *SalesAgentsRouter) RegisterSalesAgentsRoutes() { router.Get("/:id", salesAgentsController.Show) router.Post("/", salesAgentsController.Save) router.Put("/:id", salesAgentsController.Update) + router.Put("/:id/approve", salesAgentsController.Approve) router.Delete("/:id", salesAgentsController.Delete) }) } diff --git a/app/module/sales_agents/service/sales_agents.service.go b/app/module/sales_agents/service/sales_agents.service.go index 892b2fa..2cfc51b 100644 --- a/app/module/sales_agents/service/sales_agents.service.go +++ b/app/module/sales_agents/service/sales_agents.service.go @@ -37,6 +37,7 @@ type SalesAgentsService interface { Create(c *fiber.Ctx, req request.SalesAgentsCreateRequest) (agent *response.SalesAgentsResponse, err error) Update(c *fiber.Ctx, id uint, req request.SalesAgentsUpdateRequest) (agent *response.SalesAgentsResponse, err error) Delete(id uint) (err error) + Approve(id uint, userRoleId uint) (agent *response.SalesAgentsResponse, err error) UploadFileToMinio(c *fiber.Ctx, fileKey string) (filePath *string, err error) Viewer(c *fiber.Ctx) (err error) } @@ -272,3 +273,32 @@ func getFileExtension(filename string) string { // ambil ekstensi terakhir return parts[len(parts)-1] } + +func (_i *salesAgentsService) Approve(id uint, userRoleId uint) (agent *response.SalesAgentsResponse, err error) { + // Check if user has admin role (roleId = 1) + if userRoleId != 1 { + err = errors.New("unauthorized: only admin can approve") + return + } + + // Approve sales agent (update status_id to 2) + err = _i.Repo.Approve(id) + if err != nil { + return + } + + // Get updated sales agent data + agentEntity, err := _i.Repo.FindOne(id) + if err != nil { + return + } + + if agentEntity == nil { + err = errors.New("sales agent not found") + return + } + + host := _i.Cfg.App.Domain + agent = mapper.SalesAgentsResponseMapper(agentEntity, host) + return +} diff --git a/docs/swagger/docs.go b/docs/swagger/docs.go index 582bb09..83ea0f2 100644 --- a/docs/swagger/docs.go +++ b/docs/swagger/docs.go @@ -3660,6 +3660,62 @@ const docTemplate = `{ } } }, + "/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" + } + } + } + } + }, "/cities": { "get": { "security": [ @@ -3669,7 +3725,7 @@ const docTemplate = `{ ], "description": "API for getting all Cities", "tags": [ - "Cities" + "Untags" ], "summary": "Get all Cities", "responses": { @@ -3713,7 +3769,7 @@ const docTemplate = `{ ], "description": "API for create Cities", "tags": [ - "Cities" + "Untags" ], "summary": "Create Cities", "parameters": [ @@ -3770,7 +3826,7 @@ const docTemplate = `{ ], "description": "API for getting one Cities", "tags": [ - "Cities" + "Untags" ], "summary": "Get one Cities", "parameters": [ @@ -3829,7 +3885,7 @@ const docTemplate = `{ "application/json" ], "tags": [ - "Cities" + "Untags" ], "summary": "Update Cities", "parameters": [ @@ -3891,7 +3947,7 @@ const docTemplate = `{ ], "description": "API for delete Cities", "tags": [ - "Cities" + "Untags" ], "summary": "Delete Cities", "parameters": [ @@ -3937,6 +3993,635 @@ const docTemplate = `{ } } }, + "/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": [ @@ -5580,6 +6265,62 @@ const docTemplate = `{ } } }, + "/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" + } + } + } + } + }, "/gallery-files": { "get": { "security": [ @@ -6404,6 +7145,11 @@ const docTemplate = `{ "in": "header", "required": true }, + { + "type": "string", + "name": "status", + "in": "query" + }, { "type": "string", "name": "title", @@ -6413,11 +7159,6 @@ const docTemplate = `{ "type": "string", "name": "variant", "in": "query" - }, - { - "type": "string", - "name": "status", - "in": "query" }, { "type": "integer", @@ -6536,12 +7277,6 @@ const docTemplate = `{ "description": "Product colors (JSON array)", "name": "colors", "in": "formData" - }, - { - "type": "string", - "description": "Product status", - "name": "status", - "in": "formData" } ], "responses": { @@ -6727,12 +7462,6 @@ const docTemplate = `{ "name": "variant", "in": "formData" }, - { - "type": "string", - "description": "Product status", - "name": "status", - "in": "formData" - }, { "type": "string", "description": "Product price", @@ -6834,6 +7563,62 @@ const docTemplate = `{ } } }, + "/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" + } + } + } + } + }, "/promotions": { "get": { "security": [ @@ -7223,6 +8008,62 @@ const docTemplate = `{ } } }, + "/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" + } + } + } + } + }, "/provinces": { "get": { "security": [ @@ -7912,6 +8753,62 @@ const docTemplate = `{ } } }, + "/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" + } + } + } + } + }, "/user-levels": { "get": { "security": [ @@ -10700,6 +11597,82 @@ const docTemplate = `{ } } }, + "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": [ @@ -10751,6 +11724,41 @@ const docTemplate = `{ } } }, + "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": [ @@ -10861,6 +11869,71 @@ const docTemplate = `{ } } }, + "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": { diff --git a/docs/swagger/swagger.json b/docs/swagger/swagger.json index 31dadfa..ba488bc 100644 --- a/docs/swagger/swagger.json +++ b/docs/swagger/swagger.json @@ -1,10972 +1,12460 @@ { - "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" - } - } - } - } - }, - "/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" - } - } - } - } + "swagger": "2.0", + "info": { + "contact": {} }, - "/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" - } - } - } - } - }, - "/cities": { - "get": { - "security": [ - { - "Bearer": [] - } - ], - "description": "API for getting all Cities", - "tags": ["Cities"], - "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": ["Cities"], - "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": ["Cities"], - "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": ["Cities"], - "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": ["Cities"], - "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" - } - } - } - } - }, - "/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" - } - } - } - } - }, - "/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": "title", - "in": "query" - }, - { - "type": "string", - "name": "variant", - "in": "query" - }, - { - "type": "string", - "name": "status", - "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" - }, - { - "type": "string", - "description": "Product 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" - } - } - } - } - }, - "/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": "string", - "description": "Product status", - "name": "status", - "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" - } - } - } - } - }, - "/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" - } - } - } - } - }, - "/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" - } - } - } - } - }, - "/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" - } - } + "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" + } + } + } + } + }, + "/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" + } + } + } + } + }, + "/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" + } + } + } + } + }, + "/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" + } + } + } + } + }, + "/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" + } + } + } + } + }, + "/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" + } + } + } + } + }, + "/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" + } + } + } + } } - } }, - "/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": { + "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 + } + } } - } } - }, - "definitions": { - "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.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.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.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 - } - } - } - } -} +} \ No newline at end of file diff --git a/docs/swagger/swagger.yaml b/docs/swagger/swagger.yaml index 8a5da6b..f585466 100644 --- a/docs/swagger/swagger.yaml +++ b/docs/swagger/swagger.yaml @@ -31,8 +31,8 @@ definitions: visitorIp: type: string required: - - activityTypeId - - url + - activityTypeId + - url type: object request.ActivityLogsUpdateRequest: properties: @@ -47,9 +47,9 @@ definitions: userId: type: integer required: - - activityTypeId - - id - - url + - activityTypeId + - id + - url type: object request.ArticleApprovalsCreateRequest: properties: @@ -60,9 +60,9 @@ definitions: statusId: type: integer required: - - articleId - - message - - statusId + - articleId + - message + - statusId type: object request.ArticleApprovalsUpdateRequest: properties: @@ -75,10 +75,10 @@ definitions: statusId: type: integer required: - - articleId - - id - - message - - statusId + - articleId + - id + - message + - statusId type: object request.ArticleCategoriesCreateRequest: properties: @@ -99,9 +99,9 @@ definitions: title: type: string required: - - description - - statusId - - title + - description + - statusId + - title type: object request.ArticleCategoriesUpdateRequest: properties: @@ -126,10 +126,10 @@ definitions: title: type: string required: - - description - - id - - statusId - - title + - description + - id + - statusId + - title type: object request.ArticleCommentsApprovalRequest: properties: @@ -138,8 +138,8 @@ definitions: statusId: type: integer required: - - id - - statusId + - id + - statusId type: object request.ArticleCommentsCreateRequest: properties: @@ -152,8 +152,8 @@ definitions: parentId: type: integer required: - - articleId - - message + - articleId + - message type: object request.ArticleCommentsUpdateRequest: properties: @@ -168,9 +168,9 @@ definitions: parentId: type: integer required: - - articleId - - id - - message + - articleId + - id + - message type: object request.ArticleFilesUpdateRequest: properties: @@ -201,11 +201,11 @@ definitions: widthPixel: type: string required: - - articleId - - id - - isPublish - - publishedAt - - statusId + - articleId + - id + - isPublish + - publishedAt + - statusId type: object request.ArticlesCreateRequest: properties: @@ -236,13 +236,13 @@ definitions: typeId: type: integer required: - - categoryIds - - description - - htmlDescription - - slug - - tags - - title - - typeId + - categoryIds + - description + - htmlDescription + - slug + - tags + - title + - typeId type: object request.ArticlesUpdateRequest: properties: @@ -273,13 +273,13 @@ definitions: typeId: type: integer required: - - categoryIds - - description - - htmlDescription - - slug - - tags - - title - - typeId + - categoryIds + - description + - htmlDescription + - slug + - tags + - title + - typeId type: object request.CitiesCreateRequest: properties: @@ -288,8 +288,8 @@ definitions: provId: type: integer required: - - cityName - - provId + - cityName + - provId type: object request.CitiesUpdateRequest: properties: @@ -300,11 +300,11 @@ definitions: provId: type: integer required: - - cityName - - id - - provId + - cityName + - id + - provId type: object - request.ClientsCreateRequest: + request.ClientsCreateRequest: properties: createdById: type: integer @@ -322,6 +322,38 @@ definitions: required: - name type: object + request.CreateClientApprovalSettingsRequest: + properties: + approvalExemptCategories: + items: + type: integer + type: array + approvalExemptRoles: + items: + type: integer + type: array + approvalExemptUsers: + items: + type: integer + type: array + autoPublishArticles: + type: boolean + defaultWorkflowId: + minimum: 1 + type: integer + isActive: + type: boolean + requireApprovalFor: + items: + type: string + type: array + requiresApproval: + type: boolean + skipApprovalFor: + items: + type: string + type: array + type: object request.CustomStaticPagesCreateRequest: properties: description: @@ -333,9 +365,9 @@ definitions: title: type: string required: - - htmlBody - - slug - - title + - htmlBody + - slug + - title type: object request.CustomStaticPagesUpdateRequest: properties: @@ -352,10 +384,35 @@ definitions: updatedAt: type: string required: - - htmlBody - - id - - slug - - title + - htmlBody + - id + - slug + - title + type: object + request.DisableApprovalRequest: + properties: + handleAction: + description: How to handle pending articles + enum: + - auto_approve + - keep_pending + - reset_to_draft + type: string + reason: + maxLength: 500 + type: string + required: + - handleAction + - reason + type: object + request.EnableApprovalRequest: + properties: + defaultWorkflowId: + minimum: 1 + type: integer + reason: + maxLength: 500 + type: string type: object request.FeedbacksCreateRequest: properties: @@ -366,9 +423,9 @@ definitions: message: type: string required: - - commentFromEmail - - commentFromName - - message + - commentFromEmail + - commentFromName + - message type: object request.FeedbacksUpdateRequest: properties: @@ -381,10 +438,10 @@ definitions: message: type: string required: - - commentFromEmail - - commentFromName - - id - - message + - commentFromEmail + - commentFromName + - id + - message type: object request.GalleriesCreateRequest: properties: @@ -395,7 +452,7 @@ definitions: title: type: string required: - - title + - title type: object request.GalleriesUpdateRequest: properties: @@ -430,6 +487,49 @@ definitions: title: type: string type: object + request.SetDefaultWorkflowRequest: + properties: + workflowId: + minimum: 1 + type: integer + type: object + request.ToggleApprovalRequest: + properties: + requiresApproval: + type: boolean + type: object + request.UpdateClientApprovalSettingsRequest: + properties: + approvalExemptCategories: + items: + type: integer + type: array + approvalExemptRoles: + items: + type: integer + type: array + approvalExemptUsers: + items: + type: integer + type: array + autoPublishArticles: + type: boolean + defaultWorkflowId: + description: double pointer to allow nil + type: integer + isActive: + type: boolean + requireApprovalFor: + items: + type: string + type: array + requiresApproval: + type: boolean + skipApprovalFor: + items: + type: string + type: array + type: object request.UserEmailValidationRequest: properties: newEmail: @@ -453,8 +553,8 @@ definitions: isApprovalActive: type: boolean required: - - ids - - isApprovalActive + - ids + - isApprovalActive type: object request.UserLevelsCreateRequest: properties: @@ -475,9 +575,9 @@ definitions: provinceId: type: integer required: - - aliasName - - levelNumber - - name + - aliasName + - levelNumber + - name type: object request.UserLevelsUpdateRequest: properties: @@ -496,9 +596,9 @@ definitions: provinceId: type: integer required: - - aliasName - - levelNumber - - name + - aliasName + - levelNumber + - name type: object request.UserLogin: properties: @@ -516,7 +616,7 @@ definitions: name: type: string required: - - email + - email type: object request.UserOtpValidation: properties: @@ -555,13 +655,13 @@ definitions: menuId: type: integer required: - - isAdminEnabled - - isApprovalEnabled - - isDeleteEnabled - - isInsertEnabled - - isUpdateEnabled - - isViewEnabled - - menuId + - isAdminEnabled + - isApprovalEnabled + - isDeleteEnabled + - isInsertEnabled + - isUpdateEnabled + - isViewEnabled + - menuId type: object request.UserRoleAccessesUpdateRequest: properties: @@ -584,15 +684,15 @@ definitions: userRoleId: type: integer required: - - id - - isAdminEnabled - - isApprovalEnabled - - isDeleteEnabled - - isInsertEnabled - - isUpdateEnabled - - isViewEnabled - - menuId - - userRoleId + - id + - isAdminEnabled + - isApprovalEnabled + - isDeleteEnabled + - isInsertEnabled + - isUpdateEnabled + - isViewEnabled + - menuId + - userRoleId type: object request.UserRolesCreateRequest: properties: @@ -610,15 +710,15 @@ definitions: type: array userRoleAccess: items: - $ref: "#/definitions/request.UserRoleAccessesCreateRequest" + $ref: '#/definitions/request.UserRoleAccessesCreateRequest' type: array required: - - code - - description - - name - - statusId - - userLevelIds - - userRoleAccess + - code + - description + - name + - statusId + - userLevelIds + - userRoleAccess type: object request.UserRolesUpdateRequest: properties: @@ -637,12 +737,12 @@ definitions: type: integer type: array required: - - code - - description - - levelNumber - - name - - statusId - - userLevelIds + - code + - description + - levelNumber + - name + - statusId + - userLevelIds type: object request.UserSavePassword: properties: @@ -692,12 +792,12 @@ definitions: workType: type: string required: - - email - - fullname - - password - - userLevelId - - userRoleId - - username + - email + - fullname + - password + - userLevelId + - userRoleId + - username type: object request.UsersUpdateRequest: properties: @@ -740,11 +840,11 @@ definitions: workType: type: string required: - - email - - fullname - - userLevelId - - userRoleId - - username + - email + - fullname + - userLevelId + - userRoleId + - username type: object response.BadRequestError: properties: @@ -803,213 +903,213 @@ paths: get: description: API for getting all ActivityLogs parameters: - - in: query - name: activityTypeId - type: integer - - in: query - name: articleId - type: integer - - in: query - name: url - type: string - - in: query - name: userId - type: integer - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - in: query + name: activityTypeId + type: integer + - in: query + name: articleId + type: integer + - in: query + name: url + type: string + - in: query + name: userId + type: integer + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all ActivityLogs tags: - - ActivityLogs + - ActivityLogs post: description: API for create ActivityLogs parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.ActivityLogsCreateRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.ActivityLogsCreateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create ActivityLogs tags: - - ActivityLogs + - ActivityLogs /activity-logs/{id}: delete: description: API for delete ActivityLogs parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: ActivityLogs ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: ActivityLogs ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: delete ActivityLogs tags: - - ActivityLogs + - ActivityLogs put: description: API for update ActivityLogs parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.ActivityLogsUpdateRequest" - - description: ActivityLogs ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.ActivityLogsUpdateRequest' + - description: ActivityLogs ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: update ActivityLogs tags: - - ActivityLogs + - ActivityLogs /activity-logs/detail/{id}: get: description: API for getting one ActivityLogs parameters: - - description: ActivityLogs ID - in: path - name: id - required: true - type: integer + - description: ActivityLogs ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get one ActivityLogs tags: - - ActivityLogs + - ActivityLogs /activity-logs/statistics: get: description: API for get activity stats ActivityLogs @@ -1017,2294 +1117,266 @@ paths: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get activity stats ActivityLogs tags: - - ActivityLogs + - ActivityLogs /article-approvals: get: description: API for getting all ArticleApprovals parameters: - - in: query - name: approvalAtLevel - type: integer - - in: query - name: approvalBy - type: integer - - in: query - name: articleId - type: integer - - in: query - name: message - type: string - - in: query - name: statusId - type: integer - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - in: query + name: approvalAtLevel + type: integer + - in: query + name: approvalBy + type: integer + - in: query + name: articleId + type: integer + - in: query + name: message + type: string + - in: query + name: statusId + type: integer + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all ArticleApprovals tags: - - ArticleApprovals + - ArticleApprovals post: description: API for create ArticleApprovals parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.ArticleApprovalsCreateRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.ArticleApprovalsCreateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create ArticleApprovals tags: - - ArticleApprovals + - ArticleApprovals /article-approvals/{id}: delete: description: API for delete ArticleApprovals parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: ArticleApprovals ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: ArticleApprovals ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: delete ArticleApprovals tags: - - ArticleApprovals + - ArticleApprovals get: description: API for getting one ArticleApprovals parameters: - - description: ArticleApprovals ID - in: path - name: id - required: true - type: integer + - description: ArticleApprovals ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get one ArticleApprovals tags: - - ArticleApprovals + - ArticleApprovals put: description: API for update ArticleApprovals parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.ArticleApprovalsUpdateRequest" - - description: ArticleApprovals ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.ArticleApprovalsUpdateRequest' + - description: ArticleApprovals ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: update ArticleApprovals tags: - - ArticleApprovals + - ArticleApprovals /article-categories: get: description: API for getting all ArticleCategories parameters: - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - in: query - name: UserLevelId - type: integer - - in: query - name: UserLevelNumber - type: integer - - in: query - name: description - type: string - - in: query - name: isPublish - type: boolean - - in: query - name: parentId - type: integer - - in: query - name: statusId - type: integer - - in: query - name: title - type: string - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer - 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" - security: - - Bearer: [] - summary: Get all ArticleCategories - tags: - - Article Categories - post: - description: API for create ArticleCategories - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Required payload - in: body - name: payload - 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" - security: - - Bearer: [] - summary: Create ArticleCategories - tags: - - Article Categories - /article-categories/{id}: - delete: - description: API for delete ArticleCategories - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: ArticleCategories ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: delete ArticleCategories - tags: - - Article Categories - get: - description: API for getting one ArticleCategories - parameters: - - description: ArticleCategories ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Get one ArticleCategories - tags: - - Article Categories - put: - description: API for update ArticleCategories - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.ArticleCategoriesUpdateRequest" - - description: ArticleCategories ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: update ArticleCategories - tags: - - Article Categories - /article-categories/old/{id}: - get: - description: API for getting one ArticleCategories - parameters: - - description: ArticleCategories Old ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Get one ArticleCategories - tags: - - Article Categories - /article-categories/slug/{slug}: - get: - description: API for getting one ArticleCategories - parameters: - - description: ArticleCategories Slug - in: path - name: slug - required: true - 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" - security: - - Bearer: [] - summary: Get one ArticleCategories - tags: - - Article Categories - /article-categories/thumbnail/{id}: - post: - description: API for Upload ArticleCategories Thumbnail - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Upload thumbnail - in: formData - name: files - required: true - type: file - - description: ArticleCategories ID - in: path - name: id - required: true - type: integer - produces: - - application/json - 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" - security: - - Bearer: [] - summary: Upload ArticleCategories Thumbnail - tags: - - Article Categories - /article-categories/thumbnail/viewer/{id}: - get: - description: API for View Thumbnail of ArticleCategories - parameters: - - description: ArticleCategories ID - in: path - name: id - required: true - 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" - security: - - Bearer: [] - summary: Viewer ArticleCategories - tags: - - Article Categories - /article-category-details: - get: - description: API for getting 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" - security: - - Bearer: [] - summary: Get all ArticleCategoryDetails - tags: - - Untags - post: - description: API for create ArticleCategoryDetails - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - 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" - security: - - Bearer: [] - summary: Create ArticleCategoryDetails - tags: - - Untags - /article-category-details/{id}: - delete: - description: API for delete ArticleCategoryDetails - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: ArticleCategoryDetails ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: delete ArticleCategoryDetails - tags: - - Untags - get: - description: API for getting one ArticleCategoryDetails - parameters: - - description: ArticleCategoryDetails ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Get one ArticleCategoryDetails - tags: - - Untags - put: - description: API for update ArticleCategoryDetails - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: ArticleCategoryDetails ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: update ArticleCategoryDetails - tags: - - Untags - /article-comments: - get: - description: API for getting all ArticleComments - parameters: - - in: query - name: articleId - type: integer - - in: query - name: commentFrom - type: integer - - in: query - name: isPublic - type: boolean - - in: query - name: message - type: string - - in: query - name: parentId - type: integer - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer - 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" - security: - - Bearer: [] - summary: Get all ArticleComments - tags: - - ArticleComments - post: - description: API for create ArticleComments - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Required payload - in: body - name: payload - 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" - security: - - Bearer: [] - summary: Create ArticleComments - tags: - - ArticleComments - /article-comments/{id}: - delete: - description: API for delete ArticleComments - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: ArticleComments ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: delete ArticleComments - tags: - - ArticleComments - get: - description: API for getting one ArticleComments - parameters: - - description: ArticleComments ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Get one ArticleComments - tags: - - ArticleComments - put: - description: API for update ArticleComments - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.ArticleCommentsUpdateRequest" - - description: ArticleComments ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: update ArticleComments - tags: - - ArticleComments - /article-comments/approval: - post: - description: API for Approval ArticleComments - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - 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" - security: - - Bearer: [] - summary: Approval ArticleComments - tags: - - ArticleComments - /article-files: - get: - description: API for getting all ArticleFiles - parameters: - - in: query - name: articleId - type: integer - - in: query - name: fileName - type: string - - in: query - name: isPublish - type: boolean - - in: query - name: statusId - type: integer - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer - 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" - security: - - Bearer: [] - summary: Get all ArticleFiles - tags: - - Article Files - /article-files/{articleId}: - post: - description: API for create ArticleFiles - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Upload file - in: formData - name: files - required: true - type: file - - description: Article ID - in: path - name: articleId - required: true - type: integer - produces: - - application/json - 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" - security: - - Bearer: [] - summary: Upload ArticleFiles - tags: - - Article Files - /article-files/{id}: - delete: - description: API for delete ArticleFiles - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: ArticleFiles ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Delete ArticleFiles - tags: - - Article Files - get: - description: API for getting one ArticleFiles - parameters: - - description: ArticleFiles ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Get one ArticleFiles - tags: - - Article Files - put: - description: API for update ArticleFiles - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.ArticleFilesUpdateRequest" - - description: ArticleFiles ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Update ArticleFiles - tags: - - Article Files - /article-files/upload-status/{uploadId}: - get: - description: API for GetUploadStatus ArticleFiles - parameters: - - description: Upload ID of ArticleFiles - in: path - name: uploadId - required: true - 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" - security: - - Bearer: [] - summary: GetUploadStatus ArticleFiles - tags: - - Article Files - /article-files/viewer/{filename}: - get: - description: API for Viewer ArticleFiles - parameters: - - description: Article File Name - in: path - name: filename - required: true - 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" - security: - - Bearer: [] - summary: Viewer ArticleFiles - tags: - - Article Files - /articles: - get: - description: API for getting all Articles - parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - in: query - name: category - type: string - - in: query - name: categoryId - type: integer - - in: query - name: createdById - type: integer - - in: query - name: description - type: string - - in: query - name: isBanner - type: boolean - - in: query - name: isDraft - type: boolean - - in: query - name: isPublish - type: boolean - - in: query - name: statusId - type: integer - - in: query - name: tags - type: string - - in: query - name: title - type: string - - in: query - name: typeId - type: integer - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer - 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" - security: - - Bearer: [] - summary: Get all Articles - tags: - - Articles - post: - description: API for create Articles - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Required payload - in: body - name: payload - 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" - security: - - Bearer: [] - summary: Create Articles - tags: - - Articles - /articles/{id}: - delete: - description: API for delete Articles - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Articles ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Delete Articles - tags: - - Articles - get: - description: API for getting one Articles - parameters: - - description: Articles ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Get one Articles - tags: - - Articles - put: - description: API for update Articles - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.ArticlesUpdateRequest" - - description: Articles ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Update Articles - tags: - - Articles - /articles/banner/{id}: - put: - description: API for Update Banner Articles - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Articles ID - in: path - name: id - required: true - type: integer - - description: Articles Banner Status - in: query - name: isBanner - required: true - type: boolean - 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" - security: - - Bearer: [] - summary: Update Banner Articles - tags: - - Articles - /articles/old-id/{id}: - get: - description: API for getting one Articles - parameters: - - description: Articles Old ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Get one Articles - tags: - - Articles - /articles/publish-scheduling: - post: - description: API for Publish Schedule of Article - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: article id - in: query - name: id - type: integer - - description: publish date - in: query - name: date - 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" - security: - - Bearer: [] - summary: PublishScheduling Articles - tags: - - Articles - /articles/statistic/monthly: - get: - description: API for ArticleMonthlyStats of Article - parameters: - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: year - in: query - name: year - type: integer - 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" - security: - - Bearer: [] - summary: ArticleMonthlyStats Articles - tags: - - Articles - /articles/statistic/summary: - get: - description: API for Summary Stats of Article - parameters: - - default: Bearer - description: Insert your access token - in: header - name: Authorization - 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" - security: - - Bearer: [] - summary: SummaryStats Articles - tags: - - Articles - /articles/statistic/user-levels: - get: - description: API for ArticlePerUserLevelStats of Article - parameters: - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: start date - in: query - name: startDate - type: string - - description: start date - in: query - name: endDate - 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" - security: - - Bearer: [] - summary: ArticlePerUserLevelStats Articles - tags: - - Articles - /articles/thumbnail/{id}: - post: - description: API for Save Thumbnail of Articles - parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Upload thumbnail - in: formData - name: files - required: true - type: file - - description: Articles ID - in: path - name: id - required: true - type: integer - produces: - - application/json - 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" - security: - - Bearer: [] - summary: Save Thumbnail Articles - tags: - - Articles - /articles/thumbnail/viewer/{thumbnailName}: - get: - description: API for View Thumbnail of Article - parameters: - - description: Articles Thumbnail Name - in: path - name: thumbnailName - required: true - 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" - security: - - Bearer: [] - summary: Viewer Articles Thumbnail - tags: - - Articles - /banners: - get: - description: API for getting all Banners - parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - in: query - name: position - type: string - - in: query - name: status - type: string - - in: query - name: title - type: string - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer - 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" - security: - - Bearer: [] - summary: Get all Banners - tags: - - Banners - post: - description: API for creating Banner with file upload - parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Upload file - in: formData - name: file - type: file - - description: Banner title - in: formData - name: title - required: true - type: string - - description: Banner description - in: formData - name: description - type: string - - description: Banner position - in: formData - name: position - type: string - - description: Banner status - in: formData - name: status - 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" - security: - - Bearer: [] - summary: Create Banner - tags: - - Banners - /banners/{id}: - delete: - description: API for deleting Banner (soft delete) - parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Banner ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Delete Banner - tags: - - Banners - get: - description: API for getting Banner by ID - parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Banner ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Get Banner by ID - tags: - - Banners - put: - description: API for updating Banner with file upload - parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Banner ID - in: path - name: id - required: true - type: integer - - description: Upload file - in: formData - name: file - type: file - - description: Banner title - in: formData - name: title - type: string - - description: Banner description - in: formData - name: description - type: string - - description: Banner position - in: formData - name: position - type: string - - description: Banner status - in: formData - name: status - type: string - - description: Banner is_active - in: formData - name: is_active - type: boolean - 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" - security: - - Bearer: [] - summary: Update Banner - tags: - - Banners - /banners/viewer/{filename}: - get: - description: API for viewing Banner file - parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Banner File Name (e.g., user_277788.png) - in: path - name: filename - required: true - type: string - 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" - security: - - Bearer: [] - summary: Viewer Banner - tags: - - Banners - /cities: - get: - description: API for getting 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" - security: - - Bearer: [] - summary: Get all Cities - tags: - - Cities - post: - description: API for create Cities - parameters: - - description: Required payload - in: body - name: payload - 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" - security: - - Bearer: [] - summary: Create Cities - tags: - - Cities - /cities/{id}: - delete: - description: API for delete Cities - parameters: - - description: Cities ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Delete Cities - tags: - - Cities - get: - description: API for getting one Cities - parameters: - - description: Cities ID - in: path - name: id - required: true - type: integer - 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" - security: - - Bearer: [] - summary: Get one Cities - tags: - - Cities - put: - consumes: - - application/json - description: API for update Cities - parameters: - - description: Cities ID - in: path - name: id - required: true - type: integer - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.CitiesUpdateRequest" - produces: - - application/json - 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" - security: - - Bearer: [] - summary: Update Cities - tags: - - Cities - - get: - description: API for getting all Clients - parameters: + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string - in: query - name: createdBy + name: UserLevelId type: integer - in: query - name: name + name: UserLevelNumber + type: integer + - in: query + name: description + type: string + - in: query + name: isPublish + type: boolean + - in: query + name: parentId + type: integer + - in: query + name: statusId + type: integer + - in: query + name: title type: string - in: query name: count @@ -3349,12 +1421,17 @@ paths: $ref: '#/definitions/response.InternalServerError' security: - Bearer: [] - summary: Get all Clients + summary: Get all ArticleCategories tags: - - Clients + - Article Categories post: - description: API for create Clients + description: API for create ArticleCategories parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string - default: Bearer description: Insert your access token in: header @@ -3365,7 +1442,7 @@ paths: name: payload required: true schema: - $ref: '#/definitions/request.ClientsCreateRequest' + $ref: '#/definitions/request.ArticleCategoriesCreateRequest' responses: "200": description: OK @@ -3385,9 +1462,2380 @@ paths: $ref: '#/definitions/response.InternalServerError' security: - Bearer: [] - summary: Create Clients + summary: Create ArticleCategories tags: - - Clients + - Article Categories + /article-categories/{id}: + delete: + description: API for delete ArticleCategories + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: ArticleCategories ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: delete ArticleCategories + tags: + - Article Categories + get: + description: API for getting one ArticleCategories + parameters: + - description: ArticleCategories ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Get one ArticleCategories + tags: + - Article Categories + put: + description: API for update ArticleCategories + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.ArticleCategoriesUpdateRequest' + - description: ArticleCategories ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: update ArticleCategories + tags: + - Article Categories + /article-categories/old/{id}: + get: + description: API for getting one ArticleCategories + parameters: + - description: ArticleCategories Old ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Get one ArticleCategories + tags: + - Article Categories + /article-categories/slug/{slug}: + get: + description: API for getting one ArticleCategories + parameters: + - description: ArticleCategories Slug + in: path + name: slug + required: true + 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' + security: + - Bearer: [] + summary: Get one ArticleCategories + tags: + - Article Categories + /article-categories/thumbnail/{id}: + post: + description: API for Upload ArticleCategories Thumbnail + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Upload thumbnail + in: formData + name: files + required: true + type: file + - description: ArticleCategories ID + in: path + name: id + required: true + type: integer + produces: + - application/json + 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' + security: + - Bearer: [] + summary: Upload ArticleCategories Thumbnail + tags: + - Article Categories + /article-categories/thumbnail/viewer/{id}: + get: + description: API for View Thumbnail of ArticleCategories + parameters: + - description: ArticleCategories ID + in: path + name: id + required: true + 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' + security: + - Bearer: [] + summary: Viewer ArticleCategories + tags: + - Article Categories + /article-category-details: + get: + description: API for getting 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' + security: + - Bearer: [] + summary: Get all ArticleCategoryDetails + tags: + - Untags + post: + description: API for create ArticleCategoryDetails + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + 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' + security: + - Bearer: [] + summary: Create ArticleCategoryDetails + tags: + - Untags + /article-category-details/{id}: + delete: + description: API for delete ArticleCategoryDetails + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: ArticleCategoryDetails ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: delete ArticleCategoryDetails + tags: + - Untags + get: + description: API for getting one ArticleCategoryDetails + parameters: + - description: ArticleCategoryDetails ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Get one ArticleCategoryDetails + tags: + - Untags + put: + description: API for update ArticleCategoryDetails + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: ArticleCategoryDetails ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: update ArticleCategoryDetails + tags: + - Untags + /article-comments: + get: + description: API for getting all ArticleComments + parameters: + - in: query + name: articleId + type: integer + - in: query + name: commentFrom + type: integer + - in: query + name: isPublic + type: boolean + - in: query + name: message + type: string + - in: query + name: parentId + type: integer + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer + 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' + security: + - Bearer: [] + summary: Get all ArticleComments + tags: + - ArticleComments + post: + description: API for create ArticleComments + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: Required payload + in: body + name: payload + 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' + security: + - Bearer: [] + summary: Create ArticleComments + tags: + - ArticleComments + /article-comments/{id}: + delete: + description: API for delete ArticleComments + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: ArticleComments ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: delete ArticleComments + tags: + - ArticleComments + get: + description: API for getting one ArticleComments + parameters: + - description: ArticleComments ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Get one ArticleComments + tags: + - ArticleComments + put: + description: API for update ArticleComments + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.ArticleCommentsUpdateRequest' + - description: ArticleComments ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: update ArticleComments + tags: + - ArticleComments + /article-comments/approval: + post: + description: API for Approval ArticleComments + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + 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' + security: + - Bearer: [] + summary: Approval ArticleComments + tags: + - ArticleComments + /article-files: + get: + description: API for getting all ArticleFiles + parameters: + - in: query + name: articleId + type: integer + - in: query + name: fileName + type: string + - in: query + name: isPublish + type: boolean + - in: query + name: statusId + type: integer + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer + 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' + security: + - Bearer: [] + summary: Get all ArticleFiles + tags: + - Article Files + /article-files/{articleId}: + post: + description: API for create ArticleFiles + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Upload file + in: formData + name: files + required: true + type: file + - description: Article ID + in: path + name: articleId + required: true + type: integer + produces: + - application/json + 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' + security: + - Bearer: [] + summary: Upload ArticleFiles + tags: + - Article Files + /article-files/{id}: + delete: + description: API for delete ArticleFiles + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: ArticleFiles ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Delete ArticleFiles + tags: + - Article Files + get: + description: API for getting one ArticleFiles + parameters: + - description: ArticleFiles ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Get one ArticleFiles + tags: + - Article Files + put: + description: API for update ArticleFiles + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.ArticleFilesUpdateRequest' + - description: ArticleFiles ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Update ArticleFiles + tags: + - Article Files + /article-files/upload-status/{uploadId}: + get: + description: API for GetUploadStatus ArticleFiles + parameters: + - description: Upload ID of ArticleFiles + in: path + name: uploadId + required: true + 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' + security: + - Bearer: [] + summary: GetUploadStatus ArticleFiles + tags: + - Article Files + /article-files/viewer/{filename}: + get: + description: API for Viewer ArticleFiles + parameters: + - description: Article File Name + in: path + name: filename + required: true + 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' + security: + - Bearer: [] + summary: Viewer ArticleFiles + tags: + - Article Files + /articles: + get: + description: API for getting all Articles + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - in: query + name: category + type: string + - in: query + name: categoryId + type: integer + - in: query + name: createdById + type: integer + - in: query + name: description + type: string + - in: query + name: isBanner + type: boolean + - in: query + name: isDraft + type: boolean + - in: query + name: isPublish + type: boolean + - in: query + name: statusId + type: integer + - in: query + name: tags + type: string + - in: query + name: title + type: string + - in: query + name: typeId + type: integer + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer + 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' + security: + - Bearer: [] + summary: Get all Articles + tags: + - Articles + post: + description: API for create Articles + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: Required payload + in: body + name: payload + 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' + security: + - Bearer: [] + summary: Create Articles + tags: + - Articles + /articles/{id}: + delete: + description: API for delete Articles + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Articles ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Delete Articles + tags: + - Articles + get: + description: API for getting one Articles + parameters: + - description: Articles ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Get one Articles + tags: + - Articles + put: + description: API for update Articles + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.ArticlesUpdateRequest' + - description: Articles ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Update Articles + tags: + - Articles + /articles/banner/{id}: + put: + description: API for Update Banner Articles + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Articles ID + in: path + name: id + required: true + type: integer + - description: Articles Banner Status + in: query + name: isBanner + required: true + type: boolean + 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' + security: + - Bearer: [] + summary: Update Banner Articles + tags: + - Articles + /articles/old-id/{id}: + get: + description: API for getting one Articles + parameters: + - description: Articles Old ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Get one Articles + tags: + - Articles + /articles/publish-scheduling: + post: + description: API for Publish Schedule of Article + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: article id + in: query + name: id + type: integer + - description: publish date + in: query + name: date + 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' + security: + - Bearer: [] + summary: PublishScheduling Articles + tags: + - Articles + /articles/statistic/monthly: + get: + description: API for ArticleMonthlyStats of Article + parameters: + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: year + in: query + name: year + type: integer + 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' + security: + - Bearer: [] + summary: ArticleMonthlyStats Articles + tags: + - Articles + /articles/statistic/summary: + get: + description: API for Summary Stats of Article + parameters: + - default: Bearer + description: Insert your access token + in: header + name: Authorization + 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' + security: + - Bearer: [] + summary: SummaryStats Articles + tags: + - Articles + /articles/statistic/user-levels: + get: + description: API for ArticlePerUserLevelStats of Article + parameters: + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: start date + in: query + name: startDate + type: string + - description: start date + in: query + name: endDate + 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' + security: + - Bearer: [] + summary: ArticlePerUserLevelStats Articles + tags: + - Articles + /articles/thumbnail/{id}: + post: + description: API for Save Thumbnail of Articles + parameters: + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Upload thumbnail + in: formData + name: files + required: true + type: file + - description: Articles ID + in: path + name: id + required: true + type: integer + produces: + - application/json + 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' + security: + - Bearer: [] + summary: Save Thumbnail Articles + tags: + - Articles + /articles/thumbnail/viewer/{thumbnailName}: + get: + description: API for View Thumbnail of Article + parameters: + - description: Articles Thumbnail Name + in: path + name: thumbnailName + required: true + 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' + security: + - Bearer: [] + summary: Viewer Articles Thumbnail + tags: + - Articles + /banners: + get: + description: API for getting all Banners + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - in: query + name: position + type: string + - in: query + name: status + type: string + - in: query + name: title + type: string + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer + 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' + security: + - Bearer: [] + summary: Get all Banners + tags: + - Banners + post: + description: API for creating Banner with file upload + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Upload file + in: formData + name: file + type: file + - description: Banner title + in: formData + name: title + required: true + type: string + - description: Banner description + in: formData + name: description + type: string + - description: Banner position + in: formData + name: position + type: string + - description: Banner status + in: formData + name: status + 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' + security: + - Bearer: [] + summary: Create Banner + tags: + - Banners + /banners/{id}: + delete: + description: API for deleting Banner (soft delete) + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Banner ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Delete Banner + tags: + - Banners + get: + description: API for getting Banner by ID + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Banner ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Get Banner by ID + tags: + - Banners + put: + description: API for updating Banner with file upload + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Banner ID + in: path + name: id + required: true + type: integer + - description: Upload file + in: formData + name: file + type: file + - description: Banner title + in: formData + name: title + type: string + - description: Banner description + in: formData + name: description + type: string + - description: Banner position + in: formData + name: position + type: string + - description: Banner status + in: formData + name: status + type: string + - description: Banner is_active + in: formData + name: is_active + type: boolean + 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' + security: + - Bearer: [] + summary: Update Banner + tags: + - Banners + /banners/{id}/approve: + put: + description: API for approving Banner (only for admin with roleId = 1) + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Banner ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Approve Banner + tags: + - Banners + /banners/viewer/{filename}: + get: + description: API for viewing Banner file + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Banner File Name (e.g., user_277788.png) + in: path + name: filename + required: true + type: string + 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' + security: + - Bearer: [] + summary: Viewer Banner + tags: + - Banners + /cities: + get: + description: API for getting 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' + security: + - Bearer: [] + summary: Get all Cities + tags: + - Untags + post: + description: API for create Cities + parameters: + - description: Required payload + in: body + name: payload + 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' + security: + - Bearer: [] + summary: Create Cities + tags: + - Untags + /cities/{id}: + delete: + description: API for delete Cities + parameters: + - description: Cities ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Delete Cities + tags: + - Untags + get: + description: API for getting one Cities + parameters: + - description: Cities ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Get one Cities + tags: + - Untags + put: + consumes: + - application/json + description: API for update Cities + parameters: + - description: Cities ID + in: path + name: id + required: true + type: integer + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.CitiesUpdateRequest' + produces: + - application/json + 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' + security: + - Bearer: [] + summary: Update Cities + tags: + - Untags + /client-approval-settings: + delete: + description: API for deleting client approval settings + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + 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' + security: + - Bearer: [] + summary: Delete Client Approval Settings + tags: + - ClientApprovalSettings + get: + description: API for getting client approval settings + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + 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' + security: + - Bearer: [] + summary: Get Client Approval Settings + tags: + - ClientApprovalSettings + post: + description: API for creating client approval settings + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Required payload + in: body + name: payload + 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' + security: + - Bearer: [] + summary: Create Client Approval Settings + tags: + - ClientApprovalSettings + put: + description: API for updating client approval settings + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Required payload + in: body + name: payload + 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' + security: + - Bearer: [] + summary: Update Client Approval Settings + tags: + - ClientApprovalSettings + /client-approval-settings/default-workflow: + post: + description: API for setting default workflow for client + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Required payload + in: body + name: payload + 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' + security: + - Bearer: [] + summary: Set Default Workflow + tags: + - ClientApprovalSettings + /client-approval-settings/disable: + post: + description: API for disabling approval system and auto-publish pending articles + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Required payload + in: body + name: payload + 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' + security: + - Bearer: [] + summary: Disable Approval System + tags: + - ClientApprovalSettings + /client-approval-settings/enable: + post: + description: API for enabling approval system with smooth transition + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Required payload + in: body + name: payload + 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' + security: + - Bearer: [] + summary: Enable Approval System + tags: + - ClientApprovalSettings + /client-approval-settings/exempt-categories/{action}/{category_id}: + post: + description: API for adding/removing categories from approval exemption + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: 'Action: add or remove' + in: path + name: action + required: true + type: string + - description: Category ID + in: path + name: category_id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Manage Exempt Categories + tags: + - ClientApprovalSettings + /client-approval-settings/exempt-roles/{action}/{role_id}: + post: + description: API for adding/removing roles from approval exemption + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: 'Action: add or remove' + in: path + name: action + required: true + type: string + - description: Role ID + in: path + name: role_id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Manage Exempt Roles + tags: + - ClientApprovalSettings + /client-approval-settings/exempt-users/{action}/{user_id}: + post: + description: API for adding/removing users from approval exemption + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: 'Action: add or remove' + in: path + name: action + required: true + type: string + - description: User ID + in: path + name: user_id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Manage Exempt Users + tags: + - ClientApprovalSettings + /client-approval-settings/toggle: + post: + description: API for toggling approval requirement on/off + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Required payload + in: body + name: payload + 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' + security: + - Bearer: [] + summary: Toggle Approval Requirement + tags: + - ClientApprovalSettings /clients: get: description: API for getting all Clients @@ -3581,238 +4029,238 @@ paths: get: description: API for getting all CustomStaticPages parameters: - - in: query - name: description - type: string - - in: query - name: htmlBody - type: string - - in: query - name: slug - type: string - - in: query - name: title - type: string - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - in: query + name: description + type: string + - in: query + name: htmlBody + type: string + - in: query + name: slug + type: string + - in: query + name: title + type: string + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all CustomStaticPages tags: - - CustomStaticPages + - CustomStaticPages post: description: API for create CustomStaticPages parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.CustomStaticPagesCreateRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.CustomStaticPagesCreateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create CustomStaticPages tags: - - CustomStaticPages + - CustomStaticPages /custom-static-pages/{id}: delete: description: API for delete CustomStaticPages parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: CustomStaticPages ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: CustomStaticPages ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: delete CustomStaticPages tags: - - CustomStaticPages + - CustomStaticPages get: description: API for getting one CustomStaticPages parameters: - - description: CustomStaticPages ID - in: path - name: id - required: true - type: integer + - description: CustomStaticPages ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get one CustomStaticPages tags: - - CustomStaticPages + - CustomStaticPages put: description: API for update CustomStaticPages parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.CustomStaticPagesUpdateRequest" - - description: CustomStaticPages ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.CustomStaticPagesUpdateRequest' + - description: CustomStaticPages ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: update CustomStaticPages tags: - - CustomStaticPages + - CustomStaticPages /custom-static-pages/slug/{slug}: get: description: API for getting one CustomStaticPages parameters: - - description: CustomStaticPages Slug - in: path - name: slug - required: true - type: string + - description: CustomStaticPages Slug + in: path + name: slug + required: true + type: string responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get one CustomStaticPages tags: - - CustomStaticPages + - CustomStaticPages /districts: get: description: API for getting all Districts @@ -3820,856 +4268,892 @@ paths: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Get all Districts tags: - - Untags + - Untags post: description: API for create Districts responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Create Districts tags: - - Untags + - Untags /districts/{id}: delete: description: API for delete Districts parameters: - - description: Districts ID - in: path - name: id - required: true - type: integer + - description: Districts ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Delete Districts tags: - - Untags + - Untags get: description: API for getting one Districts parameters: - - description: Districts ID - in: path - name: id - required: true - type: integer + - description: Districts ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Get one Districts tags: - - Untags + - Untags put: description: API for update Districts parameters: - - description: Districts ID - in: path - name: id - required: true - type: integer + - description: Districts ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Update Districts tags: - - Untags + - Untags /feedbacks: get: description: API for getting all Feedbacks parameters: - - in: query - name: commentFromEmail - type: string - - in: query - name: commentFromName - type: string - - in: query - name: endDate - type: string - - in: query - name: message - type: string - - in: query - name: startDate - type: string - - in: query - name: statusId - type: integer - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - in: query + name: commentFromEmail + type: string + - in: query + name: commentFromName + type: string + - in: query + name: endDate + type: string + - in: query + name: message + type: string + - in: query + name: startDate + type: string + - in: query + name: statusId + type: integer + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all Feedbacks tags: - - Feedbacks + - Feedbacks post: description: API for create Feedbacks parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.FeedbacksCreateRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.FeedbacksCreateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create Feedbacks tags: - - Feedbacks + - Feedbacks /feedbacks/{id}: delete: description: API for delete Feedbacks parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Feedbacks ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Feedbacks ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: delete Feedbacks tags: - - Feedbacks + - Feedbacks get: description: API for getting one Feedbacks parameters: - - description: Feedbacks ID - in: path - name: id - required: true - type: integer + - description: Feedbacks ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get one Feedbacks tags: - - Feedbacks + - Feedbacks put: description: API for update Feedbacks parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.FeedbacksUpdateRequest" - - description: Feedbacks ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.FeedbacksUpdateRequest' + - description: Feedbacks ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: update Feedbacks tags: - - Feedbacks + - Feedbacks /feedbacks/statistic/monthly: get: description: API for FeedbackMonthlyStats of Feedbacks parameters: - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: year - in: query - name: year - type: integer + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: year + in: query + name: year + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: FeedbackMonthlyStats Feedbacks tags: - - Feedbacks + - Feedbacks /galleries: get: description: API for getting all Galleries parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - in: query - name: title - type: string - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - in: query + name: title + type: string + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all Galleries tags: - - Galleries + - Galleries post: description: API for creating Gallery parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.GalleriesCreateRequest" + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.GalleriesCreateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create Gallery tags: - - Galleries + - Galleries /galleries/{id}: delete: description: API for deleting Gallery (soft delete) parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Gallery ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Gallery ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Delete Gallery tags: - - Galleries + - Galleries get: description: API for getting Gallery by ID parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Gallery ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Gallery ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get Gallery by ID tags: - - Galleries + - Galleries put: description: API for updating Gallery parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Gallery ID - in: path - name: id - required: true - type: integer - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.GalleriesUpdateRequest" + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Gallery ID + in: path + name: id + required: true + type: integer + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.GalleriesUpdateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Update Gallery tags: - - Galleries + - Galleries + /galleries/{id}/approve: + put: + description: API for approving Gallery (only for admin with roleId = 1) + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Gallery ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Approve Gallery + tags: + - Galleries /gallery-files: get: description: API for getting all GalleryFiles parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - in: query - name: gallery_id - type: string - - in: query - name: title - type: string - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - in: query + name: gallery_id + type: string + - in: query + name: title + type: string + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all GalleryFiles tags: - - GalleryFiles + - GalleryFiles post: description: API for creating GalleryFile with file upload parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Upload file - in: formData - name: file - type: file - - description: Gallery ID - in: formData - name: gallery_id - required: true - type: integer - - description: Gallery file title - in: formData - name: title - type: string + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Upload file + in: formData + name: file + type: file + - description: Gallery ID + in: formData + name: gallery_id + required: true + type: integer + - description: Gallery file title + in: formData + name: title + type: string responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create GalleryFile tags: - - GalleryFiles + - GalleryFiles /gallery-files/{id}: delete: description: API for deleting GalleryFile (soft delete) parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: GalleryFile ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: GalleryFile ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Delete GalleryFile tags: - - GalleryFiles + - GalleryFiles get: description: API for getting GalleryFile by ID parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: GalleryFile ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: GalleryFile ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get GalleryFile by ID tags: - - GalleryFiles + - GalleryFiles put: description: API for updating GalleryFile with file upload parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: GalleryFile ID - in: path - name: id - required: true - type: integer - - description: Upload file - in: formData - name: file - type: file - - description: Gallery ID - in: formData - name: gallery_id - type: integer - - description: Gallery file title - in: formData - name: title - type: string - - description: Is active - in: formData - name: is_active - type: boolean + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: GalleryFile ID + in: path + name: id + required: true + type: integer + - description: Upload file + in: formData + name: file + type: file + - description: Gallery ID + in: formData + name: gallery_id + type: integer + - description: Gallery file title + in: formData + name: title + type: string + - description: Is active + in: formData + name: is_active + type: boolean responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Update GalleryFile tags: - - GalleryFiles + - GalleryFiles /gallery-files/viewer/{filename}: get: description: API for viewing GalleryFile file parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Gallery File Name (e.g., user_277788.png) - in: path - name: filename - required: true - type: string + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Gallery File Name (e.g., user_277788.png) + in: path + name: filename + required: true + type: string responses: "200": description: OK @@ -4678,251 +5162,251 @@ paths: "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Viewer GalleryFile tags: - - GalleryFiles + - GalleryFiles /product-specifications: get: description: API for getting all ProductSpecifications parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - in: query - name: product_id - type: string - - in: query - name: title - type: string - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - in: query + name: product_id + type: string + - in: query + name: title + type: string + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all ProductSpecifications tags: - - ProductSpecifications + - ProductSpecifications post: description: API for creating ProductSpecification with file upload parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Upload file - in: formData - name: file - type: file - - description: Product ID - in: formData - name: product_id - required: true - type: integer - - description: Product specification title - in: formData - name: title - required: true - type: string + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Upload file + in: formData + name: file + type: file + - description: Product ID + in: formData + name: product_id + required: true + type: integer + - description: Product specification title + in: formData + name: title + required: true + type: string responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create ProductSpecification tags: - - ProductSpecifications + - ProductSpecifications /product-specifications/{id}: delete: description: API for deleting ProductSpecification (soft delete) parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: ProductSpecification ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: ProductSpecification ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Delete ProductSpecification tags: - - ProductSpecifications + - ProductSpecifications get: description: API for getting ProductSpecification by ID parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: ProductSpecification ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: ProductSpecification ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get ProductSpecification by ID tags: - - ProductSpecifications + - ProductSpecifications put: description: API for updating ProductSpecification parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: ProductSpecification ID - in: path - name: id - required: true - type: integer - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.ProductSpecificationsUpdateRequest" + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: ProductSpecification ID + in: path + name: id + required: true + type: integer + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.ProductSpecificationsUpdateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Update ProductSpecification tags: - - ProductSpecifications + - ProductSpecifications /product-specifications/viewer/{filename}: get: description: API for viewing ProductSpecification file parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Product Specification File Name (e.g., user_277788.png) - in: path - name: filename - required: true - type: string + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Product Specification File Name (e.g., user_277788.png) + in: path + name: filename + required: true + type: string responses: "200": description: OK @@ -4931,287 +5415,315 @@ paths: "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Viewer ProductSpecification tags: - - ProductSpecifications + - ProductSpecifications /products: get: description: API for getting all Products parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - in: query - name: title - type: string - - in: query - name: variant - type: string - - in: query - name: status - type: string - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - in: query + name: status + type: string + - in: query + name: title + type: string + - in: query + name: variant + type: string + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all Products tags: - - Products + - Products post: description: API for creating Product with file upload parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Upload file - in: formData - name: file - type: file - - description: Product title - in: formData - name: title - required: true - type: string - - description: Product variant - in: formData - name: variant - type: string - - description: Product price - in: formData - name: price - type: string - - description: Product colors (JSON array) - in: formData - name: colors - type: string - - description: Product status - in: formData - name: status - type: string + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Upload file + in: formData + name: file + type: file + - description: Product title + in: formData + name: title + required: true + type: string + - description: Product variant + in: formData + name: variant + type: string + - description: Product price + in: formData + name: price + type: string + - description: Product colors (JSON array) + in: formData + name: colors + type: string responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create Product tags: - - Products + - Products /products/{id}: delete: description: API for deleting Product (soft delete) parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Product ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Product ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Delete Product tags: - - Products + - Products get: description: API for getting Product by ID parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Product ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Product ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get Product by ID tags: - - Products + - Products put: description: API for updating Product with file upload parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Product ID - in: path - name: id - required: true - type: integer - - description: Upload file - in: formData - name: file - type: file - - description: Product title - in: formData - name: title - type: string - - description: Product variant - in: formData - name: variant - type: string - - description: Product price - in: formData - name: price - type: string - - description: Product colors (JSON array) - in: formData - name: colors - type: string - - description: Product is_active - in: formData - name: is_active - type: boolean - - description: Product status - in: formData - name: status - type: string + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Product ID + in: path + name: id + required: true + type: integer + - description: Upload file + in: formData + name: file + type: file + - description: Product title + in: formData + name: title + type: string + - description: Product variant + in: formData + name: variant + type: string + - description: Product price + in: formData + name: price + type: string + - description: Product colors (JSON array) + in: formData + name: colors + type: string + - description: Product is_active + in: formData + name: is_active + type: boolean responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Update Product tags: - - Products + - Products + /products/{id}/approve: + put: + description: API for approving Product (only for admin with roleId = 1) + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Product ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Approve Product + tags: + - Products /products/viewer/{filename}: get: description: API for viewing Product file parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Product File Name (e.g., user_277788.png) - in: path - name: filename - required: true - type: string + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Product File Name (e.g., user_277788.png) + in: path + name: filename + required: true + type: string responses: "200": description: OK @@ -5220,247 +5732,283 @@ paths: "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Viewer Product tags: - - Products + - Products /promotions: get: description: API for getting all Promotions parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - in: query - name: title - type: string - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - in: query + name: title + type: string + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all Promotions tags: - - Promotions + - Promotions post: description: API for creating Promotion with file upload parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Upload file - in: formData - name: file - type: file - - description: Promotion title - in: formData - name: title - required: true - type: string - - description: Promotion description - in: formData - name: description - type: string + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Upload file + in: formData + name: file + type: file + - description: Promotion title + in: formData + name: title + required: true + type: string + - description: Promotion description + in: formData + name: description + type: string responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create Promotion tags: - - Promotions + - Promotions /promotions/{id}: delete: description: API for deleting Promotion (soft delete) parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Promotion ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Promotion ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Delete Promotion tags: - - Promotions + - Promotions get: description: API for getting Promotion by ID parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Promotion ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Promotion ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get Promotion by ID tags: - - Promotions + - Promotions put: description: API for updating Promotion parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Promotion ID - in: path - name: id - required: true - type: integer - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.PromotionsUpdateRequest" + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Promotion ID + in: path + name: id + required: true + type: integer + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.PromotionsUpdateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Update Promotion tags: - - Promotions + - Promotions + /promotions/{id}/approve: + put: + description: API for approving Promotion (only for admin with roleId = 1) + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Promotion ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Approve Promotion + tags: + - Promotions /promotions/viewer/{filename}: get: description: API for viewing Promotion file parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Promotion File Name (e.g., user_277788.png) - in: path - name: filename - required: true - type: string + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Promotion File Name (e.g., user_277788.png) + in: path + name: filename + required: true + type: string responses: "200": description: OK @@ -5469,20 +6017,20 @@ paths: "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Viewer Promotion tags: - - Promotions + - Promotions /provinces: get: description: API for getting all Provinces @@ -5490,418 +6038,454 @@ paths: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Get all Provinces tags: - - Untags + - Untags post: description: API for create Provinces responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Create Provinces tags: - - Untags + - Untags /provinces/{id}: delete: description: API for delete Provinces parameters: - - description: Provinces ID - in: path - name: id - required: true - type: integer + - description: Provinces ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Delete Provinces tags: - - Untags + - Untags get: description: API for getting one Provinces parameters: - - description: Provinces ID - in: path - name: id - required: true - type: integer + - description: Provinces ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Get one Provinces tags: - - Untags + - Untags put: description: API for update Provinces parameters: - - description: Provinces ID - in: path - name: id - required: true - type: integer + - description: Provinces ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Update Provinces tags: - - Untags + - Untags /sales-agents: get: description: API for getting all SalesAgents parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - in: query - name: agent_type - type: string - - in: query - name: job_title - type: string - - in: query - name: name - type: string - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - in: query + name: agent_type + type: string + - in: query + name: job_title + type: string + - in: query + name: name + type: string + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all SalesAgents tags: - - SalesAgents + - SalesAgents post: description: API for creating SalesAgent with file upload parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: Upload file - in: formData - name: file - type: file - - description: SalesAgent name - in: formData - name: name - required: true - type: string - - description: SalesAgent job title - in: formData - name: job_title - type: string - - description: SalesAgent phone - in: formData - name: phone - type: string - - description: SalesAgent agent type (JSON array) - in: formData - name: agent_type - type: string + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: Upload file + in: formData + name: file + type: file + - description: SalesAgent name + in: formData + name: name + required: true + type: string + - description: SalesAgent job title + in: formData + name: job_title + type: string + - description: SalesAgent phone + in: formData + name: phone + type: string + - description: SalesAgent agent type (JSON array) + in: formData + name: agent_type + type: string responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create SalesAgent tags: - - SalesAgents + - SalesAgents /sales-agents/{id}: delete: description: API for deleting SalesAgent (soft delete) parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: SalesAgent ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: SalesAgent ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Delete SalesAgent tags: - - SalesAgents + - SalesAgents get: description: API for getting SalesAgent by ID parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: SalesAgent ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: SalesAgent ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get SalesAgent by ID tags: - - SalesAgents + - SalesAgents put: description: API for updating SalesAgent with file upload parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: SalesAgent ID - in: path - name: id - required: true - type: integer - - description: Upload file - in: formData - name: file - type: file - - description: SalesAgent name - in: formData - name: name - type: string - - description: SalesAgent job title - in: formData - name: job_title - type: string - - description: SalesAgent phone - in: formData - name: phone - type: string - - description: SalesAgent agent type (JSON array) - in: formData - name: agent_type - type: string - - description: SalesAgent is_active - in: formData - name: is_active - type: boolean + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: SalesAgent ID + in: path + name: id + required: true + type: integer + - description: Upload file + in: formData + name: file + type: file + - description: SalesAgent name + in: formData + name: name + type: string + - description: SalesAgent job title + in: formData + name: job_title + type: string + - description: SalesAgent phone + in: formData + name: phone + type: string + - description: SalesAgent agent type (JSON array) + in: formData + name: agent_type + type: string + - description: SalesAgent is_active + in: formData + name: is_active + type: boolean responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Update SalesAgent tags: - - SalesAgents + - SalesAgents + /sales-agents/{id}/approve: + put: + description: API for approving SalesAgent (only for admin with roleId = 1) + parameters: + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: SalesAgent ID + in: path + name: id + required: true + type: integer + 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' + security: + - Bearer: [] + summary: Approve SalesAgent + tags: + - SalesAgents /sales-agents/viewer/{filename}: get: description: API for viewing SalesAgent profile picture file parameters: - - description: Insert the X-Client-Key - in: header - name: X-Client-Key - required: true - type: string - - description: SalesAgent File Name (e.g., user_277788.png) - in: path - name: filename - required: true - type: string + - description: Insert the X-Client-Key + in: header + name: X-Client-Key + required: true + type: string + - description: SalesAgent File Name (e.g., user_277788.png) + in: path + name: filename + required: true + type: string responses: "200": description: OK @@ -5910,483 +6494,483 @@ paths: "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Viewer SalesAgent tags: - - SalesAgents + - SalesAgents /user-levels: get: description: API for getting all UserLevels parameters: - - in: query - name: levelNumber - type: integer - - in: query - name: name - type: string - - in: query - name: parentLevelId - type: integer - - in: query - name: provinceId - type: integer - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - in: query + name: levelNumber + type: integer + - in: query + name: name + type: string + - in: query + name: parentLevelId + type: integer + - in: query + name: provinceId + type: integer + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all UserLevels tags: - - UserLevels + - UserLevels post: description: API for create UserLevels parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserLevelsCreateRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserLevelsCreateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create UserLevels tags: - - UserLevels + - UserLevels /user-levels/{id}: delete: description: API for delete UserLevels parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: UserLevels ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: UserLevels ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: delete UserLevels tags: - - UserLevels + - UserLevels get: description: API for getting one UserLevels parameters: - - description: UserLevels ID - in: path - name: id - required: true - type: integer + - description: UserLevels ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get one UserLevels tags: - - UserLevels + - UserLevels put: description: API for update UserLevels parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserLevelsUpdateRequest" - - description: UserLevels ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserLevelsUpdateRequest' + - description: UserLevels ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: update UserLevels tags: - - UserLevels + - UserLevels /user-levels/alias/{alias}: get: description: API for getting one UserLevels parameters: - - description: UserLevels Alias - in: path - name: alias - required: true - type: string + - description: UserLevels Alias + in: path + name: alias + required: true + type: string responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get one UserLevels tags: - - UserLevels + - UserLevels /user-levels/enable-approval: post: description: API for Enable Approval of Article parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserLevelsApprovalRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserLevelsApprovalRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: EnableApproval Articles tags: - - UserLevels + - UserLevels /user-role-accesses: get: description: API for getting all UserRoleAccesses parameters: - - in: query - name: isActive - required: true - type: boolean - - in: query - name: menuId - required: true - type: integer - - in: query - name: userRoleId - required: true - type: integer + - in: query + name: isActive + required: true + type: boolean + - in: query + name: menuId + required: true + type: integer + - in: query + name: userRoleId + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all UserRoleAccesses tags: - - UserRoleAccesses + - UserRoleAccesses post: description: API for create UserRoleAccesses parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserRoleAccessesCreateRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserRoleAccessesCreateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create UserRoleAccesses tags: - - UserRoleAccesses + - UserRoleAccesses /user-role-accesses/{id}: delete: description: API for delete UserRoleAccesses parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: UserRoleAccesses ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: UserRoleAccesses ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: delete UserRoleAccesses tags: - - UserRoleAccesses + - UserRoleAccesses get: description: API for getting one UserRoleAccesses parameters: - - description: UserRoleAccesses ID - in: path - name: id - required: true - type: integer + - description: UserRoleAccesses ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get one UserRoleAccesses tags: - - UserRoleAccesses + - UserRoleAccesses put: description: API for update UserRoleAccesses parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserRoleAccessesUpdateRequest" - - description: UserRoleAccesses ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserRoleAccessesUpdateRequest' + - description: UserRoleAccesses ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: update UserRoleAccesses tags: - - UserRoleAccesses + - UserRoleAccesses /user-role-level-details: get: description: API for getting all UserRoleLevelDetails @@ -6394,1023 +6978,1023 @@ paths: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Get all UserRoleLevelDetails tags: - - Task + - Task post: description: API for create UserRoleLevelDetails responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Create UserRoleLevelDetails tags: - - Task + - Task /user-role-level-details/{id}: delete: description: API for delete UserRoleLevelDetails parameters: - - description: UserRoleLevelDetails ID - in: path - name: id - required: true - type: integer + - description: UserRoleLevelDetails ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: delete UserRoleLevelDetails tags: - - Task + - Task get: description: API for getting one UserRoleLevelDetails parameters: - - description: UserRoleLevelDetails ID - in: path - name: id - required: true - type: integer + - description: UserRoleLevelDetails ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: Get one UserRoleLevelDetails tags: - - Task + - Task put: description: API for update UserRoleLevelDetails parameters: - - description: UserRoleLevelDetails ID - in: path - name: id - required: true - type: integer + - description: UserRoleLevelDetails ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "401": description: Unauthorized schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "404": description: Not Found schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "422": description: Unprocessable Entity schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' security: - - Bearer: [] + - Bearer: [] summary: update UserRoleLevelDetails tags: - - Task + - Task /user-roles: get: description: API for getting all UserRoles parameters: - - in: query - name: code - type: string - - in: query - name: description - type: string - - in: query - name: name - type: string - - in: query - name: statusId - type: integer - - in: query - name: userLevelId - type: integer - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - in: query + name: code + type: string + - in: query + name: description + type: string + - in: query + name: name + type: string + - in: query + name: statusId + type: integer + - in: query + name: userLevelId + type: integer + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all UserRoles tags: - - UserRoles + - UserRoles post: description: API for create UserRoles parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserRolesCreateRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserRolesCreateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create UserRoles tags: - - UserRoles + - UserRoles /user-roles/{id}: delete: description: API for delete UserRoles parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: UserRoles ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: UserRoles ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: delete UserRoles tags: - - UserRoles + - UserRoles get: description: API for getting one UserRoles parameters: - - description: UserRoles ID - in: path - name: id - required: true - type: integer + - description: UserRoles ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get one UserRoles tags: - - UserRoles + - UserRoles put: description: API for update UserRoles parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserRolesUpdateRequest" - - description: UserRoles ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserRolesUpdateRequest' + - description: UserRoles ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: update UserRoles tags: - - UserRoles + - UserRoles /users: get: description: API for getting all Users parameters: - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - in: query - name: degree - type: string - - in: query - name: email - type: string - - in: query - name: fullname - type: string - - in: query - name: genderType - type: string - - in: query - name: identityGroup - type: string - - in: query - name: identityGroupNumber - type: string - - in: query - name: identityNumber - type: string - - in: query - name: identityType - type: string - - in: query - name: phoneNumber - type: string - - in: query - name: statusId - type: integer - - in: query - name: userRoleId - type: integer - - in: query - name: username - type: string - - in: query - name: workType - type: string - - in: query - name: count - type: integer - - in: query - name: limit - type: integer - - in: query - name: nextPage - type: integer - - in: query - name: page - type: integer - - in: query - name: previousPage - type: integer - - in: query - name: sort - type: string - - in: query - name: sortBy - type: string - - in: query - name: totalPage - type: integer + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - in: query + name: degree + type: string + - in: query + name: email + type: string + - in: query + name: fullname + type: string + - in: query + name: genderType + type: string + - in: query + name: identityGroup + type: string + - in: query + name: identityGroupNumber + type: string + - in: query + name: identityNumber + type: string + - in: query + name: identityType + type: string + - in: query + name: phoneNumber + type: string + - in: query + name: statusId + type: integer + - in: query + name: userRoleId + type: integer + - in: query + name: username + type: string + - in: query + name: workType + type: string + - in: query + name: count + type: integer + - in: query + name: limit + type: integer + - in: query + name: nextPage + type: integer + - in: query + name: page + type: integer + - in: query + name: previousPage + type: integer + - in: query + name: sort + type: string + - in: query + name: sortBy + type: string + - in: query + name: totalPage + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get all Users tags: - - Users + - Users post: description: API for create Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UsersCreateRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UsersCreateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Create Users tags: - - Users + - Users /users/{id}: delete: description: API for delete Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Users ID - in: path - name: id - required: true - type: integer + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Users ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: delete Users tags: - - Users + - Users put: description: API for update Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Users ID - in: path - name: id - required: true - type: integer - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UsersUpdateRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: Users ID + in: path + name: id + required: true + type: integer + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UsersUpdateRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: update Users tags: - - Users + - Users /users/detail/{id}: get: description: API for getting one Users parameters: - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Users ID - in: path - name: id - required: true - type: integer + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: Users ID + in: path + name: id + required: true + type: integer responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get one Users tags: - - Users + - Users /users/email-validation: post: description: API for Email Validation Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserEmailValidationRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserEmailValidationRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: EmailValidation Users tags: - - Users + - Users /users/forgot-password: post: description: API for ForgotPassword Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserForgotPassword" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserForgotPassword' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: ForgotPassword Users tags: - - Users + - Users /users/info: get: description: API for ShowUserInfo parameters: - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: ShowInfo Users tags: - - Users + - Users /users/login: post: description: API for Login Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserLogin" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserLogin' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Login Users tags: - - Users + - Users /users/otp-request: post: description: API for OtpRequest Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserOtpRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserOtpRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: OtpRequest Users tags: - - Users + - Users /users/otp-validation: post: description: API for OtpValidation Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserOtpValidation" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserOtpValidation' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: OtpValidation Users tags: - - Users + - Users /users/pareto-login: post: description: API for ParetoLogin Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserLogin" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserLogin' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: ParetoLogin Users tags: - - Users + - Users /users/reset-password: post: description: API for ResetPassword Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserResetPassword" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserResetPassword' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: ResetPassword Users tags: - - Users + - Users /users/save-password: post: description: API for SavePassword Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - default: Bearer - description: Insert your access token - in: header - name: Authorization - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserSavePassword" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - default: Bearer + description: Insert your access token + in: header + name: Authorization + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserSavePassword' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: SavePassword Users tags: - - Users + - Users /users/setup-email: post: description: API for Setup Email Users parameters: - - description: Insert the X-Csrf-Token - in: header - name: X-Csrf-Token - required: true - type: string - - description: Required payload - in: body - name: payload - required: true - schema: - $ref: "#/definitions/request.UserEmailValidationRequest" + - description: Insert the X-Csrf-Token + in: header + name: X-Csrf-Token + required: true + type: string + - description: Required payload + in: body + name: payload + required: true + schema: + $ref: '#/definitions/request.UserEmailValidationRequest' responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: SetupEmail Users tags: - - Users + - Users /users/username/{username}: get: description: API for getting one Users parameters: - - description: Username - in: path - name: username - required: true - type: string + - description: Username + in: path + name: username + required: true + type: string responses: "200": description: OK schema: - $ref: "#/definitions/response.Response" + $ref: '#/definitions/response.Response' "400": description: Bad Request schema: - $ref: "#/definitions/response.BadRequestError" + $ref: '#/definitions/response.BadRequestError' "401": description: Unauthorized schema: - $ref: "#/definitions/response.UnauthorizedError" + $ref: '#/definitions/response.UnauthorizedError' "500": description: Internal Server Error schema: - $ref: "#/definitions/response.InternalServerError" + $ref: '#/definitions/response.InternalServerError' security: - - Bearer: [] + - Bearer: [] summary: Get one Users tags: - - Users + - Users swagger: "2.0"