export interface ApiContext { baseUrl: string; organizationId: string | null; getAccessToken(): Promise; /** Forces a token refresh. Throws when not supported (HTTP mode). */ invalidateAndRefreshToken(): Promise; fetchImpl?: typeof fetch; } export declare class ApiError extends Error { readonly status: number; readonly code?: string | undefined; readonly body?: unknown | undefined; constructor(message: string, status: number, code?: string | undefined, body?: unknown | undefined); } export type WikiMode = "PUBLIC" | "INTERNAL"; export type WikiSensitivity = "PUBLIC" | "INTERNAL" | "CONFIDENTIAL" | "RESTRICTED"; export interface Wiki { id: string; title: string; slug?: string; organizationId?: string; /** PUBLIC: published documentation. INTERNAL: organization-only knowledge base. */ mode?: WikiMode; /** Classification of an internal wiki (CONFIDENTIAL/RESTRICTED are watermarked and audited). */ sensitivity?: WikiSensitivity; /** When true, reading an internal wiki requires an explicit access grant. */ accessRestricted?: boolean; createdAt?: string; updatedAt?: string; [key: string]: unknown; } export interface Category { id: string; name: string; wikiId: string; [key: string]: unknown; } export interface Page { id: string; title: string; slug?: string; status?: "DRAFT" | "PUBLISHED"; categoryId?: string | null; wikiId: string; [key: string]: unknown; } export interface PageContent { content: string; } export interface PageSettings { title?: string; slug?: string; hidden?: boolean; pageVisibility?: "PUBLIC" | "PRIVATE_ACCOUNT" | "PRIVATE_PASSWORD" | "PRIVATE_EMAIL_DOMAIN"; seoTitle?: string; seoDescription?: string; seoKeywords?: string; icon?: string; [key: string]: unknown; } export interface PageHistoryEntry { id: string; createdAt?: string; authorId?: string; [key: string]: unknown; } export type CategoryVisibility = "PUBLIC" | "PRIVATE_ACCOUNT" | "PRIVATE_PASSWORD" | "PRIVATE_EMAIL_DOMAIN"; export type PageVisibility = CategoryVisibility; export type PageStatus = "DRAFT" | "PUBLISHED" | "ARCHIVED"; export type LinkOpenMethod = "NEW_TAB" | "SAME_TAB"; export interface EditorPageItem { id: string; title: string; slug: string; hidden: boolean; icon: string | null; categoryId: string | null; parentPageId: string | null; sortOrder: number; status: PageStatus; pageVisibility: PageVisibility; children: EditorPageItem[]; } export interface EditorCategory { id: string; name: string; slug: string | null; hidden: boolean; categoryVisibility: CategoryVisibility; sortOrder: number; pages: EditorPageItem[]; } export interface EditorRootLink { id: string; title: string; url: string; icon: string | null; openMethod: LinkOpenMethod; sortOrder: number; } export interface EditorSnapshot { categories: EditorCategory[]; rootPages: EditorPageItem[]; rootLinks: EditorRootLink[]; } export type ReorderItemType = "CATEGORY" | "PAGE" | "LINK"; export interface ReorderRootItem { id: string; type: ReorderItemType; } export interface ReorderCategoryPages { categoryId: string; pageIds: string[]; } export interface ReorderPageSubItems { parentPageId: string; childPageIds: string[]; } export interface ReorderBody { rootItems: ReorderRootItem[]; categoryPages?: ReorderCategoryPages[]; pageSubItems?: ReorderPageSubItems[]; } export interface Organization { id: string; name?: string; [key: string]: unknown; }