/** Returns true when the error represents a tombstoned document (HTTP 410). */ export declare function isDocumentGoneError(err: unknown): boolean; /** Returns true when the error carries an HTTP 404 status, whatever the request was for. */ export declare function isNotFoundStatus(err: unknown): boolean; /** * Thrown when a path resolves to no document. Only the path lookup itself may raise * this: a 404 from a later call in the same load says nothing about whether the page * exists, and must not be mistaken for a missing one. */ export declare class DocumentPathNotFoundError extends Error { readonly path: string; name: string; constructor(path: string); } /** Returns true when the error represents a path with no document behind it. */ export declare function isDocumentNotFoundError(err: unknown): boolean; /** A page deleted on the branch counts as free, since creating at its path brings it back. */ export declare function isPathTakenOnBranch(documents: { getByPath(siteId: string, path: string, branchId?: string): Promise; }, siteId: string, branchId: string, path: string): Promise; /** Safely coerce an unknown value to string — returns "" for null, undefined, and non-primitives. */ export declare function rawValueToString(value: unknown): string; /** How many requests the editor sends at once when it has many to make, so a large section doesn't flood the API. */ export declare const REQUEST_CONCURRENCY = 5; /** * Runs `fn` over `items` with at most `limit` running at once, starting the next as soon as one * finishes. Results keep the order of `items`. `fn` should catch its own errors: one rejection * rejects the whole call while the other workers keep running. */ export declare function mapWithConcurrency(items: readonly T[], limit: number, fn: (item: T) => Promise): Promise;