import { Relationship } from './relationships.js'; /** One part to write into the package: its path, bytes, and content type. */ export interface OpcPart { /** Package path, e.g. `'word/document.xml'`. No leading slash. */ readonly path: string; readonly data: Uint8Array; /** Content type for the `[Content_Types].xml` Override (XML parts). */ readonly contentType: string; } /** * A part's relationships (id/type/target[/External]). The reader returns the * same {@link Relationship} shape, so a writer round-trips through * `parseRelationships`. */ export interface OpcPartRelationships { /** The owning part, e.g. `'word/document.xml'` (or `''` for the package root). */ readonly sourcePart: string; readonly relationships: ReadonlyArray; } /** The full input to {@link buildOpcPackage}: parts plus their relationships. */ export interface OpcWriteOptions { /** The content parts (excluding `[Content_Types].xml` and `.rels`, which are generated). */ readonly parts: ReadonlyArray; /** Package-level relationships (`_rels/.rels`). */ readonly rootRelationships: ReadonlyArray; /** Per-part relationships (word/_rels/.rels). */ readonly partRelationships?: ReadonlyArray; /** * Default content types by lowercase extension, for parts not given an * Override (typically binaries: png, jpeg…). `rels` and `xml` are always * present and need not be repeated. */ readonly defaultsByExtension?: Readonly>; } /** * Assemble parts + relationships into a deterministic OPC ZIP: it synthesizes * `[Content_Types].xml` and the `.rels` parts, then zips everything with a fixed * timestamp so the same input always yields byte-identical output. * * @returns The packaged `.docx`/`.xlsx`/… bytes. */ export declare function buildOpcPackage(options: OpcWriteOptions): Uint8Array; /** * The relationships-part path for a part: `word/document.xml` → * `word/_rels/document.xml.rels`. (`''` (root) is handled separately as * `_rels/.rels`.) */ export declare function relsPathFor(partPath: string): string;