refactor: 拆分品牌业务类型与页面方案
CI / Static checks (push) Has been cancelled
CI / Production build (push) Has been cancelled
CI / API integration (push) Has been cancelled
CI / Taro builds (acheng-campus-food) (push) Has been cancelled
CI / Taro builds (atelier-solopreneur) (push) Has been cancelled
CI / Taro builds (linjing-editorial) (push) Has been cancelled
CI / Browser regression (push) Has been cancelled
CI / Static checks (push) Has been cancelled
CI / Production build (push) Has been cancelled
CI / API integration (push) Has been cancelled
CI / Taro builds (acheng-campus-food) (push) Has been cancelled
CI / Taro builds (atelier-solopreneur) (push) Has been cancelled
CI / Taro builds (linjing-editorial) (push) Has been cancelled
CI / Browser regression (push) Has been cancelled
This commit is contained in:
1 parent
f02e2cafbb
commit
0d9f4a7d6f
86 files changed
+4111
-1543
No files matched your search
@@ -2,9 +2,11 @@ import type { RequestFn } from "../client/request.js";
|
||||
import type {
|
||||
AdminBrandMember,
|
||||
AdminBrandMembership,
|
||||
BrandCreationOptions,
|
||||
BrandPresentationUpdate,
|
||||
BrandProfile,
|
||||
BrandReleaseSummary,
|
||||
CreateBrandInput,
|
||||
MiniAppReleaseTask,
|
||||
MiniAppReleaseSettings,
|
||||
BrandUpdate,
|
||||
@@ -13,6 +15,11 @@ import type {
|
||||
export interface BrandMethods {
|
||||
getAdminBrand(): Promise<BrandProfile>;
|
||||
listAdminBrands(): Promise<AdminBrandMembership[]>;
|
||||
getAdminBrandCreationOptions(): Promise<BrandCreationOptions>;
|
||||
createAdminBrand(body: CreateBrandInput): Promise<{
|
||||
role: string;
|
||||
brand: AdminBrandMembership["brand"];
|
||||
}>;
|
||||
switchAdminBrand(
|
||||
brandId: string,
|
||||
): Promise<{ role: string; brand: AdminBrandMembership["brand"] }>;
|
||||
@@ -74,6 +81,8 @@ export function brandMethods({ request }: { request: RequestFn }): BrandMethods
|
||||
return {
|
||||
getAdminBrand: () => request("/admin/config/brand"),
|
||||
listAdminBrands: () => request("/admin/brands"),
|
||||
getAdminBrandCreationOptions: () => request("/admin/brands/creation-options"),
|
||||
createAdminBrand: (body) => request("/admin/brands", { method: "POST", body }),
|
||||
switchAdminBrand: (brandId) =>
|
||||
request(`/admin/brands/${encodeURIComponent(brandId)}/switch`, { method: "POST" }),
|
||||
listAdminMembers: () => request("/admin/brands/members"),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { BrandTemplateKey, RuntimeWorkspace } from "@personal-brand/types";
|
||||
import type { RequestFn } from "../client/request.js";
|
||||
import type { BrandProfile } from "../types/brand.js";
|
||||
import type { BrandPageSchemeOptions, BrandProfile } from "../types/brand.js";
|
||||
import type { CapabilityWithMetadata } from "../types/capability.js";
|
||||
import type { BrandFieldDefinition } from "../types/field.js";
|
||||
import type { Offering } from "../types/offering.js";
|
||||
@@ -8,6 +8,7 @@ import type { AdminTemplateContent } from "../types/template.js";
|
||||
import type { BrandTemplateDefinition } from "../types/template-definition.js";
|
||||
|
||||
export interface TemplateMethods {
|
||||
getAdminPageSchemeOptions(): Promise<BrandPageSchemeOptions>;
|
||||
listAdminTemplatePackages(params?: {
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
@@ -310,6 +311,7 @@ export interface TemplatePackageImportResult {
|
||||
|
||||
export function templateMethods({ request }: { request: RequestFn }): TemplateMethods {
|
||||
return {
|
||||
getAdminPageSchemeOptions: () => request("/admin/workspace/template/options"),
|
||||
listAdminTemplatePackages: (params = {}) => {
|
||||
const query = [
|
||||
params.page === undefined ? null : `page=${encodeURIComponent(String(params.page))}`,
|
||||
|
||||
Reference in new issue
Block a user