/** * RAP managed-BO scaffolder. * * Generates the canonical ABAP-Cloud stack for one root entity — the same * shape as SAP's /DMO reference apps and the ADT wizards: * * root view entity (ZR_) → behavior definition (managed, strict(2)) * projection view (ZC_) → projection behavior definition * behavior implementation class (ZBP_) + handler locals * metadata extension (UI annotations) + service definition (ZUI_…_V4) * * Everything the generator emits that abaplint can parse is round-tripped * through abaplint at version Cloud before it is returned: the generator and * the linter share one parser, so the scaffold can never drift into syntax * the lint would reject. BDEF/SRVD artifacts are outside abaplint's checked * surface (verified empirically) — those are covered by golden tests and * marked validated:"template". */ import type { Finding } from "./engine.js"; export interface ScaffoldField { /** snake_case table field name, e.g. "agency_id". */ name: string; /** Suggested DDL type for the table source, e.g. "abap.char(6)". */ type?: string | undefined; } export interface ScaffoldOptions { /** Entity in UpperCamelCase, e.g. "Travel". Drives all artifact names. */ entityName: string; /** Persistent SQL table, e.g. "ztravel". */ sqlTable: string; /** snake_case key field name, e.g. "travel_id". */ keyField: string; /** True (default): UUID key, managed numbering. False: caller supplies the key on create. */ managedUuidKey: boolean; fields: ScaffoldField[]; draft: boolean; /** Dev namespace prefix, "Z" or "Y". */ prefix: "Z" | "Y"; } export interface ScaffoldFile { filename: string; content: string; /** "abaplint" = machine-validated through the parser; "template" = golden-tested template. */ validated: "abaplint" | "template"; } export interface ScaffoldResult { files: ScaffoldFile[]; activationOrder: string[]; nextSteps: string[]; suggestedTableDdl: string; /** Non-empty only if the generated sources failed abaplint — should never happen. */ validationIssues: Finding[]; } export declare function snakeToCamel(snake: string): string; export declare function scaffoldRapBo(opts: ScaffoldOptions): ScaffoldResult;