UNPKG

backsplash-app

Version:
132 lines (119 loc) 2.68 kB
/** * Shared types for wallpapers */ /** * Wallpaper metadata */ export interface Wallpaper { key: string; size: number; last_modified: string; etag: string; } /** * Response from wallpapers API */ export interface WallpapersResponse { wallpapers: Wallpaper[]; is_truncated: boolean; next_token: string | null; } /** * Raw response from wallpaper generation API */ export interface WallpaperGenerationRawResponse { filename: string; object_key: string; style: string; metadata?: WallpaperMetadata; } /** * Response from wallpaper generation API */ export interface WallpaperGenerationResponse { filename: string; objectKey: string; style: string; metadata?: WallpaperMetadata; } /** * Response from wallpaper upscale API */ export interface WallpaperUpscaleResponse { filename: string; object_key: string; model_provider: string; imageUrl?: string; metadata?: WallpaperMetadata; } /** * Response from IPC wallpaper service generation success */ export interface WallpaperServiceGenerationResponse { success: boolean; imageUrl: string; metadata: WallpaperMetadata; objectKey: string; } /** * Response from IPC wallpaper service generation failure */ export interface WallpaperServiceGenerationFailure { success: false; error: string; } /** * Response from IPC wallpaper service upscale success */ export interface WallpaperServiceUpscaleResponse { success: boolean; objectKey?: string; imageUrl?: string; error?: string; } /** * Location data for wallpaper generation */ export interface WallpaperLocationData { city: string; state: string; country: string; local_time_str: string; } /** * Metadata stored in the wallpaper image */ export interface WallpaperMetadata { style: string; created_at: string; prompt: string; original_prompt: string; custom_style?: string; location?: { city: string; state: string; country: string; temperature: number; local_time: string; }; upscaled?: boolean; upscale_date?: string; } // Define the wallpaper history entry interface export interface WallpaperHistoryEntry { key: string; upscaledImageUrl: string; originalImageUrl: string; imageUrl?: string; setAt: string; // Timestamp when wallpaper was set (ISO string) metadata?: WallpaperMetadata; // Optional metadata from the wallpaper isUpscaled?: boolean; // Whether this is an upscaled version } export interface WallpaperData { objectKey: string; upscaledImageUrl: string | null; originalImageUrl: string; style: string; generatedAt: string; // Changed from number to string (ISO format) metadata?: WallpaperMetadata; }