import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import type { SignalData, SignalDataJson } from "../../graph/v1/signal_data_pb.js"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file mochabugapis/adapt/runtime/v1/fileforge_service.proto. */ export declare const file_mochabugapis_adapt_runtime_v1_fileforge_service: GenFile; /** * RenderDocumentRequest specifies the document conversion to perform * * @generated from message mochabugapis.adapt.runtime.v1.RenderDocumentRequest */ export type RenderDocumentRequest = Message<"mochabugapis.adapt.runtime.v1.RenderDocumentRequest"> & { /** * The conversion type to perform * * @generated from oneof mochabugapis.adapt.runtime.v1.RenderDocumentRequest.conversion */ conversion: { /** * Convert HTML to PDF * * @generated from field: mochabugapis.adapt.runtime.v1.HtmlToPdf html_to_pdf = 1; */ value: HtmlToPdf; case: "htmlToPdf"; } | { /** * Convert Markdown to PDF * * @generated from field: mochabugapis.adapt.runtime.v1.MarkdownToPdf markdown_to_pdf = 2; */ value: MarkdownToPdf; case: "markdownToPdf"; } | { /** * Convert Office documents to PDF * * @generated from field: mochabugapis.adapt.runtime.v1.OfficeToPdf office_to_pdf = 3; */ value: OfficeToPdf; case: "officeToPdf"; } | { case: undefined; value?: undefined; }; }; /** * RenderDocumentRequest specifies the document conversion to perform * * @generated from message mochabugapis.adapt.runtime.v1.RenderDocumentRequest */ export type RenderDocumentRequestJson = { /** * Convert HTML to PDF * * @generated from field: mochabugapis.adapt.runtime.v1.HtmlToPdf html_to_pdf = 1; */ htmlToPdf?: HtmlToPdfJson; /** * Convert Markdown to PDF * * @generated from field: mochabugapis.adapt.runtime.v1.MarkdownToPdf markdown_to_pdf = 2; */ markdownToPdf?: MarkdownToPdfJson; /** * Convert Office documents to PDF * * @generated from field: mochabugapis.adapt.runtime.v1.OfficeToPdf office_to_pdf = 3; */ officeToPdf?: OfficeToPdfJson; }; /** * Describes the message mochabugapis.adapt.runtime.v1.RenderDocumentRequest. * Use `create(RenderDocumentRequestSchema)` to create a new message. */ export declare const RenderDocumentRequestSchema: GenMessage; /** * RenderDocumentResponse contains the rendered PDF output * * @generated from message mochabugapis.adapt.runtime.v1.RenderDocumentResponse */ export type RenderDocumentResponse = Message<"mochabugapis.adapt.runtime.v1.RenderDocumentResponse"> & { /** * The rendered PDF * * @generated from field: mochabugapis.adapt.graph.v1.SignalData output = 1; */ output?: SignalData | undefined; }; /** * RenderDocumentResponse contains the rendered PDF output * * @generated from message mochabugapis.adapt.runtime.v1.RenderDocumentResponse */ export type RenderDocumentResponseJson = { /** * The rendered PDF * * @generated from field: mochabugapis.adapt.graph.v1.SignalData output = 1; */ output?: SignalDataJson; }; /** * Describes the message mochabugapis.adapt.runtime.v1.RenderDocumentResponse. * Use `create(RenderDocumentResponseSchema)` to create a new message. */ export declare const RenderDocumentResponseSchema: GenMessage; /** * HtmlToPdf converts HTML to PDF using chromium * * @generated from message mochabugapis.adapt.runtime.v1.HtmlToPdf */ export type HtmlToPdf = Message<"mochabugapis.adapt.runtime.v1.HtmlToPdf"> & { /** * Main HTML content (required, max 10MB) * * @generated from field: string index_html = 1; */ indexHtml: string; /** * Header HTML template (max 1MB). * Must be a complete HTML document with , , and tags. * Use large font-size (e.g., 12px+) to ensure content displays correctly. * Inject values via classes: date, title, url, pageNumber, totalPages * Example: of * Limitations: No JavaScript, no external assets (CSS/fonts/scripts). * Images must use base64: data:image/png;base64,iVBOR... * For background-color/color, add: -webkit-print-color-adjust: exact * * @generated from field: optional string header_html = 2; */ headerHtml?: string | undefined; /** * Footer HTML template (max 1MB). * Same requirements as header_html. Note: footer CSS overrides header CSS. * * @generated from field: optional string footer_html = 3; */ footerHtml?: string | undefined; /** * Asset files (images, CSS, etc.) - max 100 files * Root-level paths only: not * * @generated from field: repeated mochabugapis.adapt.graph.v1.SignalData assets = 4; */ assets: SignalData[]; /** * Rendering options * * @generated from field: optional mochabugapis.adapt.runtime.v1.HtmlRenderOptions render = 10; */ render?: HtmlRenderOptions | undefined; /** * PDF output options * * @generated from field: optional mochabugapis.adapt.runtime.v1.PdfOutputOptions output = 11; */ output?: PdfOutputOptions | undefined; }; /** * HtmlToPdf converts HTML to PDF using chromium * * @generated from message mochabugapis.adapt.runtime.v1.HtmlToPdf */ export type HtmlToPdfJson = { /** * Main HTML content (required, max 10MB) * * @generated from field: string index_html = 1; */ indexHtml?: string; /** * Header HTML template (max 1MB). * Must be a complete HTML document with , , and tags. * Use large font-size (e.g., 12px+) to ensure content displays correctly. * Inject values via classes: date, title, url, pageNumber, totalPages * Example: of * Limitations: No JavaScript, no external assets (CSS/fonts/scripts). * Images must use base64: data:image/png;base64,iVBOR... * For background-color/color, add: -webkit-print-color-adjust: exact * * @generated from field: optional string header_html = 2; */ headerHtml?: string; /** * Footer HTML template (max 1MB). * Same requirements as header_html. Note: footer CSS overrides header CSS. * * @generated from field: optional string footer_html = 3; */ footerHtml?: string; /** * Asset files (images, CSS, etc.) - max 100 files * Root-level paths only: not * * @generated from field: repeated mochabugapis.adapt.graph.v1.SignalData assets = 4; */ assets?: SignalDataJson[]; /** * Rendering options * * @generated from field: optional mochabugapis.adapt.runtime.v1.HtmlRenderOptions render = 10; */ render?: HtmlRenderOptionsJson; /** * PDF output options * * @generated from field: optional mochabugapis.adapt.runtime.v1.PdfOutputOptions output = 11; */ output?: PdfOutputOptionsJson; }; /** * Describes the message mochabugapis.adapt.runtime.v1.HtmlToPdf. * Use `create(HtmlToPdfSchema)` to create a new message. */ export declare const HtmlToPdfSchema: GenMessage; /** * MarkdownToPdf converts Markdown files to PDF using Chromium. * * ## How It Works * * Provide an HTML wrapper with styling in and an EMPTY . * The markdown files are rendered and injected into the body automatically. * * ## Markdown Conversion * * Markdown is converted using the gomarkdown library and sanitized with * bluemonday's UGCPolicy. * * Supported features: * - Standard Markdown (headings, lists, links, images, code blocks) * - Tables (with footer rows and colspan) * - Fenced code blocks with language hints (```go) * - Strikethrough (~~text~~) * - Footnotes ([^1]) * - Definition lists * - Task lists (- [ ] and - [x]) * - Autolinks (bare URLs become clickable) * - Smart typography (-- to ndash, --- to mdash, smart quotes) * - MathJax support ($inline$ and $$display$$ math) * - Superscript (^text^) and subscript (~text~) * * ## Security * * HTML is sanitized. Blocked: