UNPKG

@aashari/mcp-server-atlassian-confluence

Version:

Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP in

78 lines (77 loc) 2.2 kB
"use strict"; /** * Default values for pagination across the application. * These values should be used consistently throughout the codebase. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.SPACE_DEFAULTS = exports.PAGE_DEFAULTS = exports.DEFAULT_PAGE_SIZE = void 0; exports.applyDefaults = applyDefaults; /** * Default page size for all list operations. * This value determines how many items are returned in a single page by default. */ exports.DEFAULT_PAGE_SIZE = 25; /** * Default values for page operations */ exports.PAGE_DEFAULTS = { /** * Default body format for fetching pages */ BODY_FORMAT: 'atlas_doc_format', /** * Default page size for fetching pages */ PAGE_SIZE: 10, /** * Whether to include page labels by default */ INCLUDE_LABELS: true, /** * Whether to include page properties by default */ INCLUDE_PROPERTIES: true, /** * Whether to include web resources by default */ INCLUDE_WEBRESOURCES: true, /** * Whether to include collaborators by default */ INCLUDE_COLLABORATORS: true, /** * Whether to include version information by default */ INCLUDE_VERSION: false, }; /** * Default values for space operations */ exports.SPACE_DEFAULTS = { /** * Whether to include description in space results */ INCLUDE_DESCRIPTION: true, /** * Whether to include permissions in space results */ INCLUDE_PERMISSIONS: false, }; /** * Apply default values to options object. * This utility ensures that default values are consistently applied. * * @param options Options object that may have some values undefined * @param defaults Default values to apply when options values are undefined * @returns Options object with default values applied * * @example * const options = applyDefaults({ limit: 10 }, { limit: DEFAULT_PAGE_SIZE, includeLabels: true }); * // Result: { limit: 10, includeLabels: true } */ function applyDefaults(options, defaults) { return { ...defaults, ...Object.fromEntries(Object.entries(options).filter(([_, value]) => value !== undefined)), }; }