/** * Per-language translation content for an item. */ export interface ItemTranslation { name?: string; simpleDescription?: string; description?: ItemDescriptionField[]; } /** Localized name entry */ export interface ItemName { language: string; value: string; } /** Localized description entry */ export interface ItemDescription { language: string; value: string; } /** Key-value attribute pair */ export interface ItemAttribute { key: string; value: string; } export interface Item { id: string; name: string; visible: boolean; priority: number; quantity: number; price: number; discount: number; currency: string; imgs: string[]; tags: string[]; badges?: string[]; colour?: string; size?: string; simpleDescription: string; description: ItemDescriptionField[]; subcategoryId: string; names?: ItemName[]; descriptions?: ItemDescription[]; attributes?: ItemAttribute[]; comments?: Comment[]; /** Optional translations keyed by language code: { ru: { name: '...', simpleDescription: '...', description: [...] } } */ translations?: { [lang: string]: ItemTranslation }; } export interface ItemDescriptionField { key: string; value: string; } export interface Comment { id: string; text: string; createdAt: Date; author?: string; stars?: number; } export interface ItemsListResponse { items: Item[]; total: number; page: number; limit: number; hasMore: boolean; }