UNPKG

@ai-growth/nextjs

Version:

Seamlessly integrate Sanity CMS with Next.js applications for automated blog routing and rendering

30 lines 1.35 kB
import type { CmsContent, RouteValidationResult, RouteInfo, CmsContentOptions, PreloadOptions, PreloadResult } from '../types'; /** * Fetch content for a specific route path */ export declare function fetchContentForRoute(path: string, options?: CmsContentOptions): Promise<CmsContent | null>; /** * Fetch content by content type and slug */ export declare function fetchContentBySlug(contentType: string, slug: string, options?: CmsContentOptions): Promise<CmsContent | null>; /** * Fetch content by document ID */ export declare function fetchContentById(contentId: string, options?: CmsContentOptions): Promise<CmsContent | null>; /** * Validate a route and fetch its content if available */ export declare function validateContentRoute(path: string, options?: CmsContentOptions): Promise<RouteValidationResult>; /** * Preload content for multiple routes */ export declare function preloadRouteContent(paths: string[], options?: PreloadOptions): Promise<PreloadResult>; /** * Get available routes for a content type */ export declare function getAvailableRoutes(contentType?: string, options?: CmsContentOptions): Promise<RouteInfo[]>; /** * Check if content exists for a given route */ export declare function contentExistsForRoute(path: string, options?: CmsContentOptions): Promise<boolean>; //# sourceMappingURL=cms-content.d.ts.map