x
This commit is contained in:
1 parent
9237c0eded
commit
f5893c3fad
16 files changed
+1230
-114
No files matched your search
@@ -36,6 +36,12 @@ const WEBSITE_PAGE_SECTION_TYPE_LIST = [
|
||||
"CONTACT_FORM",
|
||||
"HERO_V2",
|
||||
"USP_BAR",
|
||||
"HERO_MINIMAL",
|
||||
"HERO_SPLIT_MINIMAL",
|
||||
"HERO_VIDEO_MINIMAL",
|
||||
"BANNER_MINIMAL",
|
||||
"ANNOUNCEMENT_BAR_MINIMAL",
|
||||
"USP_MINIMAL",
|
||||
"CUSTOM",
|
||||
] as const;
|
||||
|
||||
@@ -82,7 +88,7 @@ type BlockMetadata = {
|
||||
recommendedPayload: Record<string, unknown>;
|
||||
};
|
||||
|
||||
const imageUrlExample = "https://elysia3051.kitizone.com/uploads/2b3cca4c-9f68-43c0-982b-097475f9e55f.jpeg";
|
||||
const imageUrlExample = "https://example.com/tenant-image.jpg";
|
||||
const localizedObjectExample = { th: "ข้อความภาษาไทย", en: "English text" };
|
||||
|
||||
const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
@@ -93,7 +99,7 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
renderedFields: ["tagline", "title", "description", "imageUrl", "buttonText", "buttonLink", "focalPoint", "contentWidth", "textColorScheme", "buttonPosition", "mobileButtonPosition", "overlayStyle", "overlayOpacity", "titleSize"],
|
||||
storedOnlyFields: [],
|
||||
discoveryToolsNeeded: [],
|
||||
warnings: ["Use an image URL from a host allowed by apps/website next.config.ts."],
|
||||
warnings: ["Replace sample image URLs with this tenant's approved media URLs before writing. The website must allow the media host."],
|
||||
minimalPayload: {
|
||||
tagline: localizedObjectExample,
|
||||
title: localizedObjectExample,
|
||||
@@ -122,12 +128,12 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
warnings: ["videoUrl must be a direct MP4 or WebM video link."],
|
||||
minimalPayload: {
|
||||
title: localizedObjectExample,
|
||||
videoUrl: "https://cdn.coverr.co/videos/coverr-essential-oils-and-diffuser-5374/1080p.mp4"
|
||||
videoUrl: "https://example.com/tenant-video.mp4"
|
||||
},
|
||||
recommendedPayload: {
|
||||
tagline: { th: "ภาพยนตร์แห่งกลิ่นหอม", en: "Cinema of Scents" },
|
||||
title: { th: "วิหารแห่งกลิ่นหอม", en: "Pure Botanical Sanctuary" },
|
||||
videoUrl: "https://cdn.coverr.co/videos/coverr-essential-oils-and-diffuser-5374/1080p.mp4",
|
||||
tagline: { th: "เรื่องราวของเรา", en: "Our Story" },
|
||||
title: { th: "สำรวจคอลเลกชัน", en: "Explore the Collection" },
|
||||
videoUrl: "https://example.com/tenant-video.mp4",
|
||||
buttonText: { th: "สำรวจคอลเลกชัน", en: "Discover Collection" },
|
||||
buttonLink: "/shop"
|
||||
}
|
||||
@@ -188,7 +194,7 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
imagePosition: "left",
|
||||
},
|
||||
recommendedPayload: {
|
||||
title: { th: "เรื่องราวของกลิ่นหอม", en: "A Scented Story" },
|
||||
title: { th: "เรื่องราวของเรา", en: "Our Story" },
|
||||
description: { th: "ทดสอบ editorial tile พร้อมรูปและปุ่ม", en: "Testing an editorial tile with image and action." },
|
||||
imageUrl: imageUrlExample,
|
||||
imagePosition: "left",
|
||||
@@ -214,13 +220,13 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
columns: 2,
|
||||
tiles: [
|
||||
{
|
||||
title: { th: "Here Comes The Sun", en: "Here Comes The Sun" },
|
||||
title: { th: "คอลเลกชันฤดูร้อน", en: "Summer Collection" },
|
||||
imageUrl: imageUrlExample,
|
||||
buttonText: { th: "ช้อปเลย", en: "Shop Beach Blossom" },
|
||||
buttonText: { th: "ช้อปเลย", en: "Shop now" },
|
||||
buttonLink: "/shop"
|
||||
},
|
||||
{
|
||||
title: { th: "The Scent Of A New Adventure", en: "The Scent Of A New Adventure" },
|
||||
title: { th: "สิ่งใหม่กำลังมา", en: "Something New Is Coming" },
|
||||
imageUrl: imageUrlExample,
|
||||
buttonText: { th: "ติดตามข่าวสาร", en: "Be The First To Know" },
|
||||
buttonLink: "/shop"
|
||||
@@ -235,7 +241,7 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
renderedFields: ["autoplay", "interval", "aspectRatio", "mobileAspectRatio", "showArrows", "showDots", "backgroundColor", "slides"],
|
||||
storedOnlyFields: [],
|
||||
discoveryToolsNeeded: [],
|
||||
warnings: ["Full-wide edge-to-edge promotional carousel. Default aspect ratio is '21/7' for a sleek Beautrium-style wide ribbon."],
|
||||
warnings: ["Full-wide edge-to-edge promotional carousel. Default aspect ratio is '21/7'."],
|
||||
minimalPayload: {
|
||||
slides: [
|
||||
{ imageUrl: imageUrlExample, linkUrl: "/shop", alt: localizedObjectExample }
|
||||
@@ -253,8 +259,8 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
imageUrl: imageUrlExample,
|
||||
linkUrl: "/shop",
|
||||
alt: { th: "โปรโมชั่นพิเศษ 1", en: "Special Deal 1" },
|
||||
title: { th: "โปรแรงลดสูงสุด [70%]", en: "Mega Sale Up To [70% OFF]" },
|
||||
subtitle: { th: "BEAUTY DEALS", en: "BEAUTY DEALS" },
|
||||
title: { th: "สินค้าแนะนำ", en: "Featured Products" },
|
||||
subtitle: { th: "พบรายการที่น่าสนใจ", en: "Explore the collection" },
|
||||
buttonText: { th: "ช้อปเลย", en: "Shop Now" }
|
||||
}
|
||||
]
|
||||
@@ -370,8 +376,8 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
recommendedPayload: {
|
||||
title: { th: "บทความทดสอบ", en: "Hero article test" },
|
||||
subtitle: { th: "ทดสอบ HERO_ARTICLE block", en: "Testing HERO_ARTICLE block." },
|
||||
author: { th: "ทีม HomAroma", en: "HomAroma Team" },
|
||||
category: { th: "คู่มือกลิ่น", en: "Scent Guide" },
|
||||
author: { th: "ทีมบรรณาธิการ", en: "Editorial Team" },
|
||||
category: { th: "คู่มือ", en: "Guide" },
|
||||
publishDate: "2026-07-24",
|
||||
imageUrl: imageUrlExample,
|
||||
},
|
||||
@@ -386,10 +392,10 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
warnings: ["content may contain HTML and is rendered as CMS-authored rich text."],
|
||||
minimalPayload: { content: localizedObjectExample },
|
||||
recommendedPayload: {
|
||||
title: { th: "เรื่องราวของกลิ่นหอม", en: "The Story of Fragrance" },
|
||||
title: { th: "เรื่องราวของเรา", en: "Our Story" },
|
||||
content: {
|
||||
th: "<p>สำรวจศิลปะแห่งกลิ่นหอมผ่านวัตถุดิบที่คัดสรร</p>",
|
||||
en: "<p>Explore the art of fragrance through carefully selected ingredients.</p>",
|
||||
th: "<p>เรียนรู้เรื่องราวและแนวคิดเบื้องหลังคอลเลกชันนี้</p>",
|
||||
en: "<p>Explore the story and ideas behind this collection.</p>",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -406,14 +412,14 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
],
|
||||
minimalPayload: { body: localizedObjectExample },
|
||||
recommendedPayload: {
|
||||
heading: { th: "ความแม่นยำในทุกฟันสเตอร์", en: "Precision in every sprocket tooth" },
|
||||
heading: { th: "รายละเอียดที่ใส่ใจ", en: "Details that matter" },
|
||||
body: {
|
||||
th: "Fine Blanking ช่วยควบคุมผิวตัดและรูปทรงของฟันสเตอร์ให้สม่ำเสมอ เพื่อการส่งกำลังที่ราบรื่นและแม่นยำ",
|
||||
en: "Fine blanking controls the cut surface and tooth profile for smooth, precise power transmission.",
|
||||
th: "บอกเล่ารายละเอียดสำคัญของสินค้าและสิ่งที่ลูกค้าควรรู้",
|
||||
en: "Describe the product details and what customers should know.",
|
||||
},
|
||||
imageUrl: imageUrlExample,
|
||||
imageAlt: { th: "สเตอร์ที่ผลิตด้วยเทคโนโลยี Fine Blanking", en: "A sprocket made with fine blanking technology" },
|
||||
imageCaption: { th: "ผิวตัดเรียบและรูปทรงสม่ำเสมอ", en: "A smooth cut surface and consistent profile" },
|
||||
imageAlt: { th: "ภาพประกอบรายละเอียดสินค้า", en: "Product detail image" },
|
||||
imageCaption: { th: "รายละเอียดเพิ่มเติม", en: "More details" },
|
||||
imagePosition: "right",
|
||||
width: "standard",
|
||||
background: "default",
|
||||
@@ -429,10 +435,10 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
warnings: ["imageAlt is required whenever imageUrl is provided."],
|
||||
minimalPayload: { title: localizedObjectExample },
|
||||
recommendedPayload: {
|
||||
title: { th: "เทคโนโลยีที่อยู่เบื้องหลังทุกการขับเคลื่อน", en: "Technology behind every ride" },
|
||||
subtitle: { th: "ทำความรู้จักกระบวนการผลิตที่ให้ความสำคัญกับความแม่นยำ", en: "A closer look at precision manufacturing." },
|
||||
category: { th: "เทคโนโลยี", en: "Technology" },
|
||||
author: { th: "ทีมงาน DDC", en: "DDC Team" },
|
||||
title: { th: "เรื่องราวเบื้องหลังสินค้า", en: "The Story Behind the Product" },
|
||||
subtitle: { th: "ทำความรู้จักแนวคิดและรายละเอียดสำคัญ", en: "A closer look at the ideas and details." },
|
||||
category: { th: "เรื่องราว", en: "Stories" },
|
||||
author: { th: "ทีมบรรณาธิการ", en: "Editorial Team" },
|
||||
publishDate: "2026-07-24",
|
||||
},
|
||||
},
|
||||
@@ -451,11 +457,11 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
],
|
||||
},
|
||||
recommendedPayload: {
|
||||
title: { th: "ภาพจากกระบวนการผลิต", en: "Inside the production process" },
|
||||
title: { th: "ภาพประกอบเรื่องราว", en: "Story Gallery" },
|
||||
layout: "grid",
|
||||
images: [
|
||||
{ imageUrl: imageUrlExample, alt: { th: "ขั้นตอนการผลิตชิ้นงาน", en: "Component production" } },
|
||||
{ imageUrl: imageUrlExample, alt: { th: "การตรวจสอบคุณภาพ", en: "Quality inspection" } },
|
||||
{ imageUrl: imageUrlExample, alt: { th: "ภาพประกอบรายการแรก", en: "First story image" } },
|
||||
{ imageUrl: imageUrlExample, alt: { th: "ภาพประกอบรายการที่สอง", en: "Second story image" } },
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -471,8 +477,8 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
recommendedPayload: {
|
||||
title: { th: "ข้อมูลสำคัญ", en: "Key facts" },
|
||||
items: [
|
||||
{ title: { th: "ผิวตัดสม่ำเสมอ", en: "Consistent cut surface" }, description: { th: "ช่วยลดขั้นตอนการแต่งผิว", en: "Reduces secondary finishing." } },
|
||||
{ title: { th: "รูปทรงแม่นยำ", en: "Precise geometry" }, description: { th: "ช่วยให้การขบกับโซ่ต่อเนื่อง", en: "Supports consistent chain engagement." } },
|
||||
{ title: { th: "คุณสมบัติแรก", en: "First feature" }, description: { th: "อธิบายประโยชน์ให้ชัดเจน", en: "Explain the benefit clearly." } },
|
||||
{ title: { th: "คุณสมบัติที่สอง", en: "Second feature" }, description: { th: "เพิ่มรายละเอียดที่เกี่ยวข้อง", en: "Add relevant details." } },
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -486,9 +492,9 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
warnings: ["Use a full HTTPS YouTube, Vimeo, or direct video URL. Do not send embed HTML."],
|
||||
minimalPayload: { videoUrl: "https://www.youtube.com/watch?v=VIDEO_ID" },
|
||||
recommendedPayload: {
|
||||
title: { th: "ชมกระบวนการผลิต", en: "Watch the production process" },
|
||||
title: { th: "ชมเรื่องราว", en: "Watch the Story" },
|
||||
videoUrl: "https://www.youtube.com/watch?v=VIDEO_ID",
|
||||
caption: { th: "เบื้องหลังการผลิตที่แม่นยำ", en: "Behind precision manufacturing" },
|
||||
caption: { th: "รายละเอียดเพิ่มเติมในวิดีโอ", en: "More details in the video" },
|
||||
aspectRatio: "16:9",
|
||||
},
|
||||
},
|
||||
@@ -503,7 +509,7 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
minimalPayload: { items: [{ title: localizedObjectExample }] },
|
||||
recommendedPayload: {
|
||||
title: { th: "แหล่งข้อมูล", en: "References" },
|
||||
items: [{ title: { th: "เอกสารข้อมูลทางเทคนิค", en: "Technical documentation" }, note: { th: "ข้อมูลจากฝ่ายวิศวกรรม", en: "Engineering source material" } }],
|
||||
items: [{ title: { th: "เอกสารอ้างอิง", en: "Reference document" }, note: { th: "ตรวจสอบแหล่งข้อมูลก่อนเผยแพร่", en: "Verify the source before publishing" } }],
|
||||
},
|
||||
},
|
||||
ARTICLE_TABLE: {
|
||||
@@ -520,8 +526,8 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
},
|
||||
recommendedPayload: {
|
||||
title: { th: "ข้อมูลเปรียบเทียบ", en: "Comparison" },
|
||||
columns: [{ th: "คุณสมบัติ", en: "Property" }, { th: "Fine Blanking", en: "Fine blanking" }],
|
||||
rows: [{ label: { th: "ผิวตัด", en: "Cut surface" }, cells: [{ th: "ผิวตัด", en: "Cut surface" }, { th: "เรียบและสม่ำเสมอ", en: "Smooth and consistent" }] }],
|
||||
columns: [{ th: "หัวข้อ", en: "Item" }, { th: "รายละเอียด", en: "Details" }],
|
||||
rows: [{ label: { th: "ตัวอย่าง", en: "Example" }, cells: [{ th: "คุณสมบัติ", en: "Feature" }, { th: "คำอธิบาย", en: "Description" }] }],
|
||||
},
|
||||
},
|
||||
ARTICLE_DOWNLOAD: {
|
||||
@@ -582,9 +588,9 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
warnings: [],
|
||||
minimalPayload: { quote: localizedObjectExample },
|
||||
recommendedPayload: {
|
||||
quote: { th: "กลิ่นหอมคือความทรงจำที่มองไม่เห็น", en: "Fragrance is an invisible memory." },
|
||||
author: { th: "ทีม HomAroma", en: "HomAroma Team" },
|
||||
role: { th: "นักสร้างสรรค์กลิ่น", en: "Scent Creators" },
|
||||
quote: { th: "รายละเอียดเล็ก ๆ สร้างความแตกต่าง", en: "Small details make a difference." },
|
||||
author: { th: "ทีมบรรณาธิการ", en: "Editorial Team" },
|
||||
role: { th: "ผู้เขียน", en: "Author" },
|
||||
},
|
||||
},
|
||||
PRODUCT_CAROUSEL: {
|
||||
@@ -599,7 +605,7 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
recommendedPayload: {
|
||||
type: "featured",
|
||||
title: { th: "สินค้าที่คัดสรร", en: "Featured Products" },
|
||||
description: { th: "กลิ่นหอมยอดนิยมที่เราเลือกให้คุณ", en: "Popular fragrances selected for you." },
|
||||
description: { th: "รายการที่คัดสรรสำหรับคุณ", en: "Selected items for you." },
|
||||
limit: 4,
|
||||
showPrice: true,
|
||||
showAddToCart: true,
|
||||
@@ -622,10 +628,10 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
recommendedPayload: {
|
||||
title: { th: "คำถามที่พบบ่อย", en: "Frequently Asked Questions" },
|
||||
categories: [{
|
||||
name: { th: "การเลือกกลิ่น", en: "Choosing a Scent" },
|
||||
name: { th: "การเลือกสินค้า", en: "Choosing a Product" },
|
||||
questions: [{
|
||||
q: { th: "ควรเริ่มอย่างไร", en: "How should I start?" },
|
||||
a: { th: "เริ่มจากโน้ตกลิ่นที่คุณชอบ", en: "Start with notes you already enjoy." },
|
||||
a: { th: "เริ่มจากคุณสมบัติที่ต้องการ", en: "Start with the features you need." },
|
||||
}],
|
||||
}],
|
||||
},
|
||||
@@ -637,18 +643,18 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
renderedFields: ["title", "address", "email", "line", "hours"],
|
||||
storedOnlyFields: [],
|
||||
discoveryToolsNeeded: [],
|
||||
warnings: [],
|
||||
warnings: ["Replace sample contact details with the active tenant's verified address, email, LINE ID, and business hours before writing."],
|
||||
minimalPayload: {
|
||||
address: localizedObjectExample,
|
||||
email: "hello@homaroma.shop",
|
||||
line: "@homaroma",
|
||||
email: "hello@example.com",
|
||||
line: "@your-line-id",
|
||||
hours: localizedObjectExample,
|
||||
},
|
||||
recommendedPayload: {
|
||||
title: { th: "ติดต่อเรา", en: "Contact Us" },
|
||||
address: { th: "กรุงเทพมหานคร ประเทศไทย", en: "Bangkok, Thailand" },
|
||||
email: "hello@homaroma.shop",
|
||||
line: "@homaroma",
|
||||
email: "hello@example.com",
|
||||
line: "@your-line-id",
|
||||
hours: { th: "ทุกวัน 10:00-18:00 น.", en: "Daily, 10:00 AM-6:00 PM" },
|
||||
},
|
||||
},
|
||||
@@ -677,8 +683,8 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
minimalPayload: { title: localizedObjectExample, imageUrl: imageUrlExample },
|
||||
recommendedPayload: {
|
||||
tagline: { th: "คอลเลกชันใหม่", en: "New Collection" },
|
||||
title: { th: "กลิ่นหอมที่บอกเล่าตัวตน", en: "A Fragrance That Tells Your Story" },
|
||||
description: { th: "ค้นพบกลิ่นที่เข้ากับช่วงเวลาของคุณ", en: "Discover a scent for your moment." },
|
||||
title: { th: "เรื่องราวในแบบของคุณ", en: "Your Story, Your Way" },
|
||||
description: { th: "ค้นพบสิ่งที่เหมาะกับคุณ", en: "Discover what works for you." },
|
||||
imageUrl: imageUrlExample,
|
||||
contentAlignment: "left",
|
||||
showOrnament: true,
|
||||
@@ -706,6 +712,101 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
],
|
||||
},
|
||||
},
|
||||
HERO_MINIMAL: {
|
||||
type: "HERO_MINIMAL",
|
||||
requiredFields: ["imageUrl", "title"],
|
||||
optionalFields: ["tagline", "focalPoint", "contentAlignment", "overlayOpacity", "titleSize"],
|
||||
renderedFields: ["imageUrl", "title", "tagline", "focalPoint", "contentAlignment", "overlayOpacity"],
|
||||
storedOnlyFields: ["titleSize"],
|
||||
discoveryToolsNeeded: [],
|
||||
warnings: ["titleSize is accepted by the backend but is not used by apps/website HeroMinimalSection."],
|
||||
minimalPayload: { imageUrl: imageUrlExample, title: localizedObjectExample },
|
||||
recommendedPayload: {
|
||||
imageUrl: imageUrlExample,
|
||||
title: { th: "เรื่องราวของเรา", en: "Our Story" },
|
||||
tagline: { th: "สำรวจเพิ่มเติม", en: "Explore More" },
|
||||
contentAlignment: "center",
|
||||
overlayOpacity: 20,
|
||||
},
|
||||
},
|
||||
HERO_SPLIT_MINIMAL: {
|
||||
type: "HERO_SPLIT_MINIMAL",
|
||||
requiredFields: ["imageUrl", "title"],
|
||||
optionalFields: ["subtitle", "imagePosition", "focalPoint", "backgroundColor", "titleSize"],
|
||||
renderedFields: ["imageUrl", "title", "subtitle", "imagePosition", "focalPoint", "backgroundColor"],
|
||||
storedOnlyFields: ["titleSize"],
|
||||
discoveryToolsNeeded: [],
|
||||
warnings: ["titleSize is accepted by the backend but is not used by apps/website HeroSplitMinimalSection."],
|
||||
minimalPayload: { imageUrl: imageUrlExample, title: localizedObjectExample },
|
||||
recommendedPayload: {
|
||||
imageUrl: imageUrlExample,
|
||||
title: { th: "แรงบันดาลใจจากธรรมชาติ", en: "Inspired by Nature" },
|
||||
subtitle: { th: "สิ่งที่เลือกสรรสำหรับคุณ", en: "Selected for you" },
|
||||
imagePosition: "right",
|
||||
},
|
||||
},
|
||||
HERO_VIDEO_MINIMAL: {
|
||||
type: "HERO_VIDEO_MINIMAL",
|
||||
requiredFields: ["videoUrl"],
|
||||
optionalFields: ["posterImageUrl", "tagline", "title", "overlayOpacity", "height", "focalPoint", "titleSize"],
|
||||
renderedFields: ["videoUrl", "posterImageUrl", "tagline", "title", "overlayOpacity", "height", "focalPoint"],
|
||||
storedOnlyFields: ["titleSize"],
|
||||
discoveryToolsNeeded: [],
|
||||
warnings: ["videoUrl should point to an MP4 or WebM file. titleSize is accepted by the backend but is not used by apps/website HeroVideoMinimalSection."],
|
||||
minimalPayload: { videoUrl: "https://example.com/hero.mp4" },
|
||||
recommendedPayload: {
|
||||
videoUrl: "https://example.com/hero.mp4",
|
||||
title: { th: "บรรยากาศแห่งความสงบ", en: "A Moment of Calm" },
|
||||
posterImageUrl: imageUrlExample,
|
||||
height: "large",
|
||||
},
|
||||
},
|
||||
BANNER_MINIMAL: {
|
||||
type: "BANNER_MINIMAL",
|
||||
requiredFields: ["title"],
|
||||
optionalFields: ["subtitle", "imageUrl", "linkUrl", "backgroundColor", "textColor", "focalPoint"],
|
||||
renderedFields: ["title", "subtitle", "imageUrl", "linkUrl", "backgroundColor", "textColor", "focalPoint"],
|
||||
storedOnlyFields: [],
|
||||
discoveryToolsNeeded: [],
|
||||
warnings: [],
|
||||
minimalPayload: { title: localizedObjectExample },
|
||||
recommendedPayload: {
|
||||
title: { th: "สำรวจคอลเลกชัน", en: "Explore the Collection" },
|
||||
subtitle: { th: "ค้นหาสิ่งที่ใช่สำหรับคุณ", en: "Find what fits you" },
|
||||
linkUrl: "/shop",
|
||||
},
|
||||
},
|
||||
ANNOUNCEMENT_BAR_MINIMAL: {
|
||||
type: "ANNOUNCEMENT_BAR_MINIMAL",
|
||||
requiredFields: ["slides"],
|
||||
optionalFields: ["backgroundColor", "textColor", "speed"],
|
||||
renderedFields: ["slides", "backgroundColor", "textColor", "speed"],
|
||||
storedOnlyFields: [],
|
||||
discoveryToolsNeeded: [],
|
||||
warnings: [],
|
||||
minimalPayload: { slides: [localizedObjectExample] },
|
||||
recommendedPayload: {
|
||||
slides: [{ th: "ค้นพบรายการใหม่", en: "Discover Something New" }],
|
||||
speed: 4000,
|
||||
},
|
||||
},
|
||||
USP_MINIMAL: {
|
||||
type: "USP_MINIMAL",
|
||||
requiredFields: ["items"],
|
||||
optionalFields: ["separator", "backgroundColor", "textColor"],
|
||||
renderedFields: ["items", "separator", "backgroundColor", "textColor"],
|
||||
storedOnlyFields: [],
|
||||
discoveryToolsNeeded: [],
|
||||
warnings: ["items is an array of localized strings, not USP_BAR objects with icons."],
|
||||
minimalPayload: { items: [localizedObjectExample] },
|
||||
recommendedPayload: {
|
||||
items: [
|
||||
{ th: "วัตถุดิบคัดสรร", en: "Selected Ingredients" },
|
||||
{ th: "ใส่ใจทุกรายละเอียด", en: "Made with Care" },
|
||||
],
|
||||
separator: "dot",
|
||||
},
|
||||
},
|
||||
CUSTOM: {
|
||||
type: "CUSTOM",
|
||||
requiredFields: ["componentId"],
|
||||
@@ -722,11 +823,11 @@ const PAGE_BLOCK_METADATA: Record<string, BlockMetadata> = {
|
||||
componentId: "BakeryCategories",
|
||||
props: {
|
||||
title: { th: "เลือกตามบรรยากาศ", en: "Shop by Mood" },
|
||||
subtitle: { th: "ค้นหากลิ่นที่เหมาะกับคุณ", en: "Find a scent that suits you." },
|
||||
subtitle: { th: "ค้นหาสินค้าที่เหมาะกับคุณ", en: "Find what suits you." },
|
||||
layout: "horizontal",
|
||||
items: [{
|
||||
title: { th: "ผ่อนคลาย", en: "Relax" },
|
||||
description: { th: "กลิ่นนุ่มนวลสำหรับวันสบาย", en: "Soft scents for quiet days." },
|
||||
description: { th: "ตัวเลือกสำหรับทุกวัน", en: "An option for every day." },
|
||||
href: "/shop",
|
||||
icon: "leaf",
|
||||
}],
|
||||
@@ -850,7 +951,7 @@ const ADD_PAGE_SECTION_GUIDANCE: Record<string, { required: string[]; example: s
|
||||
},
|
||||
CONTACT_INFO: {
|
||||
required: ["address", "email", "line", "hours"],
|
||||
example: `{ "title": ${localizedStringExample}, "address": ${localizedStringExample}, "email": "hello@example.com", "line": "@homaroma", "hours": ${localizedStringExample} }`
|
||||
example: `{ "title": ${localizedStringExample}, "address": ${localizedStringExample}, "email": "hello@example.com", "line": "@your-line-id", "hours": ${localizedStringExample} }`
|
||||
},
|
||||
CONTACT_FORM: {
|
||||
required: [],
|
||||
@@ -1180,7 +1281,7 @@ const SECTION_TOOL_CONFIGS = [
|
||||
{
|
||||
name: "update_contact_info",
|
||||
sectionType: "CONTACT_INFO",
|
||||
description: `Update a CONTACT_INFO section. This tool performs a partial update/merge (PATCH). Omitted fields are preserved. The 'sectionId' argument correlates to the 'id' field in the fetched payload. title is optional and localized. address and hours are localized text. email and line are plain strings. Example payload: { "sectionId": 72, "title": ${localizedStringExample}, "address": ${localizedStringExample}, "email": "hello@example.com", "line": "@homaroma", "hours": ${localizedStringExample} }`,
|
||||
description: `Update a CONTACT_INFO section. This tool performs a partial update/merge (PATCH). Omitted fields are preserved. The 'sectionId' argument correlates to the 'id' field in the fetched payload. title is optional and localized. address and hours are localized text. email and line are plain strings. Replace sample contact values with the active tenant's verified details. Example payload: { "sectionId": 72, "title": ${localizedStringExample}, "address": ${localizedStringExample}, "email": "hello@example.com", "line": "@your-line-id", "hours": ${localizedStringExample} }`,
|
||||
properties: {
|
||||
sectionId: { type: "number", description: "The numeric ID of the section to update" },
|
||||
title: { ...localizedStringSchema, description: `Localized section title, for example ${localizedStringExample}` },
|
||||
|
||||
Reference in new issue
Block a user