export interface GatelyConfig { /** Your Gately API key — found in Settings → API Keys (project ID auto-detected) */ apiKey?: string; /** API base URL (defaults to https://api.usegately.com/api) */ apiUrl?: string; /** * Doc sources to sync. * Supports full Folder → Category → Subcategory → Article hierarchy. */ docs: DocSource[]; /** * Optional: Path to OpenAPI spec file for interactive API docs. * The spec will be parsed and synced as articles. */ openapi?: string; /** * Articles to delete from help center (by slug). * Use this to remove articles that are no longer in your docs. */ delete?: string[]; /** * Articles to move to "Uncategorized" (by slug). * Useful for temporarily removing articles from navigation without deleting them. */ uncategorized?: string[]; } /** Shared shape for folders, categories, and subcategories */ export interface NavItem { name: string; /** Hugeicons icon e.g. "hugeicons:rocket-01" */ icon?: string; /** Short description */ description?: string; /** Display order (lower numbers appear first) */ display_order?: number; /** Custom slug for SEO-friendly URLs */ slug?: string; /** Shorter label shown in sidebar instead of full name */ sidebar_title?: string; } export interface DocSource { /** Glob pattern(s) relative to config file location */ path: string | string[]; /** * Folder to place articles in (max 3 folders per project). * Plain string = name only. Object = name + icon + description. */ folder?: string | NavItem; /** * Category to assign articles to. * Plain string = name only. Object = name + icon + description. */ category?: string | NavItem; /** * Subcategory (nested under category via parent_category_id). * Plain string = name only. Object = name + icon + description. */ subcategory?: string | NavItem; /** Publish articles immediately on push (default: false = draft) */ publish?: boolean; /** Article type: 'article' for regular docs, 'api_reference' for API documentation */ article_type?: 'article' | 'api_reference'; } export interface ParsedDoc { filePath: string; title: string; slug?: string; content: string; excerpt?: string; /** Resolved from frontmatter or source config */ folder?: string; category?: string; subcategory?: string; /** Hugeicons name shown next to article in sidebar */ icon?: string; /** Shorter label shown in sidebar instead of full title */ sidebarTitle?: string; publish?: boolean; metaTitle?: string; metaDescription?: string; keywords?: string[]; ogImageUrl?: string; showToc?: boolean; displayOrder?: number; /** API documentation fields */ articleType?: 'article' | 'api_reference'; apiMethod?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD'; apiPath?: string; apiBaseUrl?: string; apiAuthRequired?: boolean; apiParameters?: Array<{ name: string; type: string; required: boolean; description: string; location: 'header' | 'body' | 'query' | 'path'; default?: string; }>; } /** Resolved IDs after API lookups */ export interface ResolvedHierarchy { folderId?: string; categoryId?: string; }