Skip to content

Commit

Permalink
Merge pull request #244 from icey-yu/fix-app
Browse files Browse the repository at this point in the history
feat: notification doc
  • Loading branch information
skiffer-git authored Jan 8, 2025
2 parents 459c3f2 + 4089be2 commit f533df3
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 52 deletions.
35 changes: 22 additions & 13 deletions docs/restapi/apis/userManagement/addNotificationAccount.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
sidebar_position: 13
title: 增加系统通知号
title: 增加系统号
hide_title: true
---

<center>

## 增加系统通知号
## 增加系统号

</center>

### 简要描述

- 增加系统通知号,管理员可以以系统通知号身份发送通知消息。
- 增加系统号,管理员可以以系统号身份发送通知消息。
- 系统号**无法获取token**

### 请求方式

Expand All @@ -35,23 +35,31 @@ hide_title: true
{
"userID": "userID",
"nickName": "notification1",
"faceURL": "url"
"faceURL": "url",
"appMangerLevel": 3
}
```

| 字段名 | 选填 | 类型 | 说明 |
| :------- | :--- | :----- | -------------- |
| userID | 选填 | string | 系统通知号 ID |
| nickName | 必填 | string | 系统通知号昵称 |
| faceURL | 必填 | string | 系统通知号头像 |
| 字段名 | 选填 | 类型 | 说明 |
| :------------- | :--- | :----- | ------------------------------------------------ |
| userID | 选填 | string | 系统号 ID |
| nickName | 必填 | string | 系统号昵称 |
| faceURL | 必填 | string | 系统号头像 |
| appMangerLevel | 必填 | int | [系统号类型](docs/restapi/commonFields.mdx) |

### 成功返回示例

```json
{
"errCode": 0,
"errMsg": "",
"errDlt": ""
"errCode": 0,
"errMsg": "",
"errDlt": "",
"data": {
"userID": "userID",
"faceURL": "url",
"nickName": "notification1",
"appMangerLevel": 3
}
}
```

Expand All @@ -62,6 +70,7 @@ hide_title: true
| errCode | int | 错误码,0 表示成功 |
| errMsg | string | 错误简要信息,为空 |
| errDlt | errDlt | 错误详细信息,为空 |
| data | object | 系统号信息 |

### 失败返回示例

Expand Down
42 changes: 23 additions & 19 deletions docs/restapi/apis/userManagement/searchNotificationAccount.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
---
sidebar_position: 12
title: 获取系统通知号
title: 获取系统号
hide_title: true
---

<center>

## 获取系统通知号
## 获取系统号

</center>

### 简要描述

- 管理员可以获取所创建的系统通知号列表,包括 ID、头像和名称。
- 管理员可以获取所创建的系统号列表,包括 ID、头像和名称。

### 请求方式

Expand Down Expand Up @@ -41,12 +40,12 @@ hide_title: true
}
```

| 字段名 | 选填 | 类型 | 说明 |
| :-------------------- | :--- | :----- | ----------------------------------------------------------- |
| keyword | 选填 | string | 填写 userID 或 nickname,不填时默认返回对应分页的系统通知号 |
| pagination | 必填 | object | 分页参数结构体 |
| pagination.pageNumber | 必填 | int | 当前页码,从 1 开始 |
| pagination.showNumber | 必填 | int | 当前页请求数量 |
| 字段名 | 选填 | 类型 | 说明 |
| :-------------------- | :--- | :----- | ------------------------------------------------------- |
| keyword | 选填 | string | 填写 userID 或 nickname,不填时默认返回对应分页的系统号 |
| pagination | 必填 | object | 分页参数结构体 |
| pagination.pageNumber | 必填 | int | 当前页码,从 1 开始 |
| pagination.showNumber | 必填 | int | 当前页请求数量 |

### 成功返回示例

Expand All @@ -61,22 +60,26 @@ hide_title: true
{
"userID": "1974356875",
"faceURL": "url",
"nickName": "notification1111111"
"nickName": "notification1111111",
"appMangerLevel": 3
},
{
"userID": "8719627904",
"faceURL": "",
"nickName": "notification1"
"nickName": "notification1",
"appMangerLevel": 3
},
{
"userID": "4208409642",
"faceURL": "",
"nickName": "notification1"
"nickName": "notification1",
"appMangerLevel": 3
},
{
"userID": "2776836221",
"faceURL": "",
"nickName": "notification1"
"nickName": "robot",
"appMangerLevel": 4
}
]
}
Expand All @@ -91,11 +94,12 @@ hide_title: true
| errMsg | string | 错误简要信息,为空 |
| errDlt | errDlt | 错误详细信息,为空 |
| data | object | 通用数据对象,具体结构见下方 |
| total | int | 系统通知号总数 |
| notificationAccounts | array | 系统通知号列表 |
| userID | string | 系统通知号 ID |
| faceURL | string | 系统通知号头像 |
| nickName | string | 系统通知号名称 |
| total | int | 系统号总数 |
| notificationAccounts | array | 系统号列表 |
| userID | string | 系统号 ID |
| faceURL | string | 系统号头像 |
| nickName | string | 系统号名称 |
| appMangerLevel | int | [系统号类型](docs/restapi/commonFields.mdx) |

### 失败返回示例

Expand Down
16 changes: 8 additions & 8 deletions docs/restapi/apis/userManagement/updateNotificationAccount.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
sidebar_position: 16
title: 修改系统通知号信息
title: 修改系统号信息
hide_title: true
---

<center>

## 修改系统通知号信息
## 修改系统号信息

</center>

### 简要描述

- 修改系统通知号信息,包括头像和名称。
- 修改系统号信息,包括头像和名称。

### 请求方式

Expand All @@ -39,11 +39,11 @@ hide_title: true
}
```

| 字段名 | 选填 | 类型 | 说明 |
| :------- | :--- | :----- | -------------- |
| userID | 必填 | string | 系统通知号 ID |
| nickName | 必填 | string | 系统通知号名称 |
| faceURL | 必填 | string | 系统通知号头像 |
| 字段名 | 选填 | 类型 | 说明 |
| :------- | :--- | :----- | ---------- |
| userID | 必填 | string | 系统号 ID |
| nickName | 必填 | string | 系统号名称 |
| faceURL | 必填 | string | 系统号头像 |

### 成功返回示例

Expand Down
25 changes: 13 additions & 12 deletions docs/restapi/commonFields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ title: 常用字段说明

## 通用字段说明

| 字段名 | 类型 | 字符串长度限制 | 说明 | 取值说明 |
| -------------- | ------ | -------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| secret | string | 32 | OpenIM 秘钥,服务端 config/share.yml 的 secret 字段 | 字符串 |
| platformID | int | | 用户登录时的终端类型 | 1:iOS,2:Android,3:Windows,4:OSX,5:WEB,6:小程序,7:linux,8:AndroidPad,9:IPad,10:Admin|
| userID | string | 64 | 用户 ID,保证 IM 内唯一 | 字符串 |
| nickname | string | 255 | 昵称 | 字符串 |
| faceURL | string | 255 | 头像URL | URL 链接 |
| ex | string | 1024 | 扩展字段,可自行扩展,建议封装成 JSON 字符串 | 字符串/JSON |
| operationID | string | | 操作 ID,用于定位问题,保持唯一,建议用当前时间、随机数和 userID | 字符串 |
| operatorUserID | string | 64 | 操作者,具体含义视上下文而定 | 字符串 |
| groupID | string | 64 | 群 ID ,保证 IM 内唯一 | 字符串 |
| sessionType | int | | 会话类型 | 1:单聊,3:群聊,4:系统通知 |
| 字段名 | 类型 | 字符串长度限制 | 说明 | 取值说明 |
| -------------- | ------ | -------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| secret | string | 32 | OpenIM 秘钥,服务端 config/share.yml 的 secret 字段 | 字符串 |
| platformID | int | | 用户登录时的终端类型 | 1:iOS,2:Android,3:Windows,4:OSX,5:WEB,6:小程序,7:linux,8:AndroidPad,9:IPad,10:Admin |
| userID | string | 64 | 用户 ID,保证 IM 内唯一 | 字符串 |
| nickname | string | 255 | 昵称 | 字符串 |
| faceURL | string | 255 | 头像URL | URL 链接 |
| ex | string | 1024 | 扩展字段,可自行扩展,建议封装成 JSON 字符串 | 字符串/JSON |
| operationID | string | | 操作 ID,用于定位问题,保持唯一,建议用当前时间、随机数和 userID | 字符串 |
| operatorUserID | string | 64 | 操作者,具体含义视上下文而定 | 字符串 |
| groupID | string | 64 | 群 ID ,保证 IM 内唯一 | 字符串 |
| sessionType | int | | 会话类型 | 1:单聊,3:群聊,4:系统通知 |
| appMangerLevel | int | | 系统号类型 | 3:系统通知号;4:机器人账号; |

## PublicUserInfo

Expand Down

0 comments on commit f533df3

Please sign in to comment.