/** * OPC relationships parts (`.rels`) parse / serialize / resolve. * * XSD: `specs/ecma/.../OpenPackagingConventions-XMLSchema/opc-relationships.xsd` * Namespace: `http://schemas.openxmlformats.org/package/2006/relationships` * * External targets (`TargetMode="External"`) are never fetched. * * @private */ /** * One OPC relationship. */ export interface OpcRelationship { readonly id: string; readonly type: string; /** Raw Target attribute as stored. */ readonly target: string; readonly targetMode?: 'Internal' | 'External'; /** * Resolved absolute part name for Internal targets; raw URI for External. */ readonly resolvedTarget: string; } /** * Parse a relationships part. * * @param bytes - `.rels` payload * @param sourcePart - source part absolute name, or `null` for package-level * @param partName - OPC name of this relationships part (for errors) */ export declare function parseRelationships(bytes: Uint8Array, sourcePart: string | null, partName: string): OpcRelationship[]; /** * Serialize relationships to XML bytes. */ export declare function serializeRelationships(relationships: ReadonlyArray): Uint8Array; /** * Map key for package-level relationships collections. */ export declare const PACKAGE_RELATIONSHIP_SOURCE: null; export declare type RelationshipSourceKey = string | typeof PACKAGE_RELATIONSHIP_SOURCE; /** * Build the ZIP/OPC part name for a relationship collection key. */ export declare function relationshipPartName(source: RelationshipSourceKey): string;