import { S as SEOFasterConfig, a as SEOFasterClient } from './types-2c-alqW2.mjs'; /** * Configuration for static params generator */ interface StaticParamsGeneratorConfig extends SEOFasterConfig { /** * Locales to generate params for * @example ['en', 'de', 'fr'] */ locales: string[]; /** * Fallback locale when articles aren't available in a specific locale * Articles from this locale will be used as fallback * @default 'en' */ fallbackLocale?: string; /** * Batch size for paginated fetching (to avoid timeout on large datasets) * @default 100 */ batchSize?: number; /** * Delay in milliseconds between batch API requests to avoid rate limiting (429) * @default 200 */ batchDelay?: number; /** * Maximum pages to pre-generate for paginated blog list * @default 10 */ maxPaginatedPages?: number; /** * Articles per page for paginated blog list * @default 12 */ articlesPerPage?: number; /** * Generation mode (B.4): * 'full' — fetch all articles at build (pre-renders every slug). Best for * small catalogs; build time grows with the catalog. * 'hybrid' — pre-render only the newest `prerenderLimit` slugs per locale * at build; the long tail is generated on-demand. Pair with * `dynamicParams: true` + `revalidate = false`. Recommended for * large catalogs: important pages are warm immediately after a * deploy (Vercel wipes the ISR cache per deploy), build time * stays bounded, and the tail still resolves on first visit. * 'empty' — return [] / empty maps synchronously without backend calls. * Pair with `dynamicParams: true` + `revalidate = false`. Every * slug renders on first request after each deploy (no warm set). * @default 'full' */ mode?: 'full' | 'hybrid' | 'empty'; /** * Hybrid mode only: max number of newest slugs to pre-render per locale at * build. The remaining articles are generated on-demand. Ignored unless * `mode === 'hybrid'` (or a per-call `limit` is passed to `blogArticle`). * @default 100 */ prerenderLimit?: number; } /** * Result type for blog article static params */ interface BlogArticleParam { locale: string; slug: string; } /** * Result type for blog paginated static params */ interface BlogPaginatedParam { locale: string; page: string; } /** * Result type for blog list static params */ interface BlogListParam { locale: string; } /** * Create a static params generator for complete static generation of blog pages. * Fetches ALL articles (not just first 100) using paginated requests. * * This enables `dynamicParams: false` in your pages, ensuring: * - Zero Vercel Fluid CPU usage for cached pages * - 404 for non-existent slugs (no runtime generation) * - All pages pre-built at deploy time * * @example * ```typescript * // lib/static-params.ts * import { createStaticParamsGenerator } from '@codepark-apps/seofaster-nextjs/static'; * * export const staticParams = createStaticParamsGenerator({ * apiKey: process.env.SEOFASTER_SECRET_KEY!, * locales: ['en', 'de', 'fr'], * fallbackLocale: 'en', * }); * * // app/[locale]/blog/[slug]/page.tsx * export const dynamicParams = false; * export const generateStaticParams = staticParams.blogArticle; * ``` */ declare function createStaticParamsGenerator(config: StaticParamsGeneratorConfig): { blogArticle: (opts?: { limit?: number; category?: string; }) => Promise; blogList: () => Promise; blogPaginated: () => Promise; getAllSlugs: () => Promise>; /** * Access the underlying client for advanced use cases */ _client: SEOFasterClient; /** * Configuration used to create this generator */ _config: StaticParamsGeneratorConfig; }; /** * Type for the static params generator */ type StaticParamsGenerator = ReturnType; export { type BlogArticleParam, type BlogListParam, type BlogPaginatedParam, type StaticParamsGenerator, type StaticParamsGeneratorConfig, createStaticParamsGenerator };