This commit is contained in:
Your Name committed 2026-06-23 20:02:29 -04:00
1 parent ed69a4b840
commit 992335a52b
22 files changed
+1064 -346

No files matched your search

+11 -5
View File
@@ -1,6 +1,6 @@
import { z } from "zod";
export interface Scent {
export interface Brand {
id: number
name: string
description?: string | null
@@ -19,8 +19,13 @@ export interface Category {
export interface Variant {
id: number
size: string
sku?: string | null
barcode?: string | null
price: number | null
stock?: number
option1: string
option2: string
option3: string
bomItems?: BomItem[]
}
@@ -54,7 +59,8 @@ export interface Product {
price: number | null
categoryId: number
category: Category
scent: Scent
brand: Brand
options?: Array<{ name: string; values: string[] }> | null
variants: Variant[]
images: ProductImage[]
}
@@ -264,8 +270,8 @@ export type CategoriesSectionPayload = z.infer<typeof CategoriesSectionPayloadSc
export const ProductsSectionPayloadSchema = z.object({
title: LocalizedStringSchema,
subtitle: LocalizedStringSchema.optional(),
type: z.enum(['featured', 'scent', 'custom']),
scentId: z.number().optional(),
type: z.enum(['featured', 'brand', 'custom']),
brandId: z.number().optional(),
productIds: z.array(z.number()).optional(),
limit: z.number().optional(),
layout: z.enum(['grid', 'carousel']).optional(),