import { FluidObject } from "gatsby-image"; export interface ProductMedia { src: string; // TODO fluid: FluidObject; } export enum ProductVariationType { Default = 'Default', Deluxe = 'Deluxe', Premium = 'Premium', Original = 'Original', Superior = 'Superior' } export interface ProductVariation { id: string; title: string; price: number; slug: string; stock: number; media: ProductMedia[]; type: string; } export interface DeliveryTiming { id: string; title: string; leadtime: number; cutOffHour: number; sameDays: boolean[]; days: boolean[]; createdAt: string; updatedAt: string; deletedAt?: string; } export interface DeliveryConfig { deliveryTiming: DeliveryTiming; id: string; flc_id?: number; title: string; default: boolean; merchant: MerchantProduct; region?: string; deliveryCoverage?: DeliveryCoverage[]; deliveryPrice?: DeliveryPricing; holidays?: MerchantHoliday[]; createdAt: string; updatedAt: string; deletedAt?: string; } export interface DeliveryCoverage { id: string; flc_id?: number; title?: string; label?: string; merchant?: MerchantProduct; deliveryZones?: DeliveryZone[]; createdAt: string; updatedAt: string; deletedAt?: string; } export interface MerchantHoliday { id: string; active: boolean; flc_id?: number; title?: string; notes?: string; startAt: string; endAt: string; merchant?: Merchant; createdAt: string; updatedAt: string; deletedAt?: string; } export interface DeliveryPricing { id: string; title?: string; sameDayPrice: number; nextDayPrice?: number; perItemDeliveryFee?: boolean; createdAt: string; updatedAt: string; deletedAt?: string; } export interface DeliveryZone { id: string; title?: string; geoJSON?: any; postalCode: string; radialDistance?: number; radialCentreLat?: number; radialCentreLon?: number; region?: string; createdAt: string; updatedAt: string; deletedAt?: string; } export interface MerchantProduct { id: string; fxId: string; title: string; slug: string; description: string; images: ProductMedia[]; variations: ProductVariation[]; merchant: { title: string }; deliveryConfigs: DeliveryConfig[]; fields: { productData: { id: number; title: string; slug: string; merchant: { title: string }; variations: { title: string; price: string type: string; media: { id: string src: string; } } } } }