import type { Lix } from "../../lix/open-lix.js"; import type { LixEntity, LixEntityCanonical } from "../types.js"; /** * Attaches a label to an entity (creates mapping). * * This function allows any entity in the system to be labeled, * enabling universal labeling across all entity types. By default the label * is attached in the active version, but a specific version can be provided * when labeling global or historical entities. * * @example * // Label a bundle entity in the active version * await attachLabel({ * lix, * entity: { * entity_id: "bundle123", * schema_key: "inlang_bundle", * file_id: "messages.json" * }, * label: { id: "needs-translation-label-id" } * }); * * @example * // Label a change set that lives in the global version * await attachLabel({ * lix, * entity: { * entity_id: "cs123", * schema_key: "lix_change_set", * file_id: "lix" * }, * label: { id: "reviewed-label-id" }, * versionId: "global" * }); */ export declare function attachLabel(args: { lix: Pick; entity: LixEntity | LixEntityCanonical; label: { id: string; }; versionId?: string; }): Promise; /** * Detaches a label from an entity (removes mapping). * * @example * await detachLabel({ * lix, * entity: { * entity_id: "bundle123", * schema_key: "inlang_bundle", * file_id: "messages.json" * }, * label: { id: "needs-translation-label-id" } * }); * * @example * // Remove a label from the global version * await detachLabel({ * lix, * entity: { * entity_id: "cs123", * schema_key: "lix_change_set", * file_id: "lix" * }, * label: { id: "reviewed-label-id" }, * versionId: "global" * }); */ export declare function detachLabel(args: { lix: Pick; entity: LixEntity | LixEntityCanonical; label: { id: string; }; versionId?: string; }): Promise; //# sourceMappingURL=attach-label.d.ts.map