/** * Images Module * * Fetches images for activities using a priority chain based on preferStock: * * 1. Google Places Photos (for venues with placeId) * 2. If preferStock=false: try mediaKey first (generic activity = use curated image) * 3. Stock photos via image.stock query (Pexels, then Pixabay) * 4. If preferStock=true: try mediaKey as fallback (specific query failed) * 5. Category default (from media library) * * Returns null if no image found. * * ⚠️ LEGAL NOTICE: OpenGraph/scraped images are NOT used here. * OG images can ONLY be used for inline link previews (shown with the URL). * Using them as activity images = republishing = copyright infringement. * See project_docs/IMAGES.md for full licensing rules. */ import type { ResponseCache } from '../caching/types'; import type { GeocodedActivity } from '../types/place-lookup'; import type { ImageFetchConfig, ImageResult, ImageSource } from './types'; export { fetchGooglePlacesPhoto } from './google-places'; export { buildImageUrl, findCategoryFallbackImage, findObjectImage, IMAGE_SIZES, type ImageSize, loadMediaIndex, type MediaIndexOptions } from './media-index'; export { fetchPexelsImage } from './pexels'; export { fetchPixabayImage } from './pixabay'; export { filterPixabayImages, type PixabayImageCandidate, type PixabayImageMatch } from './pixabay-filter'; export type { ImageFetchConfig, ImageMeta, ImageMetadata, ImageResult, ImageSource } from './types'; export { fetchWikipediaImage } from './wikipedia'; export { filterWikipediaImages, type WikipediaImageCandidate, type WikipediaImageMatch } from './wikipedia-filter'; export { hasAllowedLicense, isLicenseAllowed, type LicenseCheckResult } from './wikipedia-license'; /** * Fetch an image for a single activity. * * Tries sources based on preferStock flag: * 1. Google Places (venue with placeId) * 2. If preferStock=false: try mediaKey first * 3. Stock photos (Pexels, then Pixabay) using image.stock query * 4. If preferStock=true: try mediaKey as fallback * 5. Category default * * Returns null if no image found from any source. * * NOTE: Scraped OG images are intentionally NOT used here. * OG images can only be displayed as link previews within message context. */ export declare function fetchImageForActivity(activity: GeocodedActivity, config: ImageFetchConfig, cache: ResponseCache): Promise; /** * Check if we should display attribution for the given source and license. * * REQUIRED (legal/TOS requirement): * - Google Places (per Google TOS) * - Wikipedia with CC-BY or CC-BY-SA licenses * * APPRECIATED (we show it, but not legally required): * - Pexels (appreciated, link back to photographer) * - Unsplash (standard license) * - Pixabay * * NOT SHOWN: * - Unsplash+ (extended license, no attribution needed) * - Wikipedia CC0 or Public Domain * - User uploads */ export declare function shouldShowAttribution(source: ImageSource, license?: string): boolean; /** * Clear cached media index (useful for testing). */ export declare function clearMediaIndexCache(): void; /** * Fetch images for multiple activities. * * Returns a map of activityId → ImageResult (or null if no image found). * Uses activityId (not messageId) because compound activities can create * multiple activities from a single message. */ export declare function fetchImagesForActivities(activities: readonly GeocodedActivity[], config: ImageFetchConfig, cache: ResponseCache, options?: { onProgress?: (current: number, total: number) => void; }): Promise>; //# sourceMappingURL=index.d.ts.map