UNPKG

node-zugferd

Version:

A Node.js library for creating ZUGFeRD/Factur-X compliant documents. Generating XML and embedding it into PDF/A files, enabling seamless e-invoicing and digital document compliance.

32 lines (28 loc) 1.21 kB
import { Z as ZugferdOptions, a as ZugferdContext, c as createDocumentFactory, b as ProfileValidateHandler, I as InferSchema, U as UnionToIntersection, d as ZugferdPlugin } from './index-ypDm5Z05.js'; import 'zod'; import './codelist/hybrid-document.js'; import './codelist/filename.js'; import './codelist/hybrid-version.js'; import './codelist/hybrid-conformance.js'; import 'pdf-lib'; import 'fast-xml-parser'; declare const zugferd: <O extends ZugferdOptions>(options: O) => { context: ZugferdContext; options: O; create: ReturnType<typeof createDocumentFactory<O>>; validate: ProfileValidateHandler; $Infer: { Schema: InferSchema<O["profile"]>; }; } & UnionToIntersection<O["plugins"] extends (infer T)[] ? T extends ZugferdPlugin ? ReturnType<T> : {} : {}>; type Zugferd = { context: ZugferdContext; options: ZugferdOptions; create: (data: any) => ReturnType<ZugferdContext["document"]["create"]>; validate: ZugferdContext["document"]["validate"]; } & Record<string, any>; declare class ZugferdError extends Error { code: string; constructor(code: string, message: string, options?: ErrorOptions); } export { type Zugferd, ZugferdError, zugferd };