refactor: 统一模板契约并修复预览版本
This commit is contained in:
1 parent
cd2992c00a
commit
50b87e48de
56 files changed
+7849
-5756
No files matched your search
@@ -27,20 +27,6 @@ export interface BrandMethods {
|
||||
id: string,
|
||||
body: Partial<Pick<AdminBrandMember, "role" | "isEnabled">>,
|
||||
): Promise<AdminBrandMember>;
|
||||
getAdminVisualTemplatePreview(): Promise<{
|
||||
current: {
|
||||
key: string;
|
||||
version: string;
|
||||
name: string;
|
||||
theme: { colors: Record<string, string> };
|
||||
variants: Record<string, string>;
|
||||
} | null;
|
||||
available: string[];
|
||||
}>;
|
||||
getAdminVisualTemplateHistory(): Promise<{
|
||||
history: Array<{ visualTemplateKey: string; savedAt: string }>;
|
||||
}>;
|
||||
rollbackAdminVisualTemplate(): Promise<{ visualTemplateKey: string; rolledBack: boolean }>;
|
||||
updateAdminBrand(body: BrandUpdate): Promise<BrandProfile>;
|
||||
updateAdminBrandPresentation(body: BrandPresentationUpdate): Promise<{
|
||||
visualPresentation: Record<string, Record<string, string>>;
|
||||
@@ -97,10 +83,6 @@ export function brandMethods({ request }: { request: RequestFn }): BrandMethods
|
||||
method: "PATCH",
|
||||
body,
|
||||
}),
|
||||
getAdminVisualTemplatePreview: () => request("/admin/config/visual-template/preview"),
|
||||
getAdminVisualTemplateHistory: () => request("/admin/config/visual-template/history"),
|
||||
rollbackAdminVisualTemplate: () =>
|
||||
request("/admin/config/visual-template/rollback", { method: "POST" }),
|
||||
updateAdminBrand: (body) => request("/admin/config/brand", { method: "PATCH", body }),
|
||||
updateAdminBrandPresentation: (body) =>
|
||||
request("/admin/config/presentation", { method: "PATCH", body }),
|
||||
|
||||
Reference in new issue
Block a user