Add wechat reminder LLM admin toggle
This commit is contained in:
@@ -38,6 +38,7 @@ import type {
|
||||
WechatBinding,
|
||||
WechatDeliveryLog,
|
||||
WechatDigestSubscription,
|
||||
WechatScheduleLlmConfig,
|
||||
WechatMessage,
|
||||
WechatWebNotification,
|
||||
} from '../types';
|
||||
@@ -254,6 +255,7 @@ export async function getWechatAdminSummary(): Promise<WechatAdminSummary> {
|
||||
bindPath: summary.config?.bindPath ?? null,
|
||||
tokenEndpointConfigured: summary.config?.tokenEndpointConfigured ?? false,
|
||||
customerServiceEndpointConfigured: summary.config?.customerServiceEndpointConfigured ?? false,
|
||||
scheduleLlmEnabled: summary.config?.scheduleLlmEnabled ?? false,
|
||||
},
|
||||
counts: {
|
||||
boundUsers: summary.counts?.boundUsers ?? 0,
|
||||
@@ -268,6 +270,15 @@ export async function getWechatAdminSummary(): Promise<WechatAdminSummary> {
|
||||
};
|
||||
}
|
||||
|
||||
export async function updateWechatScheduleLlmConfig(
|
||||
payload: Pick<WechatScheduleLlmConfig, 'scheduleLlmEnabled'>,
|
||||
): Promise<WechatScheduleLlmConfig> {
|
||||
return portalFetch<WechatScheduleLlmConfig>('/admin-api/wechat/schedule-llm-config', {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
}
|
||||
|
||||
export async function getMindSpaceAdminConfig(): Promise<MindSpaceAdminConfig> {
|
||||
const result = await portalFetch<{ config: MindSpaceAdminConfig }>('/admin-api/mindspace/config');
|
||||
return result.config;
|
||||
|
||||
Reference in New Issue
Block a user