import type { ConfluenceSpace } from './space.js'; /** * Confluence content/page version */ export interface ConfluenceVersion { by?: { type?: string; username?: string; userKey?: string; displayName?: string; }; when?: string; message?: string; number: number; minorEdit?: boolean; } /** * Confluence page/content object */ export interface ConfluencePage { id: string; type: string; status?: string; title: string; space?: ConfluenceSpace; version?: ConfluenceVersion; body?: { wiki?: { value: string; representation: string; }; storage?: { value: string; representation: string; }; view?: { value: string; representation: string; }; }; ancestors?: { id: string; title?: string; }[]; children?: { page?: { results: ConfluencePage[]; size: number; }; attachment?: { results: ConfluenceAttachment[]; size: number; }; }; history?: { latest?: boolean; createdBy?: ConfluenceVersion['by']; createdDate?: string; lastUpdated?: ConfluenceVersion; }; _links?: { self?: string; webui?: string; tinyui?: string; }; } /** * Confluence attachment */ export interface ConfluenceAttachment { id: string; type: string; status?: string; title: string; mediaType?: string; fileSize?: number; version?: ConfluenceVersion; _links?: { self?: string; download?: string; webui?: string; }; } /** * Parameters for getting a page */ export interface GetPageParams { /** Page ID */ pageId: string; /** Expand options (e.g., "body.storage,version,space") */ expand?: string; /** Version number to fetch (for historical content) */ version?: number; /** Content status: 'current' (default) or 'historical' (required when using version) */ status?: 'current' | 'historical'; } /** * Content format for Confluence pages. * - 'storage': Confluence storage format (XHTML with ac: and ri: elements). Default. * - 'wiki': Confluence wiki markup. */ export type ConfluenceContentFormat = 'storage' | 'wiki'; /** * Parameters for creating a page */ export interface CreatePageParams { /** Space key */ spaceKey: string; /** Page title */ title: string; /** Page content */ body: string; /** Parent page ID (optional) */ parentId?: string; /** Content format: 'storage' (default) or 'wiki' */ contentFormat?: ConfluenceContentFormat; } /** * Parameters for updating a page */ export interface UpdatePageParams { /** Page ID */ pageId: string; /** Page title */ title: string; /** Page content */ body: string; /** Current version number (will be incremented) */ version: number; /** Whether this is a minor edit */ minorEdit?: boolean; /** Version message */ versionMessage?: string; /** Content format: 'storage' (default) or 'wiki' */ contentFormat?: ConfluenceContentFormat; } /** * Parameters for deleting a page */ export interface DeletePageParams { /** Page ID */ pageId: string; } /** * Parameters for getting child pages */ export interface GetChildrenParams { /** Parent page ID */ pageId: string; /** Starting index */ start?: number; /** Maximum results */ limit?: number; /** Expand options */ expand?: string; } /** * Parameters for getting page history */ export interface GetPageHistoryParams { /** Page ID */ pageId: string; /** Starting index */ start?: number; /** Maximum results */ limit?: number; /** Expand options */ expand?: string; } /** * History version entry */ export interface ConfluenceHistoryVersion { by?: ConfluenceVersion['by']; when?: string; message?: string; number: number; minorEdit?: boolean; } //# sourceMappingURL=page.d.ts.map