@telefonica/markdown-confluence-sync
Version:
Creates/updates/deletes Confluence pages based on markdown files in a directory. Supports Mermaid diagrams and per-page configuration using frontmatter metadata. Works great with Docusaurus
43 lines (42 loc) • 1.51 kB
TypeScript
import type { ConfigInterface } from "@mocks-server/config";
import type { LoggerInterface } from "@mocks-server/logger";
import type { SyncModes } from "@telefonica/confluence-sync";
import type { ContentPreprocessor, FilesMetadata, FilesPattern } from "..";
import type { MarkdownDocumentsInterface } from "./DocusaurusPages.types";
export interface MarkdownDocumentsFactoryOptions {
/** Content preprocessor */
contentPreprocessor?: ContentPreprocessor;
/** Configuration interface */
config: ConfigInterface;
/** Logger */
logger: LoggerInterface;
/** Markdown document path */
path: string;
/** Pattern to search files when flat mode is active */
filesPattern?: FilesPattern;
/** Pattern with files to be ignored */
filesIgnore?: FilesPattern;
/** Metadata for specific files */
filesMetadata?: FilesMetadata;
/** Working directory */
cwd: string;
}
/**
* Factory for creating MarkdownDocuments instances.
*
*
* @export MarkdownDocumentFactory
*/
export interface MarkdownDocumentsFactoryInterface {
/**
* Creates a new page from the category index.
*
* If the mode is flat will be obtained pages in flat mode.
* Otherwise, the will be obtained pages in tree mode.
*
* @param options The options to obtained markdown documents.
*
* @returns A new MarkdownDocumentsInterface instance.
*/
fromMode(mode: SyncModes, options: MarkdownDocumentsFactoryOptions): MarkdownDocumentsInterface;
}