feat(admin): add MindSpace SEO/GEO controls and template catalog page
Expose SEO/GEO switches on the MindSpace config form and add template catalog management UI wired to shared Memind modules. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -62,6 +62,8 @@ import type {
|
||||
WechatWebNotification,
|
||||
MindSearchConfig,
|
||||
MindSearchServiceTestResult,
|
||||
AdminTemplateCatalogItem,
|
||||
AdminTemplateCatalogPatch,
|
||||
} from '../types';
|
||||
import type {
|
||||
OrchestratorCanaryReadiness,
|
||||
@@ -1432,3 +1434,25 @@ export async function fetchImageQuotaLedger(params: {
|
||||
totalPages: number;
|
||||
}>(`/admin-api/image-quota/ledger${q.toString() ? `?${q}` : ''}`);
|
||||
}
|
||||
|
||||
export async function fetchAdminTemplateCatalog(): Promise<AdminTemplateCatalogItem[]> {
|
||||
const result = await portalFetch<{ items: AdminTemplateCatalogItem[] }>('/admin-api/template-catalog');
|
||||
return result.items ?? [];
|
||||
}
|
||||
|
||||
export async function updateAdminTemplateCatalogItem(
|
||||
skillName: string,
|
||||
patch: AdminTemplateCatalogPatch,
|
||||
): Promise<{ ok: boolean; item?: AdminTemplateCatalogItem }> {
|
||||
return portalFetch(`/admin-api/template-catalog/${encodeURIComponent(skillName)}`, {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify(patch),
|
||||
});
|
||||
}
|
||||
|
||||
export async function grantUserPageTemplate(userId: string, skillName: string) {
|
||||
return portalFetch<{ ok: boolean; skillName: string; grantedSkills?: string[] }>(
|
||||
`/admin-api/users/${encodeURIComponent(userId)}/template-grants/${encodeURIComponent(skillName)}`,
|
||||
{ method: 'POST' },
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user