/** The only two grant shapes this builder can emit. Anything else is a wrong privilege. */ declare const ACCESS_LEVELS: readonly ['view', 'read', 'maintain']; export type AccessLevel = (typeof ACCESS_LEVELS)[number]; export declare function buildAxSecurityPrivilegeXml(name: string, properties?: Record): string; /** One entry point as it is written into an AxSecurityPrivilege's . */ export interface SecurityEntryPointRef { /** — the entry point's own name, conventionally equal to ObjectName. */ name: string; /** — the menu item / service operation the entry point grants. */ objectName: string; /** — the EntryPointType enum value. */ objectType: string; } export type RemoveEntryPointResult = /** Removed. `removed` is the entry that went, `xml` the updated document. */ { kind: 'removed'; xml: string; removed: SecurityEntryPointRef; } /** No entry point matched. `present` lists the ones there are, for the error. */ | { kind: 'not-found'; present: SecurityEntryPointRef[]; } /** More than one entry point matched — refuse rather than pick. */ | { kind: 'ambiguous'; matches: SecurityEntryPointRef[]; } /** Not an AxSecurityPrivilege; the caller declines. */ | { kind: 'unsupported'; }; /** * Remove one from an AxSecurityPrivilege. * * The inverse of what buildAxSecurityPrivilegeXml writes for `targetObject`, and * the only grounded way to take a menu item's security exposure back off a * privilege: there is no bridge operation for security objects at all (they are * deliberately excluded from BRIDGE_CREATE_TYPES for the same reason — the * generic property channel cannot carry ), so the alternative was a * whole-file overwrite. * * Identified by `name`, or by `objectName` (+ `objectType` when the same object * is referenced through more than one entry-point type). Two matches are refused * rather than resolved: removing the wrong entry point silently revokes access * to a different menu item, which builds clean and only surfaces as a user * losing a form. * * When the last entry point goes, is collapsed to the self-closing * spelling the serializer uses for an empty collection. */ export declare function removeSecurityEntryPoint(xml: string, criteria: { name?: string; objectName?: string; objectType?: string; }): RemoveEntryPointResult; export type AddEntryPointResult = { kind: 'added'; xml: string; added: SecurityEntryPointRef; } /** An entry point with that is already there — idempotent no-op. */ | { kind: 'already-present'; existing: SecurityEntryPointRef; } /** objectType outside the closed EntryPointType enum. */ | { kind: 'bad-object-type'; given: string; } /** No collection to insert into. */ | { kind: 'no-collection'; } /** Not an AxSecurityPrivilege; the caller declines. */ | { kind: 'unsupported'; }; /** * Add one to an AxSecurityPrivilege. * * The missing half of the pair. `remove-entry-point` shipped without it, so a * privilege could only ever be given the ONE entry point `create` takes as the * scalar `properties.targetObject` — a second one required * `create(overwrite=true, xmlContent=…)`, i.e. hand-authored XML on the * grounded path. That also left remove-entry-point's ambiguity refusal * unreachable through supported parameters, and therefore untested against a * real privilege (eval case L2-object-delete-and-entry-point-cleanup, 2026-08-23). * * Shape measured against the shipped AOT (ApplicationSuite + * ApplicationFoundation: 370 privileges, 1036 entry points): * - element order Name, Grant, ObjectName, ObjectType, Forms — 915 of 1036, * the remainder differing only by optional elements this does not write; * - present in 1035 of 1036; * - equals in 910 of 1036, so it defaults to it and stays * overridable. * * objectType is a CLOSED enum for the same reason accessLevel is: a value * outside EntryPointType deserializes to nothing, so the privilege builds clean, * passes xppbp and grants access to no object at all. */ export declare function addSecurityEntryPoint(xml: string, spec: { objectName: string; objectType: string; name?: string; accessLevel?: string; }): AddEntryPointResult; export {}; //# sourceMappingURL=securityPrivilegeXml.d.ts.map