/** * Shared builder for AxTable XML. * * 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). * * They had already drifted: the create copy grew canonical property ordering, * a real block and X++ source handling, while the generate copy kept * emitting a bare `` and a hand-rolled property block in a different * order. Since the documented hybrid flow is generate → create(xmlContent), * every table produced that way lost all of its fields — silently, because a * table with no fields still builds clean. */ /** Field spec as accepted by the tool surface; every key is optional but `name`. */ export interface AxTableFieldSpec { name: string; edt?: string; type?: string; fieldType?: string; enumType?: string; mandatory?: boolean; label?: string; /** AllowEdit — false/"No" writes No (staging key fields). */ allowEdit?: boolean | string; /** IgnoreEDTRelation — true/"Yes" writes Yes. */ ignoreEdtRelation?: boolean | string; /** Same as ignoreEdtRelation — the spelling fieldPropertiesFromSpecs also accepts. */ ignoreEDTRelation?: boolean | string; } /** X++ source already split by the caller (see XmlTemplateGenerator.parseSourceForBridge). */ export interface ParsedTableSource { declaration?: string; methods?: Array<{ name: string; source?: string; }>; } /** * Map a D365FO base type name to the XML i:type attribute used in . * If the explicit fieldType is not a known primitive, fall back to name-based heuristics * using edtName (same heuristics as SmartXmlBuilder.getAxTableFieldType). */ export declare function fieldTypeToAxType(fieldType: string, edtName?: string): string; /** Field-group spec as accepted by the tool surface (same shape as the table-extension path). */ export interface AxTableFieldGroupSpec { name: string; label?: string; fields?: string[]; } /** * Render : the five Auto* groups, then whatever the caller asked for. * * This block used to be a hardcoded literal, so `properties.fieldGroups` on a * table create was DROPPED — silently, because a table with no groups of its own * still builds clean. It stops being silent one step later and in the wrong * place: the SimpleList form template emits `Overview` * for its grid, and the build then fails with "Field group 'Overview' does not * exist" on the FORM, pointing away from the table that actually lost it. * Found by capturing L3-form-event-handler-class on the VM. */ export declare function buildAxTableFieldGroupsXml(groupSpecs: AxTableFieldGroupSpec[]): string; /** Index spec as accepted by the tool surface (same shape as the table-extension path). */ export interface AxTableIndexSpec { name: string; fields: Array<{ fieldName?: string; name?: string; dataField?: string; direction?: string; } | string>; allowDuplicates?: boolean; alternateKey?: boolean; } /** * Render from the caller's index specs. * * Lifted out of the table-EXTENSION builder so the two cannot drift, and * because the plain table builder emitted a hardcoded ``, dropping * every index the caller passed. `createTablePropertyHonesty` caught the loss and * offered `add-index` as the repair — but that operation needs the C# bridge, so * on the template path there was no way to get an index at all. * * `` is still a literal, and stays reported by that same check. */ export declare function buildAxTableIndexesXml(indexSpecs: AxTableIndexSpec[]): string; /** Render the block from the caller's field specs. */ export declare function buildAxTableFieldsXml(fieldSpecs: AxTableFieldSpec[]): string; /** * Build a complete AxTable document. * * `parsedSource` is supplied pre-split by the caller rather than parsed here: * the splitter lives on XmlTemplateGenerator and pulling it down would drag the * whole create tool in behind it. Callers with no X++ simply omit it. */ export declare function buildAxTableXml(tableName: string, properties?: Record, parsedSource?: ParsedTableSource): string; //# sourceMappingURL=tableXml.d.ts.map