export type ReadTrackedFile = (file: string) => string; export interface RoutedPage { file: string; isTopLevel: boolean; slug: string; } export interface FiniteEnumFiles { existingFileSet: ReadonlySet; unionCollectionPages: RoutedPage[]; unionCreatePages: RoutedPage[]; unionDetailPages: RoutedPage[]; structuredCollectionPages: RoutedPage[]; structuredComponentFiles: { file: string; slug: string; }[]; structuredDetailPages: RoutedPage[]; } /** Selection and diagnostics are supplied by the consumer, never inferred from its layout. */ export interface FiniteEnumRippleConfig { files: FiniteEnumFiles; /** Appended to every diagnostic; use for a consumer-owned policy guide. */ diagnosticSuffix?: string; structured?: { backendPath: string; webPath: string; routeConfigsPath: string; typeObject: string; routeConfigObject: string; typeArrayProperty: string; pluralPathProperty: string; singularPathProperty: string; routeExemptionProperty: string; slugProperty: string; slugPluralProperty: string; factoryCallPattern: RegExp; routeConfigExceptions: readonly string[]; /** Declared values intentionally without a collection route. */ collectionRouteExclusions: readonly string[]; routeLabels: { detailTop: string; detail: string; collectionTop: string; collection: string; }; collectionLabel: string; /** Wording for collection path diagnostics; defaults to collectionLabel. */ collectionPathLabel?: string; ignoredNavigationPaths: readonly string[]; collectionPathLiteralPattern: RegExp; navigationPathLiteralPattern: RegExp; }; union?: { typesPath: string; routeConfigsPath: string; typeAlias: string; slugMapObject: string; routeConfigObject: string; typeArrayProperty: string; pluralPathProperty: string; singularPathProperty: string; factoryCallPattern: RegExp; internalTypes: readonly string[]; routeConfigExceptions: readonly string[]; routeLabels: { detailTop: string; detail: string; collectionTop: string; collection: string; factory: string; }; collectionLabel: string; /** Wording for collection path diagnostics; defaults to collectionLabel. */ collectionPathLabel?: string; createPageTypeProperties: readonly string[]; collectionPathLiteralPattern: RegExp; }; }