This commit is contained in:
Your Name committed 2026-06-27 23:59:16 -04:00
1 parent 1c0313495f
commit ac387185e0
15 files changed
+1855 -12

No files matched your search

+46
View File
@@ -51,6 +51,51 @@ export interface ProductImage {
export type TranslatableString = string | Record<string, string>;
export interface AttributeDefinitionTranslation {
id: number
attributeDefinitionId: number
langCode: string
label: string
description?: string | null
}
export interface AttributeDefinition {
id: number
code: string
label: TranslatableString
description?: TranslatableString | null
type: 'TEXT' | 'NUMBER' | 'BOOLEAN' | 'SELECT' | 'JSON'
unit?: string | null
options?: TranslatableString[] | null
isRequired: boolean
isFilterable: boolean
sortOrder: number
categoryId?: number | null
category?: Category | null
translations?: AttributeDefinitionTranslation[]
}
export interface ProductAttributeTranslation {
id: number
productAttributeId: number
langCode: string
valueText: string
}
export interface ProductAttribute {
id: number
productId: number
attributeDefinitionId: number
attributeDefinition: AttributeDefinition
valueText?: string | null
valueNumber?: number | null
valueBoolean?: boolean | null
valueJson?: any | null
value?: string | number | boolean | Record<string, any> | null
valueTranslations?: Record<string, string>
translations?: ProductAttributeTranslation[]
}
export interface Product {
id: number
name: TranslatableString
@@ -63,6 +108,7 @@ export interface Product {
options?: Array<{ name: TranslatableString; values: TranslatableString[] }> | null
variants: Variant[]
images: ProductImage[]
attributes?: ProductAttribute[]
}
const DEFAULT_DEV_API_PORT = 3051