export interface Photo { photo?: string; video?: string; url: string; type?: string; } export interface DescriptionField { key: string; value: string; } export interface Comment { id?: string; text: string; author?: string; stars?: number; createdAt?: string; } export interface ItemTranslation { name?: string; simpleDescription?: string; description?: DescriptionField[]; } export interface Review { rating?: number; content?: string; userID?: string; answer?: string; timestamp?: string; } /** @deprecated Use {@link Review} instead */ export type Callback = Review; export interface Question { question: string; answer: string; upvotes: number; downvotes: number; } export interface Item { categoryID: number; itemID: number; name: string; photos: Photo[] | null; description: string; currency: string; price: number; discount: number; remainings?: string; rating: number; callbacks: Review[] | null; questions: Question[] | null; partnerID?: string; quantity?: number; // BackOffice API fields id?: string; visible?: boolean; priority?: number; imgs?: string[]; tags?: string[]; badges?: string[]; simpleDescription?: string; descriptionFields?: DescriptionField[]; subcategoryId?: string; translations?: Record; comments?: Comment[]; } export interface CartItem extends Item { quantity: number; }