https://github.com/genius-wizard-dev/orange_sea_backend
https://github.com/genius-wizard-dev/orange_sea_backend
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/genius-wizard-dev/orange_sea_backend
- Owner: genius-wizard-dev
- Created: 2025-03-10T10:05:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-27T06:43:10.000Z (about 1 year ago)
- Last Synced: 2025-05-27T07:39:08.937Z (about 1 year ago)
- Language: TypeScript
- Size: 505 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Orange Sea API
Base URLs:
# Authentication
- HTTP Authentication, scheme: bearer
Nhập token JWT của bạn
- HTTP Authentication, scheme: bearer
Nhập token JWT của bạn
# Auth
## POST Đăng ký tài khoản mới
POST /api/auth/register
> Body Parameters
```json
{
"username": "Tracy94",
"email": "Viola_Crist@gmail.com",
"password": "Abc1!Z46q]",
"role": "USER"
}
```
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | --------------------------------- | -------- | ----------- |
| body | body | [RegisterDTO](#schemaregisterdto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"email": "Annalise9@gmail.com",
"isPending": true,
"key": "57958204-0f4a-4c53-889c-802f4dfbc819"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ------------------ | ----------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Đăng ký thành công | [Success_Auth_Register_Schema](#schemasuccess_auth_register_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Đăng ký thất bại | [Error_400_Auth_Register_Schema](#schemaerror_400_auth_register_schema) |
## POST Gửi lại OTP sau 2 phút
POST /api/auth/resend-otp
> Body Parameters
```json
{
"email": "Shyann78@yahoo.com"
}
```
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | ----------------------------------- | -------- | ----------- |
| body | body | [ResendOtpDTO](#schemaresendotpdto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"email": "Shyann78@yahoo.com"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ------------------------------ | --------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OTP mới đã được gửi thành công | [Success_Auth_Resend_Otp_Schema](#schemasuccess_auth_resend_otp_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Gửi OTP thất bại | [Error_400_Auth_Resend_Otp_Schema](#schemaerror_400_auth_resend_otp_schema) |
## POST Kiểm tra tình trạng đăng ký
POST /api/auth/is-register
> Body Parameters
```json
{
"key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"email": "Elmore.Block@hotmail.com"
}
```
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | ------------------------------------- | -------- | ----------- |
| body | body | [CheckRegister](#schemacheckregister) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | -------------------------------------- | ----------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Kiểm tra tình trạng đăng ký thành công | [Success_Auth_Is_Register_Schema](#schemasuccess_auth_is_register_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Kiểm tra tình trạng đăng ký thất bại | [Error_400_Auth_Is_Register_Schema](#schemaerror_400_auth_is_register_schema) |
## POST Xác thực OTP và hoàn tất đăng ký
POST /api/auth/verify-otp
> Body Parameters
```json
{
"email": "Emilie43@yahoo.com",
"otp": "1e104c31-4c5e-4606-9270-d0bf28a6d7dd"
}
```
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | --------------------------------------------------- | -------- | ----------- |
| body | body | [RegisterOtpVerifyDTO](#schemaregisterotpverifydto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"accountId": "e7befab8a8fcc8cf0faacdb3",
"username": "Jerad93",
"email": "Freeda26@gmail.com",
"profileId": "7578affcaa3660e4aecaa362"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Xác thực OTP thành công | [Success_Auth_Verify_Otp_Schema](#schemasuccess_auth_verify_otp_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Xác thực OTP thất bại | [Error_400_Auth_Verify_Otp_Schema](#schemaerror_400_auth_verify_otp_schema) |
## POST Đăng nhập với username và mật khẩu
POST /api/auth/login
> Body Parameters
```json
{
"username": "Aryanna_Emmerich",
"password": "Abc1!BA>mf"
}
```
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | --------------------------- | -------- | ----------- |
| body | body | [LoginDTO](#schemalogindto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"access_token": "string",
"refresh_token": "string"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | -------------------- | ----------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Đăng nhập thành công | [Success_Auth_Login_Schema](#schemasuccess_auth_login_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Đăng nhập thất bại | [Error_400_Auth_Login_Schema](#schemaerror_400_auth_login_schema) |
## POST Làm mới access token bằng refresh token
POST /api/auth/refresh
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"access_token": "string",
"refresh_token": "string"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ---------------------------------- | --------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Làm mới access token thành công | [Success_Auth_Refresh_Schema](#schemasuccess_auth_refresh_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Làm mới access token thất bại | [Error_400_Auth_Refresh_Schema](#schemaerror_400_auth_refresh_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Token không hợp lệ hoặc đã hết hạn | [Error_401_Auth_Refresh_Schema](#schemaerror_401_auth_refresh_schema) |
## POST Đăng xuất và thu hồi token
POST /api/auth/logout
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ---------------------------------- | ------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Đăng xuất thành công | [Success_Auth_Logout_Schema](#schemasuccess_auth_logout_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Đăng xuất thất bại | [Error_400_Auth_Logout_Schema](#schemaerror_400_auth_logout_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Token không hợp lệ hoặc đã hết hạn | [Error_401_Auth_Logout_Schema](#schemaerror_401_auth_logout_schema) |
## POST Quên mật khẩu
POST /api/auth/forgot-password
> Body Parameters
```json
{
"email": "Bell.Runolfsson@gmail.com"
}
```
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | --------------------------------------------- | -------- | ----------- |
| body | body | [ForgotPasswordDTO](#schemaforgotpassworddto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ------------------------- | ------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Email đã được gửi đến bạn | [Success_Auth_Forgot_Password_Schema](#schemasuccess_auth_forgot_password_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Quên mật khẩu thất bại | [Error_400_Auth_Forgot_Password_Schema](#schemaerror_400_auth_forgot_password_schema) |
## POST Đặt lại mật khẩu
POST /api/auth/reset-password
> Body Parameters
```json
{
"newPassword": "Abc1!uL/Tb"
}
```
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | ------------------------------------------- | -------- | ----------- |
| body | body | [ResetPasswordDTO](#schemaresetpassworddto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"profileId": "a8ac4a50e79eb911baca20b8"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ------------------------- | ----------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Mật khẩu đã được đặt lại | [Success_Auth_Reset_Password_Schema](#schemasuccess_auth_reset_password_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Đặt lại mật khẩu thất bại | [Error_400_Auth_Reset_Password_Schema](#schemaerror_400_auth_reset_password_schema) |
# Profile
## GET Lấy thông tin profile của người dùng hiện tại
GET /api/profile/me
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"id": "4d8ff6814e4dae9e07caccc2",
"name": "Irma Swaniawski",
"avatar": "https://robust-exploration.biz/",
"bio": "veteran, streamer, engineer",
"role": "USER",
"phone": "442.951.2803 x835",
"gender": "M",
"birthday": "1989-04-12T22:13:24.856Z",
"email": "Neha_Sipes8@gmail.com",
"username": "Sabina.Wehner89",
"accountID": "d0a92ee180cafb5d902fdbab",
"isSetup": true
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Lấy thông tin profile thành công | [Success_Profile_Get_My_Profile_Schema](#schemasuccess_profile_get_my_profile_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Lấy thông tin profile thất bại | [Error_400_Profile_Get_My_Profile_Schema](#schemaerror_400_profile_get_my_profile_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Profile_Get_My_Profile_Schema](#schemaerror_401_profile_get_my_profile_schema) |
## PUT Cập nhật profile của người dùng hiện tại
PUT /api/profile/me
> Body Parameters
```yaml
name: ''
phone: '0912345678'
bio: ''
gender: ''
avatar: ''
birthday: ''
```
### Params
| Name | Location | Type | Required | Description |
| ---------- | -------- | -------------- | -------- | -------------------------- |
| body | body | object | no | none |
| » name | body | string | no | Tên đầy đủ |
| » phone | body | string | no | Số điện thoại |
| » bio | body | string | no | Tiểu sử |
| » gender | body | string | no | Giới tính |
| » avatar | body | string(binary) | no | Ảnh đại diện (file upload) |
| » birthday | body | string | no | Ngày sinh (định dạng ISO) |
#### Enum
| Name | Value |
| -------- | ----- |
| » gender | M |
| » gender | F |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"profileId": "a8ac4a50e79eb911baca20b8"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Cập nhật profile thành công | [Success_Profile_Update_My_Profile_Schema](#schemasuccess_profile_update_my_profile_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Cập nhật profile thất bại | [Error_400_Profile_Update_My_Profile_Schema](#schemaerror_400_profile_update_my_profile_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Profile_Update_My_Profile_Schema](#schemaerror_401_profile_update_my_profile_schema) |
## GET Lấy thông tin profile theo ID
GET /api/profile/{id}
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | ------ | -------- | ----------- |
| id | path | string | yes | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"id": "4d8ff6814e4dae9e07caccc2",
"name": "Irma Swaniawski",
"avatar": "https://robust-exploration.biz/",
"bio": "veteran, streamer, engineer",
"role": "USER",
"phone": "442.951.2803 x835",
"gender": "M",
"birthday": "1989-04-12T22:13:24.856Z",
"email": "Neha_Sipes8@gmail.com",
"username": "Sabina.Wehner89",
"accountID": "d0a92ee180cafb5d902fdbab",
"isSetup": true
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Lấy thông tin profile thành công | [Success_Profile_Get_Profile_By_ID_Schema](#schemasuccess_profile_get_profile_by_id_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Lấy thông tin profile thất bại | [Error_400_Profile_Get_Profile_By_ID_Schema](#schemaerror_400_profile_get_profile_by_id_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Profile_Get_Profile_By_ID_Schema](#schemaerror_401_profile_get_profile_by_id_schema) |
## GET Tìm kiếm profile theo username
GET /api/profile/username/{username}
### Params
| Name | Location | Type | Required | Description |
| -------- | -------- | ------ | -------- | ----------- |
| username | path | string | yes | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"id": "4d8ff6814e4dae9e07caccc2",
"name": "Irma Swaniawski",
"avatar": "https://robust-exploration.biz/",
"bio": "veteran, streamer, engineer",
"role": "USER",
"phone": "442.951.2803 x835",
"gender": "M",
"birthday": "1989-04-12T22:13:24.856Z",
"email": "Neha_Sipes8@gmail.com",
"username": "Sabina.Wehner89",
"accountID": "d0a92ee180cafb5d902fdbab",
"isSetup": true
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Tìm kiếm profile thành công | [Success_Profile_Find_Profile_By_Username_Schema](#schemasuccess_profile_find_profile_by_username_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Tìm kiếm profile thất bại | [Error_400_Profile_Find_Profile_By_Username_Schema](#schemaerror_400_profile_find_profile_by_username_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Profile_Find_Profile_By_Username_Schema](#schemaerror_401_profile_find_profile_by_username_schema) |
# Chat
## POST Gửi tin nhắn đến nhóm chat
POST /api/chat/send
> Body Parameters
```yaml
groupId: da155133ee5f23240d4944f3
message: Mollitia vado ait utrimque sum tristis nulla templum.
type: TEXT
file: file_content
```
### Params
| Name | Location | Type | Required | Description |
| --------- | -------- | -------------- | -------- | ----------------------------------------- |
| body | body | object | no | none |
| » groupId | body | string | yes | ID của nhóm chat |
| » message | body | string | no | Nội dung tin nhắn |
| » type | body | string | no | Loại tin nhắn |
| » file | body | string(binary) | no | File đính kèm (hình ảnh, video hoặc file) |
#### Enum
| Name | Value |
| ------ | ----- |
| » type | TEXT |
| » type | IMAGE |
| » type | VIDEO |
| » type | RAW |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"messageId": "c8caf93a3bbf2fabcb83abe5"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Gửi tin nhắn thành công | [Success_Message_Send_Message_Schema](#schemasuccess_message_send_message_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Gửi tin nhắn thất bại | [Error_400_Message_Send_Message_Schema](#schemaerror_400_message_send_message_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Message_Send_Message_Schema](#schemaerror_401_message_send_message_schema) |
## PUT Thu hồi tin nhắn
PUT /api/chat/recall/{messageId}
### Params
| Name | Location | Type | Required | Description |
| --------- | -------- | ------ | -------- | --------------------------- |
| messageId | path | string | yes | ID của tin nhắn cần thu hồi |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"messageId": "c8caf93a3bbf2fabcb83abe5"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | --------------------------- | --------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Thu hồi tin nhắn thành công | [Success_MessageId_Recall_Message_Schema](#schemasuccess_messageid_recall_message_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Thu hồi tin nhắn thất bại | [Error_400_MessageId_Recall_Message_Schema](#schemaerror_400_messageid_recall_message_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_MessageId_Recall_Message_Schema](#schemaerror_401_messageid_recall_message_schema) |
## DELETE Xóa tin nhắn
DELETE /api/chat/delete/{messageId}
### Params
| Name | Location | Type | Required | Description |
| --------- | -------- | ------ | -------- | ----------------------- |
| messageId | path | string | yes | ID của tin nhắn cần xóa |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"messageId": "c8caf93a3bbf2fabcb83abe5"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Xóa tin nhắn thành công | [Success_MessageId_Delete_Message_Schema](#schemasuccess_messageid_delete_message_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Xóa tin nhắn thất bại | [Error_400_MessageId_Delete_Message_Schema](#schemaerror_400_messageid_delete_message_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_MessageId_Delete_Message_Schema](#schemaerror_401_messageid_delete_message_schema) |
## POST Chuyển tiếp tin nhắn
POST /api/chat/forward
> Body Parameters
```json
{
"messageId": "4b74d769fdfef24ca6ffca7d",
"groupId": "d20afe5ebafccd8120ed3f83"
}
```
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | --------------------------------------------- | -------- | ----------- |
| body | body | [ForwardMessageDto](#schemaforwardmessagedto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"messageId": "c8caf93a3bbf2fabcb83abe5"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Chuyển tiếp tin nhắn thành công | [Success_MessageId_Forward_Message_Schema](#schemasuccess_messageid_forward_message_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Chuyển tiếp tin nhắn thất bại | [Error_400_MessageId_Forward_Message_Schema](#schemaerror_400_messageid_forward_message_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_MessageId_Forward_Message_Schema](#schemaerror_401_messageid_forward_message_schema) |
## GET Lấy tin nhắn theo trang của nhóm chat
GET /api/chat/messages/{groupId}
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | ------ | -------- | ---------------- |
| groupId | path | string | yes | ID của nhóm chat |
| cursor | query | string | yes | none |
> Response Examples
> 200 Response
```json
{
"status": "success",
"statusCode": 200,
"data": {
"messages": [{}],
"nextCursor": "string",
"hasMore": true
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | -------------------------------- | ----------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Danh sách tin nhắn của nhóm chat | Inline |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Dữ liệu không hợp lệ | None |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | None |
### Responses Data Schema
HTTP Status Code **200**
| Name | Type | Required | Restrictions | Title | description |
| ------------- | ----------- | -------- | ------------ | ----- | ----------- |
| » status | string | false | none | | none |
| » statusCode | number | false | none | | none |
| » data | object | false | none | | none |
| »» messages | [object] | false | none | | none |
| »» nextCursor | string¦null | false | none | | none |
| »» hasMore | boolean | false | none | | none |
## PUT Chỉnh sửa tin nhắn
PUT /api/chat/edit/{messageId}
> Body Parameters
```json
{
"newContent": "Nội dung tin nhắn đã chỉnh sửa"
}
```
### Params
| Name | Location | Type | Required | Description |
| --------- | -------- | --------------------------------------- | -------- | ----------------------------- |
| messageId | path | string | yes | ID của tin nhắn cần chỉnh sửa |
| body | body | [EditMessageDto](#schemaeditmessagedto) | no | none |
> Response Examples
> 200 Response
```json
{
"status": "success",
"statusCode": 200,
"data": {},
"message": "Tin nhắn không tồn tại"
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ------------------------------------------------------- | --------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Tin nhắn đã được chỉnh sửa thành công | [ApiResponseDto](#schemaapiresponsedto) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Tin nhắn không tồn tại hoặc không phải tin nhắn văn bản | None |
| 403 | [Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3) | Người dùng không có quyền chỉnh sửa tin nhắn này | None |
## GET Lấy danh sách media (hình ảnh, video, file) của nhóm chat
GET /api/chat/media/{groupId}
> Body Parameters
```json
{
"type": "IMAGE",
"limit": 10,
"cursor": "146ac4dab0fc39dd7bf06ccf"
}
```
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | --------------------------------- | -------- | ---------------- |
| groupId | path | string | yes | ID của nhóm chat |
| body | body | [GetMediaDto](#schemagetmediadto) | no | none |
> Response Examples
> 200 Response
```json
{
"status": "success",
"statusCode": 200,
"data": {
"media": [{}],
"nextCursor": "string",
"hasMore": true
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ----------------------------- | ----------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Danh sách media của nhóm chat | Inline |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Dữ liệu không hợp lệ | None |
| 403 | [Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3) | Không có quyền truy cập | None |
### Responses Data Schema
HTTP Status Code **200**
| Name | Type | Required | Restrictions | Title | description |
| ------------- | ----------- | -------- | ------------ | ----- | ----------- |
| » status | string | false | none | | none |
| » statusCode | number | false | none | | none |
| » data | object | false | none | | none |
| »» media | [object] | false | none | | none |
| »» nextCursor | string¦null | false | none | | none |
| »» hasMore | boolean | false | none | | none |
# Account
## PUT Cập nhật mật khẩu tài khoản
PUT /api/account/{id}/password
> Body Parameters
```json
{
"currentPassword": "Abc1!l
## GET Lấy thông tin tài khoản theo ID
GET /api/account/{id}
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | ------ | -------- | ----------- |
| id | path | string | yes | none |
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | -------------------------------------------------------------- | ---------------------------------- | ----------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Lấy thông tin tài khoản thành công | None |
| 404 | [Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) | Không tìm thấy tài khoản | None |
## GET Lấy thông tin tài khoản theo username
GET /api/account/username/{username}
### Params
| Name | Location | Type | Required | Description |
| -------- | -------- | ------ | -------- | ----------- |
| username | path | string | yes | none |
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | -------------------------------------------------------------- | ---------------------------------- | ----------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Lấy thông tin tài khoản thành công | None |
| 404 | [Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4) | Không tìm thấy tài khoản | None |
# Friend
## POST Gửi yêu cầu kết bạn
POST /api/friend
> Body Parameters
```json
{
"receiverId": "b1cc74df4f22c9f0d870e002"
}
```
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | ------------------------------------------------- | -------- | ----------- |
| body | body | [CreateFriendshipDTO](#schemacreatefriendshipdto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"friendshipId": "ba39e4a19738f4c3a5ff8781"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Gửi yêu cầu kết bạn thành công | [Success_Friend_Send_Friend_Request_Schema](#schemasuccess_friend_send_friend_request_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Tìm kiếm profile thất bại | [Error_400_Friend_Send_Friend_Request_Schema](#schemaerror_400_friend_send_friend_request_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Friend_Send_Friend_Request_Schema](#schemaerror_401_friend_send_friend_request_schema) |
## GET Lấy danh sách bạn bè
GET /api/friend
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": [
{
"id": "b1b4d6dc8f1b07ce3dfe13c6",
"profileId": "bcabfa1f6d85fd6cbaad6468",
"name": "Loren Ryan",
"avatar": "https://avatars.githubusercontent.com/u/40136905",
"bio": "fog junkie, leader",
"phone": "0971498233",
"email": "Melba_Abernathy97@gmail.com",
"birthday": "2002-08-14T22:39:47.293Z"
}
]
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ------------------------------- | --------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Lấy danh sách bạn bè thành công | [Success_Friend_Get_Friends_Schema](#schemasuccess_friend_get_friends_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Lấy danh sách bạn bè thất bại | [Error_400_Friend_Get_Friends_Schema](#schemaerror_400_friend_get_friends_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Friend_Get_Friends_Schema](#schemaerror_401_friend_get_friends_schema) |
## GET Lấy danh sách yêu cầu kết bạn đã nhận
GET /api/friend/requests/received
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": [
{
"id": "b1b4d6dc8f1b07ce3dfe13c6",
"profileId": "bcabfa1f6d85fd6cbaad6468",
"name": "Loren Ryan",
"avatar": "https://avatars.githubusercontent.com/u/40136905",
"bio": "fog junkie, leader",
"phone": "0971498233",
"email": "Melba_Abernathy97@gmail.com",
"birthday": "2002-08-14T22:39:47.293Z"
}
]
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Lấy danh sách yêu cầu kết bạn đã nhận thành công | [Success_Friend_Get_Received_Requests_Schema](#schemasuccess_friend_get_received_requests_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Lấy danh sách yêu cầu kết bạn đã nhận thất bại | [Error_400_Friend_Get_Received_Requests_Schema](#schemaerror_400_friend_get_received_requests_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Friend_Get_Received_Requests_Schema](#schemaerror_401_friend_get_received_requests_schema) |
## GET Lấy danh sách yêu cầu kết bạn đã gửi
GET /api/friend/requests/sent
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": [
{
"id": "b1b4d6dc8f1b07ce3dfe13c6",
"profileId": "bcabfa1f6d85fd6cbaad6468",
"name": "Loren Ryan",
"avatar": "https://avatars.githubusercontent.com/u/40136905",
"bio": "fog junkie, leader",
"phone": "0971498233",
"email": "Melba_Abernathy97@gmail.com",
"birthday": "2002-08-14T22:39:47.293Z"
}
]
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Lấy danh sách yêu cầu kết bạn đã gửi thành công | [Success_Friend_Get_Sent_Requests_Schema](#schemasuccess_friend_get_sent_requests_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Lấy danh sách yêu cầu kết bạn đã gửi thất bại | [Error_400_Friend_Get_Sent_Requests_Schema](#schemaerror_400_friend_get_sent_requests_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Friend_Get_Sent_Requests_Schema](#schemaerror_401_friend_get_sent_requests_schema) |
## PUT Xử lý yêu cầu kết bạn
PUT /api/friend/requests/{id}
> Body Parameters
```json
{
"action": "ACCEPT"
}
```
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | ------------------------------------------------------- | -------- | ----------- |
| id | path | string | yes | none |
| body | body | [HandleFriendRequestDTO](#schemahandlefriendrequestdto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"friendshipId": "ba39e4a19738f4c3a5ff8781"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Xử lý yêu cầu kết bạn thành công | [Success_Friend_Handle_Friend_Request_Schema](#schemasuccess_friend_handle_friend_request_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Xử lý yêu cầu kết bạn thất bại | [Error_400_Friend_Handle_Friend_Request_Schema](#schemaerror_400_friend_handle_friend_request_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Friend_Handle_Friend_Request_Schema](#schemaerror_401_friend_handle_friend_request_schema) |
## PUT Xóa mối quan hệ bạn bè
PUT /api/friend/delete/{id}
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | ------ | -------- | ----------- |
| id | path | string | yes | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Xóa mối quan hệ bạn bè thành công | [Success_Friend_Delete_Friendship_Schema](#schemasuccess_friend_delete_friendship_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Xóa mối quan hệ bạn bè thất bại | [Error_400_Friend_Delete_Friendship_Schema](#schemaerror_400_friend_delete_friendship_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Friend_Delete_Friendship_Schema](#schemaerror_401_friend_delete_friendship_schema) |
## GET Tìm kiếm người dùng
GET /api/friend/search/{keyword}
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | ------ | -------- | ----------- |
| keyword | path | string | yes | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": [
{
"id": "profile-id",
"username": "user123",
"name": "Nguyễn Văn A",
"avatar": "https://example.com/avatar.jpg",
"relation": "NONE"
}
]
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ------------------------------ | --------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Tìm kiếm người dùng thành công | [Success_Friend_Search_User_Schema](#schemasuccess_friend_search_user_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Tìm kiếm người dùng thất bại | [Error_400_Friend_Search_User_Schema](#schemaerror_400_friend_search_user_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Friend_Search_User_Schema](#schemaerror_401_friend_search_user_schema) |
## GET Kiểm tra mối quan hệ bạn bè
GET /api/friend/check/{profileId}
### Params
| Name | Location | Type | Required | Description |
| --------- | -------- | ------ | -------- | ----------- |
| profileId | path | string | yes | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"isFriend": true
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Kiểm tra mối quan hệ bạn bè thành công | [Success_Friend_Check_Friendship_Schema](#schemasuccess_friend_check_friendship_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Kiểm tra mối quan hệ bạn bè thất bại | [Error_400_Friend_Check_Friendship_Schema](#schemaerror_400_friend_check_friendship_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Friend_Check_Friendship_Schema](#schemaerror_401_friend_check_friendship_schema) |
# Group
## POST Tạo nhóm
POST /api/group
> Body Parameters
```json
{
"name": "Nhóm học tập",
"participantIds": ["61a70eb005ffedbb86da6fc7", "fa517bc5cfcbc72e2fd6addd"],
"isGroup": true
}
```
### Params
| Name | Location | Type | Required | Description |
| ---- | -------- | --------------------------------------- | -------- | ----------- |
| body | body | [CreateGroupDTO](#schemacreategroupdto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"groupId": "4baaff3dac5e034bf6afb215"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | --------------------------- | --------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Nhóm đã được tạo thành công | [Success_Group_Create_Group_Schema](#schemasuccess_group_create_group_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Dữ liệu không hợp lệ | [Error_400_Group_Create_Group_Schema](#schemaerror_400_group_create_group_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Group_Create_Group_Schema](#schemaerror_401_group_create_group_schema) |
## GET Lấy danh sách nhóm của người dùng hiện tại
GET /api/group
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": [
{
"id": "ce5cedd3c19185d96fa67750",
"name": "petty furlough drat",
"ownerId": "7e032a41eff088ed7ee55d33",
"isGroup": true,
"createdAt": "2024-06-16T08:57:04.657Z",
"updatedAt": "2025-05-11T21:59:18.153Z",
"participants": [
{
"id": "de28d19bea9e38f7effc8e92",
"profileId": "e6f35ba74ad9f03f7b69ab68",
"role": "OWNER",
"name": "Franklin Schuster",
"avatar": "https://cdn.jsdelivr.net/gh/faker-js/assets-person-portrait/female/512/25.jpg"
}
],
"lastMessage": {
"id": "[",
"content": "[",
"senderId": "[",
"fileUrl": "[",
"createdAt": "[",
"updatedAt": "[",
"isRecalled": "[",
"type": "[",
"fileName": "["
}
}
]
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | --------------------------- | ----------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Danh sách nhóm | [Success_Group_Get_Groups_Schema](#schemasuccess_group_get_groups_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Lấy danh sách nhóm thất bại | [Error_400_Group_Get_Groups_Schema](#schemaerror_400_group_get_groups_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Group_Get_Groups_Schema](#schemaerror_401_group_get_groups_schema) |
## PUT Thêm thành viên vào nhóm
PUT /api/group/{groupId}/participant
> Body Parameters
```json
{
"participantIds": ["21b1529f4a1ec026ed52ee7f", "c9c08b47f929fcb9bb7deb9a"]
}
```
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | --------------------------------------------- | -------- | ----------- |
| groupId | path | string | yes | none |
| body | body | [ParticipantIdsDTO](#schemaparticipantidsdto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"groupId": "4baaff3dac5e034bf6afb215"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Thành viên đã được thêm vào nhóm | [Success_Group_Add_Participant_Schema](#schemasuccess_group_add_participant_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Thêm thành viên vào nhóm thất bại | [Error_400_Group_Add_Participant_Schema](#schemaerror_400_group_add_participant_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Group_Add_Participant_Schema](#schemaerror_401_group_add_participant_schema) |
## DELETE Xóa thành viên khỏi nhóm
DELETE /api/group/{groupId}/participant
> Body Parameters
```json
{
"participantIds": ["21b1529f4a1ec026ed52ee7f", "c9c08b47f929fcb9bb7deb9a"]
}
```
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | --------------------------------------------- | -------- | ----------- |
| groupId | path | string | yes | none |
| body | body | [ParticipantIdsDTO](#schemaparticipantidsdto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"groupId": "4baaff3dac5e034bf6afb215"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Thành viên đã được xóa khỏi nhóm | [Success_Group_Remove_Participant_Schema](#schemasuccess_group_remove_participant_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Xóa thành viên khỏi nhóm thất bại | [Error_400_Group_Remove_Participant_Schema](#schemaerror_400_group_remove_participant_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Group_Remove_Participant_Schema](#schemaerror_401_group_remove_participant_schema) |
## DELETE Xóa nhóm
DELETE /api/group/{groupId}
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | ------ | -------- | ------------------- |
| groupId | path | string | yes | ID của nhóm cần xóa |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"groupId": "4baaff3dac5e034bf6afb215"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | --------------------------- | --------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Nhóm đã được xóa thành công | [Success_Group_Delete_Group_Schema](#schemasuccess_group_delete_group_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Xóa nhóm thất bại | [Error_400_Group_Delete_Group_Schema](#schemaerror_400_group_delete_group_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Group_Delete_Group_Schema](#schemaerror_401_group_delete_group_schema) |
## GET Lấy thông tin của nhóm
GET /api/group/{groupId}
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | ------ | -------- | ----------- |
| groupId | path | string | yes | ID của nhóm |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"id": "ce5cedd3c19185d96fa67750",
"name": "petty furlough drat",
"ownerId": "7e032a41eff088ed7ee55d33",
"isGroup": true,
"createdAt": "2024-06-16T08:57:04.657Z",
"updatedAt": "2025-05-11T21:59:18.153Z",
"participants": [
{
"id": "[",
"profileId": "[",
"role": "[",
"name": "[",
"avatar": "["
}
],
"lastMessage": {
"id": null,
"content": null,
"senderId": null,
"fileUrl": null,
"createdAt": null,
"updatedAt": null,
"isRecalled": null,
"type": null,
"fileName": null
}
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | --------------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Thông tin chi tiết của nhóm | [Success_Group_Get_Group_Info_Schema](#schemasuccess_group_get_group_info_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Group_Get_Group_Info_Schema](#schemaerror_401_group_get_group_info_schema) |
| 403 | [Forbidden](https://tools.ietf.org/html/rfc7231#section-6.5.3) | Người dùng không phải là thành viên của nhóm | [Error_403_Group_Get_Group_Info_Schema](#schemaerror_403_group_get_group_info_schema) |
## DELETE Rời khỏi nhóm
DELETE /api/group/{groupId}/leave
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | ------ | -------- | -------------------- |
| groupId | path | string | yes | ID của nhóm muốn rời |
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ------------------------------------------------------- | ----------- | ----------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | none | None |
## PUT Chuyển quyền chủ nhóm
PUT /api/group/{groupId}/owner
> Body Parameters
```json
{
"newOwnerId": "1af1fc0adb5b8eaf067e1ae6"
}
```
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | --------------------------------------- | -------- | ----------- |
| groupId | path | string | yes | ID của nhóm |
| body | body | [ChangeOwnerDTO](#schemachangeownerdto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"groupId": "4baaff3dac5e034bf6afb215"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Quyền chủ nhóm đã được chuyển thành công | [Success_Group_Transfer_Ownership_Schema](#schemasuccess_group_transfer_ownership_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Chuyển quyền chủ nhóm thất bại | [Error_400_Group_Transfer_Ownership_Schema](#schemaerror_400_group_transfer_ownership_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Group_Transfer_Ownership_Schema](#schemaerror_401_group_transfer_ownership_schema) |
## GET Tìm kiếm nhóm theo tên
GET /api/group/search/{keyword}
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | ------ | -------- | ---------------- |
| keyword | path | string | yes | Từ khóa tìm kiếm |
> Response Examples
> 200 Response
```json
[
{
"id": "group-id-1",
"name": "Nhóm học tập",
"ownerId": "profile-id-1",
"isGroup": true,
"createdAt": "2023-10-20T08:00:00Z",
"updatedAt": "2023-10-25T10:30:00Z",
"participants": [
{
"id": "participant-id-1",
"userId": "profile-id-1",
"groupId": "group-id-1",
"role": "OWNER",
"user": {
"id": null,
"name": null,
"avatar": null
}
}
],
"messages": [
{
"id": "message-id-1",
"content": "Xin chào mọi người!",
"createdAt": "2023-10-25T10:30:00Z"
}
]
}
]
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ------------------------------------------------------- | ------------------------------------------- | ----------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Danh sách nhóm phù hợp với từ khóa tìm kiếm | Inline |
### Responses Data Schema
HTTP Status Code **200**
| Name | Type | Required | Restrictions | Title | description |
| -------------- | ----------------------------------------------- | -------- | ------------ | ----- | ---------------------------------------------------------- |
| _anonymous_ | [[GroupResponseDto](#schemagroupresponsedto)] | false | none | | none |
| » id | string | true | none | | ID của nhóm |
| » name | string | true | none | | Tên nhóm |
| » ownerId | string | true | none | | ID của chủ nhóm |
| » isGroup | boolean | true | none | | Xác định đây có phải là nhóm hay cuộc trò chuyện trực tiếp |
| » createdAt | string(date-time) | true | none | | Thời gian tạo nhóm |
| » updatedAt | string(date-time) | true | none | | Thời gian cập nhật nhóm |
| » participants | [[ParticipantDto](#schemaparticipantdto)] | true | none | | Danh sách thành viên trong nhóm |
| »» id | string | true | none | | ID của thành viên trong nhóm |
| »» userId | string | true | none | | ID của hồ sơ người dùng |
| »» groupId | string | true | none | | ID của nhóm |
| »» role | string | true | none | | Vai trò trong nhóm |
| »» user | [ParticipantUserDto](#schemaparticipantuserdto) | true | none | | Thông tin người dùng |
| »»» id | string | true | none | | ID của hồ sơ người dùng |
| »»» name | string | true | none | | Tên người dùng |
| »»» avatar | string | true | none | | Ảnh đại diện |
| » messages | [[MessageDto](#schemamessagedto)] | true | none | | Tin nhắn gần nhất trong nhóm |
| »» id | string | true | none | | ID của tin nhắn |
| »» content | string | true | none | | Nội dung tin nhắn |
| »» createdAt | string(date-time) | true | none | | Thời gian tạo tin nhắn |
#### Enum
| Name | Value |
| ---- | ------ |
| role | OWNER |
| role | MEMBER |
## POST Đổi tên nhóm
POST /api/group/{groupId}/rename
> Body Parameters
```json
{
"name": "Nhóm bạn thân"
}
```
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | --------------------------------------- | -------- | ----------- |
| groupId | path | string | yes | ID của nhóm |
| body | body | [RenameGroupDTO](#schemarenamegroupdto) | no | none |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"groupId": "4baaff3dac5e034bf6afb215"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | ------------------------------- | --------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Tên nhóm đã được đổi thành công | [Success_Group_Rename_Group_Schema](#schemasuccess_group_rename_group_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Đổi tên nhóm thất bại | [Error_400_Group_Rename_Group_Schema](#schemaerror_400_group_rename_group_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Group_Rename_Group_Schema](#schemaerror_401_group_rename_group_schema) |
## PUT Cập nhật avatar nhóm
PUT /api/group/{groupId}/avatar
> Body Parameters
```yaml
file: ''
```
### Params
| Name | Location | Type | Required | Description |
| ------- | -------- | -------------- | -------- | ---------------------------- |
| groupId | path | string | yes | ID của nhóm |
| body | body | object | no | none |
| » file | body | string(binary) | yes | Ảnh đại diện của nhóm (file) |
> Response Examples
> 200 Response
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"groupId": "4baaff3dac5e034bf6afb215"
}
}
```
### Responses
| HTTP Status Code | Meaning | Description | Data schema |
| ---------------- | ---------------------------------------------------------------- | --------------------------------------- | ----------------------------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | Avatar nhóm đã được cập nhật thành công | [Success_Group_Update_Group_Avatar_Schema](#schemasuccess_group_update_group_avatar_schema) |
| 400 | [Bad Request](https://tools.ietf.org/html/rfc7231#section-6.5.1) | Cập nhật avatar nhóm thất bại | [Error_400_Group_Update_Group_Avatar_Schema](#schemaerror_400_group_update_group_avatar_schema) |
| 401 | [Unauthorized](https://tools.ietf.org/html/rfc7235#section-3.1) | Không có quyền truy cập | [Error_401_Group_Update_Group_Avatar_Schema](#schemaerror_401_group_update_group_avatar_schema) |
# Data Schema
SendMessageDto
```json
{
"groupId": "da155133ee5f23240d4944f3",
"message": "Mollitia vado ait utrimque sum tristis nulla templum.",
"type": "TEXT",
"file": "file_content"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ------- | -------------- | -------- | ------------ | ----- | ----------------------------------------- |
| groupId | string | true | none | | ID của nhóm chat |
| message | string | false | none | | Nội dung tin nhắn |
| type | string | false | none | | Loại tin nhắn |
| file | string(binary) | false | none | | File đính kèm (hình ảnh, video hoặc file) |
#### Enum
| Name | Value |
| ---- | ----- |
| type | TEXT |
| type | IMAGE |
| type | VIDEO |
| type | RAW |
ApiResponseDto
```json
{
"status": "success",
"statusCode": 200,
"data": {},
"message": "Tin nhắn không tồn tại"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ------ | -------- | ------------ | ----- | ---------------------- |
| status | string | true | none | | Trạng thái của request |
| statusCode | number | true | none | | Mã trạng thái HTTP |
| data | object | true | none | | Dữ liệu trả về từ API |
| message | string | false | none | | Thông báo lỗi (nếu có) |
MessageIdResponseDTO
```json
{
"messageId": "c8caf93a3bbf2fabcb83abe5"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| --------- | ------ | -------- | ------------ | ----- | --------------- |
| messageId | string | true | none | | ID của tin nhắn |
ForwardMessageDto
```json
{
"messageId": "4b74d769fdfef24ca6ffca7d",
"groupId": "d20afe5ebafccd8120ed3f83"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| --------- | ------ | -------- | ------------ | ----- | ------------------------------------------------- |
| messageId | string | true | none | | ID của tin nhắn cần chuyển tiếp |
| groupId | string | true | none | | ID của nhóm chat đích để chuyển tiếp tin nhắn đến |
Success_Message_Send_Message_Schema
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"messageId": "c8caf93a3bbf2fabcb83abe5"
}
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | --------------------------------------------------- | -------- | ------------ | ----- | ----------------- |
| statusCode | number | true | none | | HTTP status code |
| message | string | true | none | | Thông báo kết quả |
| data | [MessageIdResponseDTO](#schemamessageidresponsedto) | false | none | | Dữ liệu trả về |
EditMessageDto
```json
{
"newContent": "Nội dung tin nhắn đã chỉnh sửa"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ------ | -------- | ------------ | ----- | ------------------------- |
| newContent | string | true | none | | Nội dung mới của tin nhắn |
Error_400_Message_Send_Message_Schema
```json
{
"statusCode": 400,
"message": "Gửi tin nhắn thất bại",
"error": "Thông tin lỗi"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ------ | -------- | ------------ | ----- | ----------- |
| statusCode | number | true | none | | none |
| message | string | true | none | | none |
| error | string | true | none | | none |
GetMediaDto
```json
{
"type": "IMAGE",
"limit": 10,
"cursor": "146ac4dab0fc39dd7bf06ccf"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ------ | ------ | -------- | ------------ | ----- | --------------------------------------------- |
| type | string | true | none | | Loại media muốn lấy |
| limit | number | true | none | | Số lượng media muốn lấy trong một trang |
| cursor | string | false | none | | ID của tin nhắn dùng làm cursor để phân trang |
#### Enum
| Name | Value |
| ---- | ----- |
| type | IMAGE |
| type | VIDEO |
| type | RAW |
Error_401_Message_Send_Message_Schema
```json
{
"statusCode": 401,
"message": "Không có quyền truy cập",
"error": "Thông tin lỗi"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ------ | -------- | ------------ | ----- | ----------- |
| statusCode | number | true | none | | none |
| message | string | true | none | | none |
| error | string | true | none | | none |
RegisterDTO
```json
{
"username": "Tracy94",
"email": "Viola_Crist@gmail.com",
"password": "Abc1!Z46q]",
"role": "USER"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| -------- | ------ | -------- | ------------ | ----- | ---------------------- |
| username | string | true | none | | Tên đăng nhập |
| email | string | true | none | | Địa chỉ email |
| password | string | true | none | | Mật khẩu |
| role | string | true | none | | Vai trò của người dùng |
#### Enum
| Name | Value |
| ---- | ----- |
| role | USER |
| role | ADMIN |
Success_MessageId_Recall_Message_Schema
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"messageId": "c8caf93a3bbf2fabcb83abe5"
}
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | --------------------------------------------------- | -------- | ------------ | ----- | ----------------- |
| statusCode | number | true | none | | HTTP status code |
| message | string | true | none | | Thông báo kết quả |
| data | [MessageIdResponseDTO](#schemamessageidresponsedto) | false | none | | Dữ liệu trả về |
ResendOtpDto
```json
{
"email": "string"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ----- | ------ | -------- | ------------ | ----- | ------------- |
| email | string | true | none | | Email đăng ký |
RegisterResponse
```json
{
"email": "Annalise9@gmail.com",
"isPending": true,
"key": "57958204-0f4a-4c53-889c-802f4dfbc819"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| --------- | ------- | -------- | ------------ | ----- | -------------------------------- |
| email | string | true | none | | Địa chỉ email đã đăng ký |
| isPending | boolean | true | none | | Trạng thái đang chờ xác thực OTP |
| key | string | false | none | | Key |
Error_400_MessageId_Recall_Message_Schema
```json
{
"statusCode": 400,
"message": "Thu hồi tin nhắn thất bại",
"error": "Thông tin lỗi"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ------ | -------- | ------------ | ----- | ----------- |
| statusCode | number | true | none | | none |
| message | string | true | none | | none |
| error | string | true | none | | none |
CheckRegister
```json
{
"key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"email": "Elmore.Block@hotmail.com"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ----- | ------ | -------- | ------------ | ----- | ------------- |
| key | string | true | none | | Key xác thực |
| email | string | true | none | | Email đăng ký |
Success_Auth_Register_Schema
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"email": "Annalise9@gmail.com",
"isPending": true,
"key": "57958204-0f4a-4c53-889c-802f4dfbc819"
}
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ------------------------------------------- | -------- | ------------ | ----- | ----------------- |
| statusCode | number | true | none | | HTTP status code |
| message | string | true | none | | Thông báo kết quả |
| data | [RegisterResponse](#schemaregisterresponse) | false | none | | Dữ liệu trả về |
Error_401_MessageId_Recall_Message_Schema
```json
{
"statusCode": 401,
"message": "Không có quyền truy cập",
"error": "Thông tin lỗi"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ------ | -------- | ------------ | ----- | ----------- |
| statusCode | number | true | none | | none |
| message | string | true | none | | none |
| error | string | true | none | | none |
RegisterOtpVerifyDTO
```json
{
"email": "Emilie43@yahoo.com",
"otp": "1e104c31-4c5e-4606-9270-d0bf28a6d7dd"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ----- | ------ | -------- | ------------ | ----- | ------------- |
| email | string | true | none | | Email đăng ký |
| otp | string | true | none | | Mã OTP |
Error_400_Auth_Register_Schema
```json
{
"statusCode": 400,
"message": "Đăng ký thất bại",
"error": "Thông tin lỗi"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ------ | -------- | ------------ | ----- | ----------- |
| statusCode | number | true | none | | none |
| message | string | true | none | | none |
| error | string | true | none | | none |
Success_MessageId_Delete_Message_Schema
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"messageId": "c8caf93a3bbf2fabcb83abe5"
}
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | --------------------------------------------------- | -------- | ------------ | ----- | ----------------- |
| statusCode | number | true | none | | HTTP status code |
| message | string | true | none | | Thông báo kết quả |
| data | [MessageIdResponseDTO](#schemamessageidresponsedto) | false | none | | Dữ liệu trả về |
LoginDTO
```json
{
"username": "Aryanna_Emmerich",
"password": "Abc1!BA>mf"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| -------- | ------ | -------- | ------------ | ----- | ------------ |
| username | string | false | none | | The username |
| password | string | true | none | | Mật khẩu |
ResendOtpDTO
```json
{
"email": "Shyann78@yahoo.com"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ----- | ------ | -------- | ------------ | ----- | ------------- |
| email | string | true | none | | Email đăng ký |
Error_400_MessageId_Delete_Message_Schema
```json
{
"statusCode": 400,
"message": "Xóa tin nhắn thất bại",
"error": "Thông tin lỗi"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ------ | -------- | ------------ | ----- | ----------- |
| statusCode | number | true | none | | none |
| message | string | true | none | | none |
| error | string | true | none | | none |
ForgotPasswordDTO
```json
{
"email": "Bell.Runolfsson@gmail.com"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ----- | ------ | -------- | ------------ | ----- | ----------- |
| email | string | true | none | | Email |
Success_Auth_Resend_Otp_Schema
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"email": "Shyann78@yahoo.com"
}
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ----------------------------------- | -------- | ------------ | ----- | ----------------- |
| statusCode | number | true | none | | HTTP status code |
| message | string | true | none | | Thông báo kết quả |
| data | [ResendOtpDTO](#schemaresendotpdto) | false | none | | Dữ liệu trả về |
Error_401_MessageId_Delete_Message_Schema
```json
{
"statusCode": 401,
"message": "Không có quyền truy cập",
"error": "Thông tin lỗi"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ------ | -------- | ------------ | ----- | ----------- |
| statusCode | number | true | none | | none |
| message | string | true | none | | none |
| error | string | true | none | | none |
ResetPasswordDTO
```json
{
"newPassword": "Abc1!uL/Tb"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ----------- | ------ | -------- | ------------ | ----- | ------------ |
| newPassword | string | true | none | | Mật khẩu mới |
Error_400_Auth_Resend_Otp_Schema
```json
{
"statusCode": 400,
"message": "Gửi OTP thất bại",
"error": "Thông tin lỗi"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | ------ | -------- | ------------ | ----- | ----------- |
| statusCode | number | true | none | | none |
| message | string | true | none | | none |
| error | string | true | none | | none |
UpdateProfileDTO
```json
{
"name": "string",
"phone": "0912345678",
"bio": "string",
"gender": "M",
"avatar": "string",
"birthday": "string"
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| -------- | -------------- | -------- | ------------ | ----- | -------------------------- |
| name | string | false | none | | Tên đầy đủ |
| phone | string | false | none | | Số điện thoại |
| bio | string | false | none | | Tiểu sử |
| gender | string | false | none | | Giới tính |
| avatar | string(binary) | false | none | | Ảnh đại diện (file upload) |
| birthday | string | false | none | | Ngày sinh (định dạng ISO) |
#### Enum
| Name | Value |
| ------ | ----- |
| gender | M |
| gender | F |
Success_MessageId_Forward_Message_Schema
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {
"messageId": "c8caf93a3bbf2fabcb83abe5"
}
}
```
### Attribute
| Name | Type | Required | Restrictions | Title | Description |
| ---------- | --------------------------------------------------- | -------- | ------------ | ----- | ----------------- |
| statusCode | number | true | none | | HTTP status code |
| message | string | true | none | | Thông báo kết quả |
| data | [MessageIdResponseDTO](#schemamessageidresponsedto) | false | none | | Dữ liệu trả về |
UpdatePasswordDTO
```json
{
"currentPassword": "Abc1!lSuccess_Auth_Is_Register_Schema
```json
{
"statusCode": 200,
"message": "Thành công",
"data": {}
}
```
### Attribute
| Name | Type | Require