Expose website tags and badges via business settings and business-info.

Stores custom meta tags and eNamad/Samandehi footer HTML in settings so storefronts can render them from the public API.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-10-03 18:07:13 +03:30
co-authored by Cursor
parent cffc828328
commit 63ae9b22b9
10 changed files with 354 additions and 0 deletions
@@ -127,6 +127,37 @@ export type WebsiteSettings = {
sitemapConfig?: WebsiteSitemapConfig | null;
/** Site-wide Schema.org Organization / LocalBusiness settings (Phase A). */
schema: WebsiteSchemaSettings;
/** Custom <meta> tags + eNamad / Samandehi trust badges. */
tagsAndBadges: WebsiteTagsAndBadgesSettings;
};
/** Custom head meta tag (name + content). Present = published. */
export type WebsiteMetaTag = {
id: string;
name: string;
content: string;
};
/** Fixed trust integrations (eNamad / Samandehi) — footer HTML only. */
export type WebsiteTrustBadgeSettings = {
/** Footer widget HTML; empty = not shown. */
embedHtml: string;
};
export type WebsiteTagsAndBadgesSettings = {
metaTags: WebsiteMetaTag[];
enamad: WebsiteTrustBadgeSettings;
samandehi: WebsiteTrustBadgeSettings;
};
export const DEFAULT_WEBSITE_TRUST_BADGE: WebsiteTrustBadgeSettings = {
embedHtml: '',
};
export const DEFAULT_WEBSITE_TAGS_AND_BADGES: WebsiteTagsAndBadgesSettings = {
metaTags: [],
enamad: { ...DEFAULT_WEBSITE_TRUST_BADGE },
samandehi: { ...DEFAULT_WEBSITE_TRUST_BADGE },
};
/** Schema.org @type for the site-wide entity JSON-LD. */
@@ -381,6 +412,11 @@ export const DEFAULT_BUSINESS_SETTINGS: BusinessSettings = {
website: {
specialProductsSource: 'store_item',
schema: { ...DEFAULT_WEBSITE_SCHEMA_SETTINGS },
tagsAndBadges: {
metaTags: [],
enamad: { ...DEFAULT_WEBSITE_TRUST_BADGE },
samandehi: { ...DEFAULT_WEBSITE_TRUST_BADGE },
},
},
sms: {
senderNumber: null,