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:
Alireza Hassani
2026-08-10 00:19:13 +03:30
co-authored by Cursor
parent 158523df7b
commit 953b87b616
32 changed files with 3326 additions and 138 deletions
@@ -8,11 +8,13 @@ import {
BusinessSettings,
DEFAULT_BUSINESS_DASHBOARD_LOCALE,
DEFAULT_BUSINESS_SETTINGS,
DEFAULT_BUSINESS_THEME_MODE,
DEFAULT_ENABLED_BUSINESS_MODULES,
DEFAULT_HOME_CHARTS,
DEFAULT_ORDER_PROCESS_STEPS,
HOME_CHART_IDS,
type DashboardLocale,
type DashboardThemeMode,
type HomeChartId,
OrderProcessStep,
} from './business-settings.types';
@@ -68,6 +70,12 @@ export function normalizeDashboardLocale(value: unknown): DashboardLocale {
return value === 'en' || value === 'fa' ? value : DEFAULT_BUSINESS_DASHBOARD_LOCALE;
}
export function normalizeDashboardThemeMode(value: unknown): DashboardThemeMode {
return value === 'dark' || value === 'light'
? value
: DEFAULT_BUSINESS_THEME_MODE;
}
function readBoolean(value: unknown, fallback: boolean) {
return typeof value === 'boolean' ? value : fallback;
}
@@ -122,6 +130,7 @@ export function normalizeBusinessSettings(raw: unknown): BusinessSettings {
branding: {
primaryColor: normalizeBusinessPrimaryColorId(branding.primaryColor),
defaultLocale: normalizeDashboardLocale(branding.defaultLocale),
themeMode: normalizeDashboardThemeMode(branding.themeMode),
},
dashboard: {
comments: {
@@ -166,6 +175,7 @@ export function mergeBusinessSettings(
patch.branding?.primaryColor ?? current.branding.primaryColor,
defaultLocale:
patch.branding?.defaultLocale ?? current.branding.defaultLocale,
themeMode: patch.branding?.themeMode ?? current.branding.themeMode,
},
dashboard: {
comments: {