/** Auto-register GraphQL types and operations from a fougere App. */ import type SchemaBuilder from '@pothos/core'; import { type OperationMeta } from './OperationMeta.js'; import { type ProviderEntry, type EntityEntry as CoreEntityEntry, type HandlerEntry as CoreHandlerEntry } from '@fougere/core'; type EntityEntry = Pick; type HandlerEntry = Pick & { operations: Map; ctor?: { name?: string; }; }; interface PresenterFieldMeta { name: string; returnType?: string; /** The field emits a list per row, the page level of its return type removed. */ list?: boolean; nullable?: boolean; } interface PresenterEntry { entityName: string; fields: string[]; fieldMeta: PresenterFieldMeta[]; /** The view each computed field emits, when the presenter declares one. */ views?: Record; } interface FrondLike { name: string; entities: EntityEntry[]; handlers: HandlerEntry[]; presenters: PresenterEntry[]; /** What may stand in front of a presenter — `implements Partial>` — and add its fields. */ providers?: ProviderEntry[]; surfaces?: Record; } interface AppLike { fronds: FrondLike[]; /** The façade an address serves to one audience — `undefined` when none. */ facadeFor(address: string, surface?: string): Record | undefined; /** Canonical operation table produced by core. */ operationsFor(address: string, surface?: string): Map | undefined; /** The presenter of an entity — `undefined` when none. */ presenterFor(entity: string): unknown | undefined; } export interface RegisterAllOptions { /** Keep only the addresses this answers true for. Default: every address served. */ filter?: (address: string, frondName: string) => boolean; /** Surface name for filtering (e.g. 'graphql', 'rest'). Uses frond.config.ts surfaces if set. */ surface?: string; } /** Auto-register GraphQL types and operations from a fougere App. */ export declare function registerAll(builder: InstanceType, app: AppLike, options?: RegisterAllOptions): void; export {}; //# sourceMappingURL=auto-register.d.ts.map