import { type IFileSystem } from "@uipath/filesystem"; import type { ISolutionContext } from "@uipath/resource-builder-sdk/models"; import type { IArtifactResourceSpecEnhancer, ResourcePropertyMetadata } from "@uipath/resource-builder-sdk/services"; import type { ResourceDefinition } from "@uipath/resource-builder-sdk/solution"; /** * Reads the project's `entry-points.json` at GET time and projects the primary * entry points onto the resource spec, so consumers see the current on-disk * state — not the snapshot captured at `solution projects add`. * * Mirrors the shape Studio Web returns from its process configuration * endpoint: `entryPoints` always carries the raw `entry-points.json` text; * `entryPointName` / `entryPointUniqueId` are populated only when the project * has exactly one entry, and are explicit `null` for multi-entry or empty * projects. * * Read-only by design: never mutates the on-disk resource JSON. Spec * degradation (missing/malformed file) is swallowed so `resource get` stays * functional. */ export declare class EntryPointSpecEnhancer implements IArtifactResourceSpecEnhancer { private readonly fs; constructor(fs?: IFileSystem); enhanceSpecAsync(context: ISolutionContext, resource: ResourceDefinition, _propertiesMetadata: Map, spec: Map, _cancellationToken?: AbortSignal): Promise; private applyEntryPointAsync; } /** * The entry-point spec keys for one project, read fresh off disk. * * One implementation, two consumers: `EntryPointSpecEnhancer` overlays them at * GET time, and solution-tool's contribution driver writes the same keys onto * the resource JSON so they survive into the packed solution. Keeping the * parsing here is what stops the two paths disagreeing on the shape. * * `entryPoints` carries the raw `entry-points.json` text (with `$schema`, * `$id`, indentation) — matches what Studio Web returns on the process * resource spec. `entryPointName` / `entryPointUniqueId` name the single * primary entry, and are `null` whenever the project has zero or several. * * Returns `undefined` when there is nothing to say (project not in the * manifest, no `entry-points.json`, empty file). Throws on malformed JSON — * both callers catch and warn. */ export declare function computeEntryPointSpec(fs: IFileSystem, solutionDir: string, projectKey: string): Promise | undefined>; /** * Applies `EntryPointSpecEnhancer` against a plain-object spec returned by the * SDK's `getConfigurationAsync` path. Used by `resource get` until the SDK * invokes `enhanceSpecAsync` itself from `GetMappedResourceConfigurationRequestHandler`; * once that lands this becomes a redundant no-op for the same on-disk state. */ export declare function applyEntryPointEnhancementAsync(context: ISolutionContext, resource: ResourceDefinition, spec: Record): Promise>;