import type { Path } from "../parent/pathTypes";
import type { Patch } from "./Patch";
export declare type JsonPatch = JsonPatchAddOperation<any> | JsonPatchRemoveOperation | JsonPatchReplaceOperation<any>;
export interface JsonPatchBaseOperation {
    path: string;
}
export interface JsonPatchAddOperation<T> extends JsonPatchBaseOperation {
    op: "add";
    value: T;
}
export interface JsonPatchRemoveOperation extends JsonPatchBaseOperation {
    op: "remove";
}
export interface JsonPatchReplaceOperation<T> extends JsonPatchBaseOperation {
    op: "replace";
    value: T;
}
/**
 * Converts a path into a JSON pointer.
 *
 * @param path Path to convert.
 * @returns Converted JSON pointer.
 */
export declare function pathToJsonPointer(path: Path): string;
/**
 * Converts a JSON pointer into a path.
 *
 * @param jsonPointer JSON pointer to convert.
 * @returns Converted path.
 */
export declare function jsonPointerToPath(jsonPointer: string): Path;
/**
 * Convert a patch into a JSON patch.
 *
 * @param patch A patch.
 * @returns A JSON patch.
 */
export declare function patchToJsonPatch(patch: Patch): JsonPatch;
/**
 * Converts a JSON patch into a patch.
 *
 * @param jsonPatch A JSON patch.
 * @returns A patch.
 */
export declare function jsonPatchToPatch(jsonPatch: JsonPatch): Patch;
