/** Discriminator for {@link ResourceRefreshFailure}; library callers can ignore the tag and read `.message` / `.ok`. */ export type ResourceRefreshFailureReason = "solution_not_found" | "not_a_solution" | "auth_failed" | "sync_failed"; export interface ResourceRefreshOptions { /** Minimum minutes before token expiration to trigger a refresh. Default `10` (matches the CLI's `--login-validity`). */ loginValidity?: number; /** Pin auth to this exact `.uipath/.auth` path. */ envFilePath?: string; /** * Resolves each project's contributed subType, keyed by the `.uipx` * project `Id`. Called after the folder and auth checks pass and before * the sync, so a caller that has to load tool bundles to answer only pays * for them on a run that is otherwise going to proceed. */ resolveProjectSubTypesAsync?: () => Promise>; } export interface ResourceRefreshSuccess { ok: true; /** Resources newly created (virtualized) in the solution this run. */ created: number; /** Resources imported from Orchestrator into the solution this run. */ imported: number; /** Bindings whose cloud key was already in the solution (no-op this run). */ skipped: number; /** Stale `name_` clones of the solution's own member projects removed this run. */ pruned: number; /** Non-fatal advisories (e.g. unresolved connections, link-before-deploy hints). */ warnings: string[]; } export interface ResourceRefreshFailure { ok: false; reason: ResourceRefreshFailureReason; /** Human-readable summary suitable for top-level surfacing. */ message: string; } export type ResourceRefreshResult = ResourceRefreshSuccess | ResourceRefreshFailure; /** * Programmatic core of `uip solution resources refresh`: re-scans every project's * `bindings_v2.json` and syncs resource declarations into the solution, importing * from Orchestrator when a match exists and virtualizing the rest. Returns a tagged * {@link ResourceRefreshResult}; re-throws only on unexpected errors. Mirrors * `./pack` / `./publish` / `./deploy`. */ export declare function resourceRefreshAsync(solutionPath?: string, options?: ResourceRefreshOptions): Promise;