/**
 * Returns true when `partName` is the path of a Custom XML Data Storage Part.
 * Used to reject `target.partName` values that point at unrelated package
 * files (e.g. `word/document.xml`, `word/styles.xml`, `[Content_Types].xml`).
 */
export function isCustomXmlStoragePartName(partName: any): boolean;
/**
 * Enumerates every Custom XML Data Storage Part in the package.
 *
 * AIDEV-NOTE: v1 scope is Word-style filenames (`customXml/itemN.xml`).
 * ECMA-376 §15.2.5 allows arbitrary filenames identified by relationship
 * + content type. The Word-compatible producers we target use this
 * convention; truly foreign-named Storage Parts are out of scope for v1.
 * Lifting this requires broadening the partName safety filter
 * (currently `isCustomXmlStoragePartName`) and the rels-path computation
 * in `findPropsPartFor` to be path-agnostic.
 *
 * Foreign-named *Properties Parts* paired via rels ARE supported (see
 * `findPropsPartFor`); only the Storage Part filename is constrained.
 *
 * Returns part names sorted by numeric index. Pair-matching with
 * Properties Parts is left to the caller.
 */
export function listCustomXmlStoragePartNames(convertedXml: any): string[];
/**
 * Returns the Properties Part name paired with `partName` via the OOXML
 * relationship file `customXml/_rels/itemN.xml.rels`. Falls back to the
 * index-match heuristic (`itemN.xml → itemPropsN.xml`) when no rels file
 * is present.
 *
 * Pairing via the rels file is required by ECMA-376 §15.2.6 — foreign
 * docs are not obligated to name their props parts to match.
 */
export function findPropsPartFor(convertedXml: any, partName: any): string | null;
/**
 * Parses a Properties Part for its itemID and schemaRefs.
 *
 * @returns `{ itemId, schemaRefs }` or `null` when the doc is malformed.
 */
export function parsePropsPart(propsDoc: any): {
    itemId: string | null;
    schemaRefs: any;
} | null;
/**
 * Extracts the namespace URI declared on the Storage Part's root element.
 * Returns `null` when no `xmlns` is present (e.g. plain `<root>` with no
 * default namespace).
 */
export function parseStoragePartRootNamespace(storageDoc: any): string | null;
/**
 * Serializes a parsed XML document (xml-js shape) back to a string.
 * Used to surface part content through the Document API as a string.
 */
export function serializeXmlDoc(xmlDoc: any): string;
/**
 * Reads a custom XML part identified by either an itemID GUID or a
 * package part name. Returns null when not found.
 *
 * Shape:
 *   {
 *     id: string | null,              // itemID GUID; null if no Properties Part
 *     partName: string,                // e.g. "customXml/item1.xml"
 *     propsPartName: string | null,    // null when no Properties Part exists
 *     rootNamespace: string | null,
 *     schemaRefs: string[],
 *     content: string,                 // serialized Storage Part XML
 *   }
 */
export function readCustomXmlPart(convertedXml: any, target: any): {
    id: string | null;
    partName: any;
    propsPartName: string | null;
    rootNamespace: string | null;
    schemaRefs: any;
    content: string;
} | null;
/**
 * Lists all custom XML parts in the package as summary records (no content).
 */
export function listCustomXmlParts(convertedXml: any): {
    id: string | null;
    partName: string;
    propsPartName: string | null;
    rootNamespace: string | null;
    schemaRefs: any;
}[];
export function nextCustomXmlItemIndex(convertedXml: any, converter: any): number;
/**
 * Locates the package part name for a given target. Returns null when the
 * target can't be resolved (unknown id, unknown partName).
 */
export function resolveTargetPartName(convertedXml: any, target: any): any;
/**
 * Creates a new Custom XML Data Storage Part + its Properties Part, with
 * the document-level relationship and the item rels file. Returns the
 * generated itemID GUID and the package part names.
 *
 * When `converter` is provided and the chosen part path was previously
 * tombstoned (via removeCustomXmlPart), the tombstone is cleared — the
 * exporter would otherwise null the new part on save.
 *
 * @throws {Error} when `content` is not well-formed XML.
 */
export function createCustomXmlPart(convertedXml: any, { content, schemaRefs }: {
    content: any;
    schemaRefs: any;
}, converter: any): {
    id: string;
    partName: string;
    propsPartName: string;
};
/**
 * Replaces the content and/or schemaRefs of an existing part. Preserves
 * the existing itemID when present; generates a new one when the patch
 * forces creation of a Properties Part on a foreign storage part that
 * didn't have one.
 *
 * When `converter` is provided and the patched part is the cached
 * bibliography part, the bibliographyPart cache is invalidated so the
 * exporter's `syncBibliographyPartToPackage` doesn't overwrite the
 * patched content with stale sources.
 *
 * Returns `{ partName, id }` where `id` is the resolved itemID GUID
 * (existing or freshly minted), or `null` when the target couldn't be
 * resolved. `id` is omitted only when no Properties Part exists or was
 * created — i.e. when `schemaRefs` wasn't patched and the part already
 * lacked props.
 *
 * @throws {Error} when content is provided but not well-formed.
 */
export function patchCustomXmlPart(convertedXml: any, target: any, { content, schemaRefs }: {
    content: any;
    schemaRefs: any;
}, converter: any): {
    partName: any;
    id: string;
} | {
    partName: any;
    id?: undefined;
} | null;
/**
 * Removes a Custom XML Part and cleans up every linked package file:
 *   - the Storage Part
 *   - the Properties Part (resolved via the item rels file)
 *   - the item rels file
 *   - the document-level relationship pointing at this part
 *
 * Paths of removed parts are tracked on `converter.removedCustomXmlPaths`
 * so the exporter can emit ZIP tombstones (`updatedDocs[path] = null`) for
 * parts that originated in the imported DOCX — otherwise the original
 * entries would survive in the exported zip and the part would reappear
 * on the next import.
 *
 * Returns `true` when the part existed and was removed, `false` when the
 * target couldn't be resolved.
 */
export function removeCustomXmlPart(convertedXml: any, target: any, converter: any): boolean;
export const CUSTOM_XML_DATA_RELATIONSHIP_TYPE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
export const CUSTOM_XML_PROPS_RELATIONSHIP_TYPE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps";
export const CUSTOM_XML_PROPS_CONTENT_TYPE: "application/vnd.openxmlformats-officedocument.customXmlProperties+xml";
export const CUSTOM_XML_DATASTORE_NAMESPACE: "http://schemas.openxmlformats.org/officeDocument/2006/customXml";
//# sourceMappingURL=custom-xml-parts.d.ts.map