1473 lines
30 KiB
YAML
1473 lines
30 KiB
YAML
openapi: 3.0.3
|
|
info:
|
|
title: API AI Desa+
|
|
description: API untuk AI Desa+
|
|
version: 1.0.0
|
|
contact:
|
|
name: API Support
|
|
email: support@desa-plus.com
|
|
|
|
servers:
|
|
- url: http://localhost:3000/api/ai
|
|
description: Production server
|
|
|
|
components:
|
|
securitySchemes:
|
|
bearerAuth:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|
|
|
|
schemas:
|
|
# Common Schemas
|
|
User:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
# Tambahkan properties lain sesuai kebutuhan
|
|
required:
|
|
- id
|
|
|
|
Error:
|
|
type: object
|
|
properties:
|
|
message:
|
|
type: string
|
|
status:
|
|
type: integer
|
|
|
|
|
|
|
|
|
|
# Banner
|
|
BannerBase:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
idVillage:
|
|
type: string
|
|
title:
|
|
type: string
|
|
extension:
|
|
type: string
|
|
image:
|
|
type: string
|
|
isActive:
|
|
type: boolean
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
|
|
BannerListResponse:
|
|
type: object
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
message:
|
|
type: string
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/BannerBase'
|
|
|
|
BannerDetailResponse:
|
|
type: object
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
message:
|
|
type: string
|
|
data:
|
|
$ref: '#/components/schemas/BannerBase'
|
|
|
|
|
|
# Announcement
|
|
AnnouncementBase:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
idVillage:
|
|
type: string
|
|
title:
|
|
type: string
|
|
desc:
|
|
type: string
|
|
isActive:
|
|
type: boolean
|
|
createdBy:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
|
|
AnnouncementMember:
|
|
type: object
|
|
properties:
|
|
idGroup:
|
|
type: string
|
|
idDivision:
|
|
type: string
|
|
group:
|
|
type: string
|
|
division:
|
|
type: string
|
|
|
|
AnnouncementListResponse:
|
|
type: object
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
message:
|
|
type: string
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/AnnouncementBase'
|
|
|
|
AnnouncementDetailResponse:
|
|
type: object
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
message:
|
|
type: string
|
|
data:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
title:
|
|
type: string
|
|
desc:
|
|
type: string
|
|
member:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/AnnouncementMember'
|
|
|
|
|
|
# Calendar
|
|
CalendarBase:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
dateStart:
|
|
type: string
|
|
format: date-time
|
|
timeStart:
|
|
type: string
|
|
timeEnd:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
title:
|
|
type: string
|
|
desc:
|
|
type: string
|
|
createdBy:
|
|
type: string
|
|
isActive:
|
|
type: boolean
|
|
|
|
CalendarMember:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
idUser:
|
|
type: string
|
|
name:
|
|
type: string
|
|
email:
|
|
type: string
|
|
img:
|
|
type: string
|
|
nullable: true
|
|
|
|
CalendarListResponse:
|
|
type: object
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
message:
|
|
type: string
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/CalendarBase'
|
|
|
|
CalendarDetailResponse:
|
|
type: object
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
message:
|
|
type: string
|
|
data:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
timeStart:
|
|
type: string
|
|
dateStart:
|
|
type: string
|
|
format: date-time
|
|
timeEnd:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
title:
|
|
type: string
|
|
desc:
|
|
type: string
|
|
linkMeet:
|
|
type: string
|
|
repeatEventTyper:
|
|
type: string
|
|
repeatValue:
|
|
type: integer
|
|
member:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/CalendarMember'
|
|
|
|
|
|
# Discussion
|
|
DiscussionBase:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
desc:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
idDivision:
|
|
type: string
|
|
division:
|
|
type: string
|
|
totalKomentar:
|
|
type: integer
|
|
status:
|
|
type: string
|
|
|
|
DiscussionComment:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
comment:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
username:
|
|
type: string
|
|
userimg:
|
|
type: string
|
|
|
|
DiscussionListResponse:
|
|
type: object
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
message:
|
|
type: string
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/DiscussionBase'
|
|
|
|
DiscussionDetailResponse:
|
|
type: object
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
message:
|
|
type: string
|
|
data:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
idDivision:
|
|
type: string
|
|
division:
|
|
type: string
|
|
isActive:
|
|
type: boolean
|
|
desc:
|
|
type: string
|
|
status:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
createdBy:
|
|
type: string
|
|
komentar:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/DiscussionComment'
|
|
|
|
|
|
# Group
|
|
Group:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
user:
|
|
type: string
|
|
isActive:
|
|
type: boolean
|
|
required:
|
|
- id
|
|
- name
|
|
|
|
# Position
|
|
Position:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
idGroup:
|
|
type: string
|
|
user:
|
|
type: string
|
|
isActive:
|
|
type: boolean
|
|
required:
|
|
- id
|
|
- name
|
|
|
|
# Discussion General
|
|
DiscussionGeneral:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
title:
|
|
type: string
|
|
desc:
|
|
type: string
|
|
user:
|
|
type: string
|
|
status:
|
|
type: integer
|
|
member:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/User'
|
|
required:
|
|
- id
|
|
- title
|
|
|
|
# Project
|
|
Project:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
user:
|
|
type: string
|
|
status:
|
|
type: integer
|
|
member:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/User'
|
|
required:
|
|
- id
|
|
- name
|
|
|
|
# Division (mirip Project, disederhanakan)
|
|
Division:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
desc:
|
|
type: string
|
|
user:
|
|
type: string
|
|
isActive:
|
|
type: boolean
|
|
member:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/User'
|
|
required:
|
|
- id
|
|
- name
|
|
|
|
# Task (mirip Project)
|
|
Task:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
title:
|
|
type: string
|
|
user:
|
|
type: string
|
|
status:
|
|
type: integer
|
|
idDivision:
|
|
type: string
|
|
required:
|
|
- id
|
|
- title
|
|
|
|
# Document
|
|
|
|
# Notification
|
|
NotificationReadBody:
|
|
type: object
|
|
properties:
|
|
user:
|
|
type: string
|
|
id:
|
|
type: string
|
|
required:
|
|
- user
|
|
- id
|
|
|
|
# Generic Response
|
|
ApiResponse:
|
|
type: object
|
|
properties:
|
|
data:
|
|
type: object
|
|
success:
|
|
type: boolean
|
|
required:
|
|
- data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
paths:
|
|
# Announcement
|
|
/announcement:
|
|
get:
|
|
tags:
|
|
- Announcement
|
|
summary: Get announcements
|
|
parameters:
|
|
- name: desa
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: searh
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
- name: get
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
- name: active
|
|
in: query
|
|
schema:
|
|
type: boolean
|
|
responses:
|
|
'200':
|
|
description: List of announcements
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/AnnouncementListResponse'
|
|
|
|
/announcement/{id}:
|
|
get:
|
|
tags:
|
|
- Announcement
|
|
summary: Get one announcement
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Announcement details
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/AnnouncementDetailResponse'
|
|
|
|
|
|
# Banner
|
|
/banner:
|
|
get:
|
|
tags:
|
|
- Banner
|
|
summary: Get banners
|
|
parameters:
|
|
- name: desa
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
- name: get
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
- name: search
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: active
|
|
in: query
|
|
schema:
|
|
type: boolean
|
|
responses:
|
|
'200':
|
|
description: List of banners
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/BannerListResponse'
|
|
|
|
/banner/{id}:
|
|
get:
|
|
tags:
|
|
- Banner
|
|
summary: Get one banner
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Banner details
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/BannerDetailResponse'
|
|
|
|
|
|
# Calendar
|
|
/calendar:
|
|
get:
|
|
tags:
|
|
- Calendar
|
|
summary: Get calendar by date and division
|
|
parameters:
|
|
- name: desa
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: date
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: division
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: active
|
|
in: query
|
|
schema:
|
|
type: boolean
|
|
- name: search
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
- name: get
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: Calendar events
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/CalendarListResponse'
|
|
/calendar/{id}:
|
|
get:
|
|
tags:
|
|
- Calendar
|
|
summary: Get one calendar event
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Event details
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CalendarDetailResponse'
|
|
|
|
|
|
# Discussion
|
|
/discussion:
|
|
get:
|
|
tags:
|
|
- Discussion
|
|
summary: Get discussions division
|
|
parameters:
|
|
- name: desa
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: division
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: status
|
|
in: query
|
|
schema:
|
|
type: string
|
|
enum: [open, close]
|
|
- name: active
|
|
in: query
|
|
schema:
|
|
type: boolean
|
|
- name: search
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
- name: get
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: List of discussions
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/DiscussionListResponse'
|
|
|
|
/discussion/{id}:
|
|
get:
|
|
tags:
|
|
- Discussion
|
|
summary: Get one discussion division
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Discussion details
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/DiscussionDetailResponse'
|
|
|
|
|
|
# Home Data
|
|
/home:
|
|
get:
|
|
tags:
|
|
- Home
|
|
summary: Get home data by category
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: cat
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum: [kegiatan, division, progress, dokumen, event, discussion, header, check-late-project]
|
|
responses:
|
|
'200':
|
|
description: Home data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
/home/search:
|
|
get:
|
|
tags:
|
|
- Home
|
|
summary: Search home
|
|
parameters:
|
|
- name: search
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Search results
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
type: object
|
|
|
|
/home/notification:
|
|
get:
|
|
tags:
|
|
- Notification
|
|
summary: Get notifications
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: List of notifications
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
type: object
|
|
|
|
# Group
|
|
/group:
|
|
get:
|
|
tags:
|
|
- Group
|
|
summary: Get groups
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: active
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: search
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: List of groups
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Group'
|
|
|
|
# Position
|
|
/position:
|
|
get:
|
|
tags:
|
|
- Position
|
|
summary: Get positions
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: active
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: group
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: search
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: List of positions
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Position'
|
|
|
|
# User
|
|
/user:
|
|
get:
|
|
tags:
|
|
- User
|
|
summary: Get users
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: active
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: group
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: search
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: List of users
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/User'
|
|
|
|
/user/{id}:
|
|
get:
|
|
tags:
|
|
- User
|
|
summary: Get profile
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: User profile
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/User'
|
|
|
|
# Discussion General
|
|
/discussion-general:
|
|
get:
|
|
tags:
|
|
- DiscussionGeneral
|
|
summary: Get discussion general
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: active
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: group
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: search
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: List of discussions
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/DiscussionGeneral'
|
|
|
|
/discussion-general/{id}:
|
|
get:
|
|
tags:
|
|
- DiscussionGeneral
|
|
summary: Get one discussion general
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: cat
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Discussion details
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/DiscussionGeneral'
|
|
|
|
# Project
|
|
/project:
|
|
get:
|
|
tags:
|
|
- Project
|
|
summary: Get projects
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: status
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: group
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: search
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: cat
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: List of projects
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Project'
|
|
|
|
/project/{id}:
|
|
get:
|
|
tags:
|
|
- Project
|
|
summary: Get one project
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: cat
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum: [data, progress, task, file, member, link]
|
|
responses:
|
|
'200':
|
|
description: Project details
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Project'
|
|
|
|
# Division
|
|
/division:
|
|
get:
|
|
tags:
|
|
- Division
|
|
summary: Get divisions
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: active
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: group
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: search
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: cat
|
|
in: query
|
|
schema:
|
|
type: string
|
|
- name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: List of divisions
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Division'
|
|
/division/{id}:
|
|
get:
|
|
tags:
|
|
- Division
|
|
summary: Get one division detail
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Division details
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Division'
|
|
|
|
/division/{id}/detail:
|
|
get:
|
|
tags:
|
|
- Division
|
|
summary: Get division one feature
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: cat
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum: [jumlah, today-task, new-file, new-discussion, check-member, check-admin]
|
|
responses:
|
|
'200':
|
|
description: Feature data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
/division/{id}/member:
|
|
get:
|
|
tags:
|
|
- Division
|
|
summary: Get division members
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: search
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: List of members
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/User'
|
|
|
|
/division/report:
|
|
get:
|
|
tags:
|
|
- Division
|
|
summary: Get division report
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: cat
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum: [table-progress, lainnya]
|
|
- name: date
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: date-end
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: division
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: group
|
|
in: query
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Report data
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
/division/more:
|
|
get:
|
|
tags:
|
|
- Division
|
|
summary: Get list division by id division
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: search
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: division
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: List of divisions
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Division'
|
|
|
|
# Task
|
|
/task:
|
|
get:
|
|
tags:
|
|
- Task
|
|
summary: Get tasks
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: status
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: division
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: search
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: page
|
|
in: query
|
|
schema:
|
|
type: integer
|
|
responses:
|
|
'200':
|
|
description: List of tasks
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/Task'
|
|
|
|
/task/{id}:
|
|
get:
|
|
tags:
|
|
- Task
|
|
summary: Get one task
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: cat
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum: [data, progress, task, file, member, link]
|
|
responses:
|
|
'200':
|
|
description: Task details
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Task'
|
|
|
|
/task/detail/{id}:
|
|
get:
|
|
tags:
|
|
- Task
|
|
summary: Get task tugas
|
|
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: cat
|
|
in: query
|
|
schema:
|
|
type: string
|
|
responses:
|
|
'200':
|
|
description: Tugas details
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
# Document
|
|
/document:
|
|
get:
|
|
tags:
|
|
- Document
|
|
summary: Get documents
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: path
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: division
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: category
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum: [all, folder]
|
|
responses:
|
|
'200':
|
|
description: List of documents
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
type: object
|
|
|
|
/document/more:
|
|
get:
|
|
tags:
|
|
- Document
|
|
summary: Get document info
|
|
parameters:
|
|
- name: user
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: item
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
- name: cat
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum: [share, lainnya]
|
|
responses:
|
|
'200':
|
|
description: Info
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponse'
|
|
|
|
|
|
security:
|
|
- bearerAuth: []
|
|
|
|
tags:
|
|
- name: Announcement
|
|
description: Announcements
|
|
- name: Banner
|
|
description: Banner management
|
|
- name: Calendar
|
|
description: Calendar events
|
|
- name: Discussion
|
|
description: Division discussions
|
|
|
|
- name: Home
|
|
description: Home and search
|
|
- name: Group
|
|
description: Group management
|
|
- name: Position
|
|
description: Position management
|
|
- name: User
|
|
description: User management
|
|
- name: DiscussionGeneral
|
|
description: General discussions
|
|
- name: Project
|
|
description: Project management
|
|
- name: Division
|
|
description: Division management
|
|
- name: Task
|
|
description: Task management
|
|
- name: Document
|
|
description: Document management
|
|
- name: Notification
|
|
description: Notifications
|