import { JCID, OneNoteReader } from "../reader"; import { ExtendedGUID, GUID } from "../utils/guid"; import { OneStore } from "./index"; import { ObjectSpaceObjectPropSet } from "./file-node-types/shared/ObjectSpaceObjectPropSet"; export declare function extendedGuidToKey(id: ExtendedGUID): string; /** * The role of a root object reference. See [MS-ONE] 2.1.8. */ export declare enum RootRole { DefaultContent = 1, MetadataRoot = 2, VersionMetadataRoot = 4 } export type OneNoteObject = { contextId: string; jcid: JCID; propSet: ObjectSpaceObjectPropSet; mapping: Map; fileData?: Uint8Array; fileDataReference?: string; fileExtension?: string; /** Object Data Container State — 0 = not encrypted, 1+ = encrypted. */ odcs: number; /** When `odcs != 0`, this holds the raw encrypted property set bytes. */ encryptedData?: Uint8Array; }; export declare class ObjectSpace { readonly id: string; readonly encryptionXml: string | undefined; private readonly roots; private readonly objects; constructor(id: string, roots: Map, objects: Map, encryptionXml?: string); /** Whether this object space is encrypted (password-protected). */ get isEncrypted(): boolean; /** Decrypt all encrypted objects in this space using the given data key. */ decryptObjects(dataKey: Uint8Array, reader: OneNoteReader): Promise; getObject(id: string): OneNoteObject | undefined; contentRoot(): string | undefined; metadataRoot(): string | undefined; } /** * Provides access to all object spaces contained in a OneStore file and * mirrors the `OneStore` API of the Rust onenote_parser crate. */ export declare class ObjectSpaceStore { readonly objectSpaces: Map; readonly rootObjectSpaceId: string; readonly fileDataStore: Map; private constructor(); get dataRoot(): ObjectSpace; objectSpace(id: string): ObjectSpace | undefined; static parse(store: OneStore): ObjectSpaceStore; }