Add public user-products storefront API and website docs.
Expose published customer listings under /tenants/:host/user-products (list, search, details, technical-info) and document them in the website API pack. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
158523df7b
commit
953b87b616
@@ -5,10 +5,16 @@ export type DashboardLocale = 'en' | 'fa';
|
||||
|
||||
export const DEFAULT_BUSINESS_DASHBOARD_LOCALE: DashboardLocale = 'fa';
|
||||
|
||||
export type DashboardThemeMode = 'light' | 'dark';
|
||||
|
||||
export const DEFAULT_BUSINESS_THEME_MODE: DashboardThemeMode = 'light';
|
||||
|
||||
export type BrandingSettings = {
|
||||
primaryColor: BusinessPrimaryColorId;
|
||||
/** Default UI language for business + customer dashboards. */
|
||||
defaultLocale: DashboardLocale;
|
||||
/** Dashboard surface theme (neutral light/dark). Independent of primary brand color. */
|
||||
themeMode: DashboardThemeMode;
|
||||
};
|
||||
|
||||
export type DashboardCommentsSettings = {
|
||||
@@ -38,8 +44,8 @@ export type StoreSettings = {
|
||||
orderProcessSteps: OrderProcessStep[];
|
||||
};
|
||||
|
||||
/** Optional CMS modules a business can have. Always-on areas (customers, website, etc.) are not listed. */
|
||||
export const BUSINESS_MODULE_IDS = [
|
||||
/** Optional business-dashboard CMS modules. Always-on areas (customers, website, etc.) are not listed. */
|
||||
export const BUSINESS_DASHBOARD_MODULE_IDS = [
|
||||
'products',
|
||||
'store',
|
||||
'portfolio',
|
||||
@@ -48,6 +54,18 @@ export const BUSINESS_MODULE_IDS = [
|
||||
'videos',
|
||||
] as const;
|
||||
|
||||
/** Optional customer-dashboard modules. Always-on: home, profile, addresses, orders, favorites. */
|
||||
export const CUSTOMER_MODULE_IDS = ['customer_products'] as const;
|
||||
|
||||
/** All optional modules stored in `settings.modules.enabled`. */
|
||||
export const BUSINESS_MODULE_IDS = [
|
||||
...BUSINESS_DASHBOARD_MODULE_IDS,
|
||||
...CUSTOMER_MODULE_IDS,
|
||||
] as const;
|
||||
|
||||
export type BusinessDashboardModuleId =
|
||||
(typeof BUSINESS_DASHBOARD_MODULE_IDS)[number];
|
||||
export type CustomerModuleId = (typeof CUSTOMER_MODULE_IDS)[number];
|
||||
export type BusinessModuleId = (typeof BUSINESS_MODULE_IDS)[number];
|
||||
|
||||
/** Home dashboard chart types (super-admin selectable). */
|
||||
@@ -102,9 +120,12 @@ export const DEFAULT_ORDER_PROCESS_STEPS: OrderProcessStep[] = [
|
||||
},
|
||||
];
|
||||
|
||||
/** Existing tenants without `settings.modules` keep every module enabled. */
|
||||
/**
|
||||
* Existing tenants without `settings.modules` keep every business-dashboard module
|
||||
* enabled. Customer modules stay opt-in.
|
||||
*/
|
||||
export const DEFAULT_ENABLED_BUSINESS_MODULES: BusinessModuleId[] = [
|
||||
...BUSINESS_MODULE_IDS,
|
||||
...BUSINESS_DASHBOARD_MODULE_IDS,
|
||||
];
|
||||
|
||||
export const DEFAULT_HOME_CHARTS: [HomeChartId, HomeChartId] = [
|
||||
@@ -116,6 +137,7 @@ export const DEFAULT_BUSINESS_SETTINGS: BusinessSettings = {
|
||||
branding: {
|
||||
primaryColor: DEFAULT_BUSINESS_PRIMARY_COLOR_ID,
|
||||
defaultLocale: DEFAULT_BUSINESS_DASHBOARD_LOCALE,
|
||||
themeMode: DEFAULT_BUSINESS_THEME_MODE,
|
||||
},
|
||||
dashboard: {
|
||||
comments: { autoApprove: false },
|
||||
|
||||
Reference in New Issue
Block a user