export type BrandFont = { name: string; source: 'google' | 'custom'; weights: string[]; files: { [weight: string]: string; }; }; export type RecursivePartial = { [P in keyof T]?: T[P] extends (...args: any[]) => any ? T[P] : T[P] extends readonly (infer U)[] ? ReadonlyArray> : T[P] extends (infer U)[] ? RecursivePartial[] : T[P] extends object ? RecursivePartial : T[P]; }; export type BaseBrandKit = { colors: { primary: string; secondary: string; accent: string; background: { base: string; elevated: string; }; neutral: { light: string; mid: string; dark: string; }; status: { success: string; warning: string; error: string; info?: string; }; text: { onPrimary: string; primary: string; secondary: string; tertiary: string; }; }; }; export type TemplateVersion = { version: number; template: { mainView?: Record; cartView?: Record; }; createdAt: string; createdBy?: string; description?: string; }; export type LayoutConfig = { template?: { mainView?: Record; cartView?: Record; }; plugins?: { type: 'REMOTE'; url: string; pluginParams?: Record; }[]; templateHistory?: TemplateVersion[]; currentVersion?: number; }; export type BrandKit = BaseBrandKit & { fonts: { brand: string; heading?: string; body?: string; }; fontFamilies?: { stylesheet: string; }[]; ordering?: { app: { category: 'HORIZONTAL' | 'VERTICAL'; items: 'LIST' | 'GRID'; singleCategory: boolean; brandkitOverride?: RecursivePartial; }; kiosk: { category: 'HORIZONTAL' | 'VERTICAL'; singleCategory: boolean; brandkitOverride?: RecursivePartial; showSubItemAsRadioIfPossible?: boolean; }; }; layout?: { app?: LayoutConfig; kiosk?: LayoutConfig; }; }; export type BrandkitOverrideBy = 'app' | 'kiosk'; export type ApplyBrandKitOptions = { overrideBy?: BrandkitOverrideBy; }; export type FdoMetadata = { type: 'BUSINESS' | 'RESTAURANT'; country: string; pwaConfig: { short_name: string; name: string; background_color: string; theme_color: string; }; brandkit: BrandKit | null; };