add wxwork kf account management functionality

This commit is contained in:
mlogclub
2026-04-27 11:43:34 +08:00
parent 9a82a3ea52
commit 12f66bcf27
5 changed files with 162 additions and 14 deletions
+11
View File
@@ -185,6 +185,13 @@ export type AdminChannel = {
remark: string
}
export type WxWorkKFAccount = {
openKfId: string
name: string
avatar: string
managePrivilege: boolean
}
export type CreateAdminChannelPayload = {
channelType: string
aiAgentId: number
@@ -557,6 +564,10 @@ export function fetchChannel(id: number) {
return request<AdminChannel>(`/api/dashboard/channel/${id}`)
}
export function fetchWxWorkKFAccounts() {
return request<WxWorkKFAccount[]>("/api/dashboard/channel/wxwork/kf/accounts")
}
export function createChannel(payload: CreateAdminChannelPayload) {
return request<AdminChannel>("/api/dashboard/channel/create", {
method: "POST",