Skip to content

Commit

Permalink
Merge pull request #187 from tttao7/develop
Browse files Browse the repository at this point in the history
feat: 新增 微信客服账号 / 微信客服接待人员 / 获取加入企业二维码 / 客户群opengid转换
  • Loading branch information
xen0n authored Jan 2, 2024
2 parents 8fc66d7 + 20c7f3d commit a92c991
Show file tree
Hide file tree
Showing 11 changed files with 740 additions and 17 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CI 会在 `go1.17` 和 Go 的当前稳定版本、上一个稳定版本上跑测

* [x] 通讯录管理 (**部分支持**,见下)
* [x] 客户联系 (**大部分支持**,见下)
* [ ] 微信客服
* [x] 微信客服 (**部分支持**,见下)
* [ ] 应用管理
* [x] 消息发送 (全部支持)
* [x] 消息接收
Expand All @@ -97,7 +97,7 @@ CI 会在 `go1.17` 和 Go 的当前稳定版本、上一个稳定版本上跑测
- [x] userid与openid互换
- [ ] 二次验证
- [ ] 邀请成员
- [ ] 获取加入企业二维码
- [x] 获取加入企业二维码
- [x] 手机号获取userid
- [x] 邮箱获取userid
- [ ] 获取成员ID列表
Expand Down Expand Up @@ -144,7 +144,7 @@ CI 会在 `go1.17` 和 Go 的当前稳定版本、上一个稳定版本上跑测
* [x] 客户群管理
- [x] 获取客户群列表
- [x] 获取客户群详情
- [ ] 客户群opengid转换
- [x] 客户群opengid转换
* [x] 在职继承
- [x] 分配在职成员的客户
- [x] 查询客户接替状态
Expand Down Expand Up @@ -181,16 +181,16 @@ CI 会在 `go1.17` 和 Go 的当前稳定版本、上一个稳定版本上跑测
<details>
<summary>微信客服 API</summary>

* [ ] 客服账号管理
- [ ] 添加客服账号
- [ ] 删除客服账号
- [ ] 修改客服账号
- [ ] 获取客服账号列表
- [ ] 获取客服账号链接
* [ ] 接待人员管理
- [ ] 添加接待人员
- [ ] 删除接待人员
- [ ] 获取接待人员列表
* [x] 客服账号管理
- [x] 添加客服账号
- [x] 删除客服账号
- [x] 修改客服账号
- [x] 获取客服账号列表
- [x] 获取客服账号链接
* [x] 接待人员管理
- [x] 添加接待人员
- [x] 删除接待人员
- [x] 获取接待人员列表
* [ ] 会话分配与消息收发
- [ ] 分配客服会话
- [ ] 接收消息和事件
Expand Down
140 changes: 140 additions & 0 deletions apis.md.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions docs/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Name|Request Type|Response Type|Access Token|URL|Doc
`execConvertOpenIDToUserID`|`reqConvertOpenIDToUserID`|`respConvertOpenIDToUserID`|+|`POST /cgi-bin/user/convert_to_userid`|[openid转userid](https://work.weixin.qq.com/api/doc#90000/90135/90202)
`execUserAuthSucc`|TODO|TODO|+|`GET /cgi-bin/user/authsucc`|[二次验证](https://work.weixin.qq.com/api/doc#90000/90135/90203)
`execUserBatchInvite`|TODO|TODO|+|`POST /cgi-bin/batch/invite`|[邀请成员](https://work.weixin.qq.com/api/doc#90000/90135/90975)
`execUserJoinQrcode`|`reqUserJoinQrcode`|`respUserJoinQrcode`|+|`GET /cgi-bin/corp/get_join_qrcode`|[获取加入企业二维码](https://developer.work.weixin.qq.com/document/path/91714)
`execUserIDByMobile`|`reqUserIDByMobile`|`respUserIDByMobile`|+|`POST /cgi-bin/user/getuserid`|[手机号获取userid](https://work.weixin.qq.com/api/doc/90001/90143/91693)
`execUserIDByEmail`|`reqUserIDByEmail`|`respUserIDByEmail`|+|`POST /cgi-bin/user/get_userid_by_email`|[邮箱获取userid](https://developer.work.weixin.qq.com/document/path/95895)

Expand Down Expand Up @@ -209,6 +210,7 @@ Name|Request Type|Response Type|Access Token|URL|Doc
:---|------------|-------------|------------|:--|:--
`execGroupChatListGet`|`reqGroupChatList`|`respGroupChatList`|+|`POST /cgi-bin/externalcontact/groupchat/list`|[获取客户群列表](https://developer.work.weixin.qq.com/document/path/92120)
`execGroupChatInfoGet`|`reqGroupChatInfo`|`respGroupChatInfo`|+|`POST /cgi-bin/externalcontact/groupchat/get`|[获取客户群详细](https://developer.work.weixin.qq.com/document/path/92122)
`execConvertOpenGIDToChatID`|`reqConvertOpenGIDToChatID`|`respConvertOpenGIDToChatID`|+|`POST /cgi-bin/externalcontact/opengid_to_chatid`|[客户群opengid转换](https://developer.work.weixin.qq.com/document/path/94822)

# 在职继承

Expand All @@ -235,3 +237,26 @@ Name|Request Type|Response Type|Access Token|URL|Doc
:---|------------|-------------|------------|:--|:--
`execAddMsgTemplate`|`reqAddMsgTemplateExternalContact`|`respAddMsgTemplateExternalContact`|+|`POST /cgi-bin/externalcontact/add_msg_template`|[创建企业群发](https://developer.work.weixin.qq.com/document/path/92135)
`execSendWelcomeMsg`|`reqSendWelcomeMsgExternalContact`|`respSendWelcomeMsgExternalContact`|+|`POST /cgi-bin/externalcontact/send_welcome_msg`|[发送新客户欢迎语](https://developer.work.weixin.qq.com/document/path/92137)


# 微信客服 - 客服账号管理

## API calls

Name|Request Type|Response Type|Access Token|URL|Doc
:---|------------|-------------|------------|:--|:--
`execKfAccountCreate`|`reqKfAccountCreate`|`respKfAccountCreate`|+|`POST /cgi-bin/kf/account/add`|[添加客服账号](https://developer.work.weixin.qq.com/document/path/94662)
`execKfAccountUpdate`|`reqKfAccountUpdate`|`respKfAccountUpdate`|+|`POST /cgi-bin/kf/account/update`|[修改客服账号](https://developer.work.weixin.qq.com/document/path/94664)
`execKfAccountDelete`|`reqKfAccountDelete`|`respKfAccountDelete`|+|`GET /cgi-bin/kf/account/del`|[删除客服账号](https://developer.work.weixin.qq.com/document/path/94663)
`execKfAccountList`|`reqKfAccountList`|`respKfAccountList`|+|`GET /cgi-bin/kf/account/list`|[获取客服账号列表](https://developer.work.weixin.qq.com/document/path/94661)
`execAddKfContact`|`reqAddKfContact`|`respAddKfContact`|+|`POST /cgi-bin/kf/add_contact_way`|[获取客服账号链接](https://developer.work.weixin.qq.com/document/path/94665)

# 微信客服 - 接待人员管理

## API calls

Name|Request Type|Response Type|Access Token|URL|Doc
:---|------------|-------------|------------|:--|:--
`execKfServicerCreate`|`reqKfServicerCreate`|`respKfServicerCreate`|+|`POST /cgi-bin/kf/servicer/add`|[添加接待人员](https://developer.work.weixin.qq.com/document/path/94646)
`execKfServicerDelete`|`reqKfServicerDelete`|`respKfServicerDelete`|+|`POST /cgi-bin/kf/servicer/del`|[删除接待人员](https://developer.work.weixin.qq.com/document/path/94647)
`execKfServicerList`|`reqKfServicerList`|`respKfServicerList`|+|`GET /cgi-bin/kf/servicer/list`|[获取接待人员列表](https://developer.work.weixin.qq.com/document/path/94645)
31 changes: 31 additions & 0 deletions docs/kf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 客服

## Models

### `KfAccount` 客服账号

Name | JSON | Type | Doc
:------------------|:-----------------------------|:---------|:---------------------------------------------------------
`OpenKfID` | `open_kfid` | `string` | 客服账号ID
`Name` | `name` | `string` | 客服名称
`Avatar` | `avatar` | `string` | 客服头像URL
`ManagePrivilege` | `manage_privilege,omitempty` | `bool` | 当前调用接口的应用身份,是否有该客服账号的管理权限(编辑客服账号信息、分配会话和收发消息)。组件应用不返回此字段

### `KfServicer` 客服接待人员

Name | JSON | Type | Doc
:---------------|:--------------------------|:---------|:--------------------------------------------
`UserID` | `userid,omitempty` | `string` | 接待人员的userid。第三方应用获取到的为密文userid,即open_userid
`Status` | `status` | `int` | 接待人员的接待状态。0:接待中,1:停止接待。
`StopType` | `stop_type` | `int` | 接待人员的接待状态为「停止接待」的子类型。0:停止接待,1:暂时挂起
`DepartmentID` | `department_id,omitempty` | `int64` | 接待人员部门的id

### `KfServicerResult` 客户群列表数据

Name | JSON | Type | Doc
:---------------|:--------------------------|:---------|:------------
`UserID` | `userid,omitempty` | `string` | 接待人员的userid
`DepartmentID` | `department_id,omitempty` | `int64` | 接待人员部门的id
`ErrCode` | `errcode` | `int64` | 该条记录的结果
`ErrMsg` | `errmsg` | `string` | 结果信息

1 change: 1 addition & 0 deletions dummy_for_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package workwx
//go:generate go run --tags sdkcodegen ./internal/sdkcodegen ./docs/chat_info.md ./chat_info.md.go
//go:generate go run --tags sdkcodegen ./internal/sdkcodegen ./docs/dept_info.md ./dept_info.md.go
//go:generate go run --tags sdkcodegen ./internal/sdkcodegen ./docs/external_contact.md ./external_contact.md.go
//go:generate go run --tags sdkcodegen ./internal/sdkcodegen ./docs/kf.md ./kf.md.go
//go:generate go run --tags sdkcodegen ./internal/sdkcodegen ./docs/user_info.md ./user_info.md.go
//go:generate go run --tags sdkcodegen ./internal/sdkcodegen ./docs/oa.md ./oa.md.go
//go:generate go run --tags sdkcodegen ./internal/sdkcodegen ./docs/rx_msg.md ./rx_msg.md.go
Expand Down
Loading

0 comments on commit a92c991

Please sign in to comment.