/** * Shared builders for AxSecurityDuty / AxSecurityRole and their extensions. * * createD365File.ts and generateD365Xml.ts each expose a mirrored * XmlTemplateGenerator class; both delegate here so the two cannot drift * (mirrors the securityPrivilegeXml.ts / queryViewXml.ts pattern). * * This module exists because they DID drift, badly. The create path was fixed * after the "security chain silent empty write" incident; the generate mirror * kept hard-coding `` and `` regardless of what the * caller passed. Since the documented hybrid flow is * generate → create(xmlContent), that mirror wrote empty, non-functional * security objects to disk — and they build perfectly clean, so nothing fails * until someone notices the role grants nothing. */ /** * Normalize a name list that may arrive as an array or a comma/semicolon/ * newline-separated string (models pass either). Returns trimmed, non-empty names. */ export declare function normalizeNameList(value: any): string[]; /** * Render a security reference container: a self-closing tag when empty, or the * wrapped child references (e.g. …). * * The child element name matters: a duty/role that lists its privileges under * `AxSecurityRolePermissionSet` / `AxSecurityRoleDutyPermission` deserializes into * an EMPTY reference list, so the whole duty→privilege→role chain is dead — * xppbp then reports BPErrorDutyHasNoPrivileges / BPErrorPrivilegeNotCoveredByDuty / * BPErrorDutyNotCoveredByRole for references that are physically in the file. * The correct names are AxSecurityPrivilegeReference / AxSecurityDutyReference. * Evidence: the 2026-07-21 eval sweep, finding #31 (L4-master-security-slice run). */ export declare function securityRefContainer(container: string, childTag: string, names: string[]): string; /** * AxSecurityDuty. * properties.privileges – privilege names to reference (array or comma-separated). */ export declare function buildAxSecurityDutyXml(name: string, properties?: Record): string; /** * AxSecurityRole. * properties.duties – duty names to reference (array or comma-separated). * properties.privileges – privilege names to reference directly on the role. */ export declare function buildAxSecurityRoleXml(name: string, properties?: Record): string; /** * AxSecurityDutyExtension — adds privileges to an EXISTING (often Microsoft-owned) * duty without overlaying it. Real Microsoft object type, e.g. * K:\...\ApplicationCommon\AxSecurityDutyExtension\BatchJobMaintain.ApplicationCommon.xml. * Name convention: ".Extension" (same dot-notation as * menu-extension / table-extension — see DOT_NOTATION_EXTENSION_TYPES). * properties.privileges – privilege names to add to the base duty. */ export declare function buildAxSecurityDutyExtensionXml(name: string, properties?: Record): string; /** * AxSecurityRoleExtension — adds duties and/or privileges to an EXISTING (often * Microsoft-owned) role without overlaying it. Real Microsoft object type, e.g. * K:\...\ApplicationCommon\AxSecurityRoleExtension\SystemUser.ApplicationCommon.xml. * Name convention: ".Extension". * properties.duties – duty names to add to the base role. * properties.privileges – privilege names to add directly to the base role. */ export declare function buildAxSecurityRoleExtensionXml(name: string, properties?: Record): string; //# sourceMappingURL=securityDutyRoleXml.d.ts.map