UNPKG

bc-webclient-mcp

Version:

Model Context Protocol (MCP) server for Microsoft Dynamics 365 Business Central via WebUI protocol. Enables AI assistants to interact with BC through the web client protocol, supporting Card, List, and Document pages with full line item support and server

43 lines 1.66 kB
/** * Page Metadata Parser Implementation * * Combines handler parsing and control parsing to produce complete page metadata. * Orchestrates the parsing pipeline with Result<T, E> error handling. */ import type { IPageMetadataParser, IHandlerParser, IControlParser } from '../core/interfaces.js'; import type { Result } from '../core/result.js'; import type { Handler, PageMetadata } from '../types/bc-types.js'; import type { BCError } from '../core/errors.js'; /** * Implementation of IPageMetadataParser. * Orchestrates handler and control parsing to produce page metadata. */ export declare class PageMetadataParser implements IPageMetadataParser { private readonly handlerParser; private readonly controlParser; constructor(handlerParser?: IHandlerParser, controlParser?: IControlParser); /** * Parses complete page metadata from handlers. * * Pipeline: * 1. Extract formId from callback (identifies which form was opened) * 2. Extract LogicalForm from handlers (filtered by formId if available) * 3. Walk control tree * 4. Extract fields * 5. Extract actions * 6. Build PageMetadata * * @param handlers - Response handlers from OpenForm * @returns Result containing page metadata or error */ parse(handlers: readonly Handler[]): Result<PageMetadata, BCError>; /** * Extracts page ID from cache key. * Cache key format: "{pageId}:pagemode({mode}):embedded({bool})" * * @param cacheKey - The CacheKey from LogicalForm * @returns Extracted page ID */ private extractPageId; } //# sourceMappingURL=page-metadata-parser.d.ts.map