/** * Documentation Service * * Service layer for documentation operations following the project's * service pattern. Provides a consistent API for docs operations. * * NOTE: This service wraps the auto-generated registry functions * and adds additional utility methods. */ import type { DocPageMeta, DocSectionMeta, DocsRegistryStructure } from '../../types/docs'; /** * Documentation Service * * Static service class for documentation operations */ export declare class DocsService { /** * Get the full documentation registry */ static getRegistry(): DocsRegistryStructure; /** * Get all documentation sections (public + superadmin) */ static getAll(): DocSectionMeta[]; /** * Get public documentation sections (for /docs) */ static getPublic(): DocSectionMeta[]; /** * Get superadmin documentation sections (for /superadmin/docs) */ static getSuperadmin(): DocSectionMeta[]; /** * Find a section by slug across all categories */ static findSection(slug: string): DocSectionMeta | undefined; /** * Find a section by slug in a specific category */ static findSectionInCategory(slug: string, category: 'public' | 'superadmin'): DocSectionMeta | undefined; /** * Check if a section exists */ static sectionExists(slug: string): boolean; /** * Get all section slugs */ static getSectionSlugs(): string[]; /** * Get section count */ static getSectionCount(): number; /** * Find a page within a section */ static findPage(sectionSlug: string, pageSlug: string): DocPageMeta | undefined; /** * Check if a page exists */ static pageExists(sectionSlug: string, pageSlug: string): boolean; /** * Get all pages in a section */ static getPages(sectionSlug: string): DocPageMeta[]; /** * Get total page count across all sections */ static getPageCount(): number; /** * Get all pages as a flat array */ static getAllPages(): DocPageMeta[]; /** * Build the URL path for a page * * @param category - 'public' or 'superadmin' * @param sectionSlug - Section slug * @param pageSlug - Page slug * @returns URL path string */ static buildPageUrl(category: 'public' | 'superadmin', sectionSlug: string, pageSlug: string): string; /** * Build the URL path for a section * * @param category - 'public' or 'superadmin' * @param sectionSlug - Section slug * @returns URL path string */ static buildSectionUrl(category: 'public' | 'superadmin', sectionSlug: string): string; /** * Parse a URL path to extract category, section, and page * * @param pathname - URL pathname (e.g., '/docs/getting-started/intro') * @returns Parsed path info or null if invalid */ static parsePath(pathname: string): { category: 'public' | 'superadmin'; sectionSlug: string | null; pageSlug: string | null; } | null; /** * Search across all documentation * * @param query - Search query string * @param category - Optional category filter * @returns Filtered sections with matching pages */ static search(query: string, category?: 'public' | 'superadmin'): DocSectionMeta[]; /** * Get the first page of the first section (landing page) * * @param category - 'public' or 'superadmin' * @returns First page or undefined */ static getFirstPage(category: 'public' | 'superadmin'): DocPageMeta | undefined; /** * Get previous and next pages for navigation * * @param category - 'public' or 'superadmin' * @param sectionSlug - Current section slug * @param pageSlug - Current page slug * @returns Previous and next page info */ static getNavigation(category: 'public' | 'superadmin', sectionSlug: string, pageSlug: string): { prev: { section: DocSectionMeta; page: DocPageMeta; } | null; next: { section: DocSectionMeta; page: DocPageMeta; } | null; }; /** * Get documentation metadata/stats */ static getMetadata(): { publicSections: number; superadminSections: number; totalSections: number; publicPages: number; superadminPages: number; totalPages: number; sectionSlugs: string[]; }; } export declare const getDocsRegistry: () => DocsRegistryStructure; export declare const getAllDocs: () => DocSectionMeta[]; export declare const getPublicDocs: () => DocSectionMeta[]; export declare const getSuperadminDocs: () => DocSectionMeta[]; export declare const findDocsSection: (slug: string) => DocSectionMeta; export declare const findDocsPage: (sectionSlug: string, pageSlug: string) => DocPageMeta; export declare const searchDocs: (query: string, category?: "public" | "superadmin") => DocSectionMeta[]; //# sourceMappingURL=docs.service.d.ts.map