feat: 支持小程序上传配置加密存储

This commit is contained in:
que01 committed 2026-10-13 17:28:40 +08:00
1 parent 526a9db789
commit 3d0252d187
10 files changed
+257 -12

No files matched your search

+6
View File
@@ -16,6 +16,7 @@ export type {
BrandReleaseSummary,
BrandUpdate,
} from "./types/brand.js";
export type { MiniAppReleaseSettings, MiniAppReleaseTask } from "./types/brand.js";
export type { CapabilityInstallation } from "./types/capability.js";
export type { CapabilityMetadata } from "./types/capability.js";
export type { ApiErrorBody } from "./types/common.js";
@@ -220,6 +221,11 @@ export class ApiClient
updateAdminMiniAppReleaseStatus = (
...arguments_: Parameters<BrandMethods["updateAdminMiniAppReleaseStatus"]>
) => this.resources.brand.updateAdminMiniAppReleaseStatus(...arguments_);
getAdminMiniAppSettings = (...arguments_: Parameters<BrandMethods["getAdminMiniAppSettings"]>) =>
this.resources.brand.getAdminMiniAppSettings(...arguments_);
updateAdminMiniAppSettings = (
...arguments_: Parameters<BrandMethods["updateAdminMiniAppSettings"]>
) => this.resources.brand.updateAdminMiniAppSettings(...arguments_);
getPublicTemplate = (...arguments_: Parameters<TemplateMethods["getPublicTemplate"]>) =>
this.resources.template.getPublicTemplate(...arguments_);
listPublicTemplates = (...arguments_: Parameters<TemplateMethods["listPublicTemplates"]>) =>
@@ -6,6 +6,7 @@ import type {
BrandProfile,
BrandReleaseSummary,
MiniAppReleaseTask,
MiniAppReleaseSettings,
BrandUpdate,
} from "../types/brand.js";
@@ -74,6 +75,12 @@ export interface BrandMethods {
weappUploadId?: string;
},
): Promise<MiniAppReleaseTask>;
getAdminMiniAppSettings(): Promise<MiniAppReleaseSettings>;
updateAdminMiniAppSettings(body: {
appId?: string;
artifactPath?: string;
privateKey?: string;
}): Promise<MiniAppReleaseSettings>;
}
export function brandMethods({ request }: { request: RequestFn }): BrandMethods {
@@ -125,5 +132,8 @@ export function brandMethods({ request }: { request: RequestFn }): BrandMethods
method: "PATCH",
body,
}),
getAdminMiniAppSettings: () => request("/admin/miniapp-releases/settings"),
updateAdminMiniAppSettings: (body) =>
request("/admin/miniapp-releases/settings", { method: "PATCH", body }),
};
}
+8
View File
@@ -59,6 +59,14 @@ export interface MiniAppReleaseTask {
updatedAt: string;
}
export interface MiniAppReleaseSettings {
appId: string;
artifactPath: string;
build: Record<string, unknown>;
credential: { algorithm: string } | null;
hasStoredCredentials: boolean;
}
export type BrandPresentationUpdate = Partial<
Record<
"identity" | "home" | "offerings" | "detail" | "profile" | "inquiry" | "success" | "records",