/** * Generates base + editable service classes. * * Issue #57: Full BaseService codegen with translatable, softDelete, audit, * DB::transaction, eagerLoad/eagerCount, lookupFields, defaultSort. * * Issue #81 (v3.23.0): convention-over-configuration flip. Services are now * generated by default for every project `kind: object` schema. Opt out with * `options.service: false` (pivots, translation sidecars, audit logs). * Property-level flags (`searchable`, `filterable`, `sortable`, `lookupable`, * `defaultSort: asc|desc`) are the single source of truth — the legacy * `options.service.{searchable,filterable,defaultSort,lookupFields,eagerLoad, * eagerCount}` keys are deprecated and emit warnings at generate time. */ import { SchemaReader } from './schema-reader.js'; import type { GeneratedFile, PhpConfig } from './types.js'; /** * Generate service classes for every project object schema unless explicitly * opted out via `options.service: false`. Also generates for schemas that * still use the legacy `options.api` block (unchanged from v3.22.x). * * Skipped automatically: * - kind != object (pivot, partial, enum, extend) * - options.service === false (explicit opt-out) * - schemas whose name matches a translation sidecar pattern * (`*Translation` auto-generated by the translation-model-generator) * - package-owned schemas (those get services in their owning package) */ export declare function generateServices(reader: SchemaReader, config: PhpConfig): GeneratedFile[]; /** * Returns the set of `*ServiceBase.php` filenames the current schema set * is expected to produce. The cli.ts orphan-cleanup compares this set * against the actual files in the base-services directory and deletes * any mismatches — handles the case where a schema is renamed, removed, * flipped from `kind: object` to `kind: pivot`, or opted out via * `options.service: false`. * * Filename format mirrors `generateBaseService`: `{PascalSchemaName}ServiceBase.php`. * * Editable `*Service.php` files are NOT in scope — those are user-owned * (sinh-1-lần userFile semantics) and may contain hand-written code; the * cli prints a warning instead of deleting them. */ export declare function expectedBaseServiceFileNames(reader: SchemaReader): Set;