@uipath/solution-sdk 1.204.0-preview.254 → 1.205.0-preview.256

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +2 -2
  2. package/dist/deployment-search.js +182 -0
  3. package/dist/{embedded-file-reader-rf2g1kfj.js → embedded-file-reader-z4becc02.js} +2 -2
  4. package/dist/index-78paj2kz.js +1908 -0
  5. package/dist/index-7h5s8895.js +3004 -0
  6. package/dist/index-cs3g624n.js +28 -0
  7. package/dist/{index-fb21bjwj.js → index-enc2hqq5.js} +255 -1409
  8. package/dist/{index-6gp5j7j5.js → index-hkexw5er.js} +193 -118
  9. package/dist/{index-g0hcxnae.js → index-y4vgqz1w.js} +11 -1
  10. package/dist/index-zmneg45c.js +1184 -0
  11. package/dist/index.js +1551 -4214
  12. package/dist/package-search.js +105 -0
  13. package/dist/resources/index.js +1183 -1177
  14. package/dist/solution-auth.js +4 -3
  15. package/dist/src/deployment-search.d.ts +104 -0
  16. package/dist/src/legacy-deployment-search-v3.d.ts +24 -0
  17. package/dist/src/legacy-package-search.d.ts +25 -0
  18. package/dist/src/package-search.d.ts +41 -0
  19. package/dist/src/pipelines-route.d.ts +43 -0
  20. package/dist/src/resources/index.d.ts +3 -0
  21. package/dist/src/resources/providers/artefact-pair-binding-provider.d.ts +4 -0
  22. package/dist/src/resources/services/catalog-lookup-failure.d.ts +50 -0
  23. package/dist/src/resources/services/remote-resources.d.ts +2 -0
  24. package/dist/src/resources/services/resource-configurations.d.ts +44 -0
  25. package/dist/src/resources/services/resource-lookup.d.ts +29 -0
  26. package/dist/src/resources/services/resource-refresh-service.d.ts +13 -0
  27. package/dist/src/resources/services/sync-resources-from-bindings.d.ts +43 -6
  28. package/dist/src/zip-utils.d.ts +5 -0
  29. package/package.json +10 -2
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  getSolutionAuthContext
3
- } from "./index-6gp5j7j5.js";
4
- import"./index-g0hcxnae.js";
3
+ } from "./index-cs3g624n.js";
4
+ import"./index-hkexw5er.js";
5
+ import"./index-y4vgqz1w.js";
5
6
  import"./index-1de529jm.js";
6
7
  export {
7
8
  getSolutionAuthContext
8
9
  };
9
10
 
10
- //# debugId=434EB7083BB9C46564756E2164756E21
11
+ //# debugId=C1859EA14CD133DF64756E2164756E21
@@ -0,0 +1,104 @@
1
+ import { type DeploymentActivationStatus, type DeploymentOperationStatus, type DeploymentSearchItemDto2, type InitOverrideFunction } from "../generated/src/index.js";
2
+ import type { SolutionAuthContext } from "./solution-auth.js";
3
+ export type DeploymentSearchSource = "pipelines" | "legacy-v3";
4
+ /** One page of the deployment search, in the terms both routes understand. */
5
+ export interface DeploymentSearchQuery {
6
+ take: number;
7
+ skip: number;
8
+ /**
9
+ * Exact name. Filtered by the server on the Pipelines route; a substring
10
+ * term on the legacy one, so callers keep their exact match.
11
+ */
12
+ deploymentName?: string;
13
+ packageName?: string;
14
+ /** The row's parent folder by full path: exact, case-insensitive, subfolders excluded. */
15
+ targetFolderName?: string;
16
+ searchTerm?: string;
17
+ orderByColumn?: string;
18
+ orderByDirection?: "Ascending" | "Descending";
19
+ operationStatuses?: DeploymentOperationStatus[];
20
+ activationStatuses?: DeploymentActivationStatus[];
21
+ }
22
+ export interface DeploymentSearchPage {
23
+ /** The filtered total; `undefined` when the server omits it. */
24
+ count?: number;
25
+ values: DeploymentSearchItemDto2[];
26
+ /** Which route answered — for logs and tests, never for output. */
27
+ source: DeploymentSearchSource;
28
+ }
29
+ /**
30
+ * The server has only the legacy search, and that one reads user tokens only.
31
+ * Thrown instead of making a request that can only answer 403, so a caller can
32
+ * tell "cannot be read with this login" from an outage.
33
+ */
34
+ export declare class DeploymentSearchNeedsUserSessionError extends Error {
35
+ constructor();
36
+ }
37
+ /**
38
+ * Why {@link searchDeployments} stopped before the end of the feed:
39
+ * - `page-cap`: it read as many pages as it may, and more rows remain.
40
+ * - `skip-ignored`: the server handed the same page back, so it ignores
41
+ * `skip` and the rest cannot be reached.
42
+ * - `short-page`: the server counted more rows than it handed out — a page
43
+ * came back short or empty before the count was reached (rows deleted
44
+ * while paging, or a server that stops early).
45
+ */
46
+ export type DeploymentSearchTruncationReason = "page-cap" | "skip-ignored" | "short-page";
47
+ /**
48
+ * {@link searchDeployments} could not read the whole feed. Thrown rather than
49
+ * returning a partial list that looks complete; `reason` says why.
50
+ */
51
+ export declare class DeploymentSearchTruncatedError extends Error {
52
+ readonly rowsRead: number;
53
+ readonly reason: DeploymentSearchTruncationReason;
54
+ constructor(rowsRead: number, reason: DeploymentSearchTruncationReason);
55
+ }
56
+ /**
57
+ * One page of the deployment search. Goes to the Pipelines route
58
+ * (`POST /v1/pipelines/deployments/search`), which reads application sessions
59
+ * too and filters an exact name on the server. Only on a server without that
60
+ * route does it use the deprecated `POST /api/v3/search/deployments`, and that
61
+ * one reads user sessions only: for an application session it throws
62
+ * {@link DeploymentSearchNeedsUserSessionError} instead.
63
+ *
64
+ * Rows come back as this package's DTO either way — the Pipelines row is a
65
+ * superset of it, so its extra fields are dropped.
66
+ */
67
+ export declare function searchDeploymentsPage(auth: SolutionAuthContext, query: DeploymentSearchQuery, scope?: RequestInit | InitOverrideFunction): Promise<DeploymentSearchPage>;
68
+ export interface SearchDeploymentsOptions {
69
+ /** Narrows the search to this package. Sent to the server as `packageName`. */
70
+ readonly packageName?: string;
71
+ /**
72
+ * Also drop rows whose `packageName` is not exactly `packageName`. Off by
73
+ * default: the server's package filter is not guaranteed exact (the V3
74
+ * route matches it as a substring too), and a caller that compares names
75
+ * its own way needs the near matches.
76
+ */
77
+ readonly exactPackageMatch?: boolean;
78
+ /**
79
+ * Keep only rows whose parent folder is this full path. Sent to the server
80
+ * as `targetFolderName`: exact, case-insensitive, subfolders excluded.
81
+ */
82
+ readonly folderPath?: string;
83
+ readonly orderByColumn?: string;
84
+ readonly orderByDirection?: "Ascending" | "Descending";
85
+ /** Passed to every page request as its init override (for example a feed header). */
86
+ readonly scope?: RequestInit | InitOverrideFunction;
87
+ /** Rows per page. Defaults to 50. */
88
+ readonly pageSize?: number;
89
+ /** Pages read before giving up. Defaults to 20. */
90
+ readonly maxPages?: number;
91
+ }
92
+ /**
93
+ * Every deployment row the search returns, paged to the end through
94
+ * {@link searchDeploymentsPage}.
95
+ *
96
+ * Statuses are not filtered and rows come back as the service sent them:
97
+ * what counts as "installed", "blocking" or "current" differs per caller.
98
+ *
99
+ * Throws {@link DeploymentSearchTruncatedError} when it cannot read the whole
100
+ * feed (its `reason` says why), a `RangeError` when `pageSize` or `maxPages`
101
+ * is not a whole number of 1 or more, and whatever the page request throws
102
+ * otherwise.
103
+ */
104
+ export declare function searchDeployments(auth: SolutionAuthContext, options?: SearchDeploymentsOptions): Promise<DeploymentSearchItemDto2[]>;
@@ -0,0 +1,24 @@
1
+ import "./user-agent.js";
2
+ import { type InitOverrideFunction } from "../generated/src/index.js";
3
+ import type { DeploymentSearchQuery } from "./deployment-search.js";
4
+ import type { SolutionAuthContext } from "./solution-auth.js";
5
+ /** @deprecated See {@link searchDeploymentsLegacyV3}. */
6
+ export declare const LEGACY_V3_SEARCH_ROUTE = "POST /api/v3/search/deployments";
7
+ /**
8
+ * The deployment search as it was before the Pipelines route:
9
+ * `POST /api/v3/search/deployments`. It reads user tokens only, and has no
10
+ * exact-name filter, so a name travels as the substring `searchTerm` and the
11
+ * callers keep their own exact match. Answers the raw JSON body, which the
12
+ * caller parses with the same page parser as the Pipelines route's.
13
+ *
14
+ * @deprecated A bridge for rings that predate
15
+ * `POST /v1/pipelines/deployments/search` (SOL-7807), not a second path.
16
+ * Reached only through `searchDeploymentsPage` in `deployment-search.ts`, and
17
+ * only when the server answers the Pipelines route with "no such route".
18
+ * Remove this file, its branch and `DeploymentSearchNeedsUserSessionError` in
19
+ * `packages/solution-sdk/src/deployment-search.ts`, and the
20
+ * `/api/v3/search/deployments` entry in
21
+ * `packages/solution-sdk/src/scripts/generate-sdk.ts`, once the Pipelines
22
+ * route is on every production ring.
23
+ */
24
+ export declare function searchDeploymentsLegacyV3(auth: SolutionAuthContext, query: DeploymentSearchQuery, scope?: RequestInit | InitOverrideFunction): Promise<unknown>;
@@ -0,0 +1,25 @@
1
+ import "./user-agent.js";
2
+ import { type InitOverrideFunction } from "../generated/src/index.js";
3
+ import type { PackageSearchQuery } from "./package-search.js";
4
+ import type { SolutionAuthContext } from "./solution-auth.js";
5
+ /** @deprecated See {@link searchPackagesLegacy}. */
6
+ export declare const LEGACY_PACKAGE_SEARCH_ROUTE = "POST /api/search/packages";
7
+ /**
8
+ * The package search as it was before the Pipelines route:
9
+ * `POST /api/search/packages`. It reads user tokens only (it declares no S2S
10
+ * scheme and no OAuth scope), and takes the same filter as the Pipelines
11
+ * route. Answers the raw JSON body, which the caller parses with the same page
12
+ * parser as the Pipelines route's.
13
+ *
14
+ * @deprecated A bridge for rings that predate
15
+ * `POST /v1/pipelines/packages/search` (Automation.Solutions #9963), not a
16
+ * second path. Reached only through `searchPackagesPage` in
17
+ * `package-search.ts`, and only when the server answers the Pipelines route
18
+ * with "no such route". Remove this file, its branch and
19
+ * `PackageSearchNeedsUserSessionError` in
20
+ * `packages/solution-sdk/src/package-search.ts`, and the
21
+ * `/api/search/packages` entry in
22
+ * `packages/solution-sdk/src/scripts/generate-sdk.ts`, once the Pipelines
23
+ * route is on every production ring.
24
+ */
25
+ export declare function searchPackagesLegacy(auth: SolutionAuthContext, query: PackageSearchQuery, scope?: RequestInit | InitOverrideFunction): Promise<unknown>;
@@ -0,0 +1,41 @@
1
+ import { type InitOverrideFunction, type PackageInfo } from "../generated/src/index.js";
2
+ import type { SolutionAuthContext } from "./solution-auth.js";
3
+ export type PackageSearchSource = "pipelines" | "legacy";
4
+ /** One page of the package search, in the terms both routes understand. */
5
+ export interface PackageSearchQuery {
6
+ take: number;
7
+ skip: number;
8
+ /** Substring match on the package name. */
9
+ searchTerm?: string;
10
+ /** `name`, `latestVersion` (semantic order) or `publishDate`. */
11
+ orderByColumn?: string;
12
+ orderByDirection?: "Ascending" | "Descending";
13
+ }
14
+ export interface PackageSearchPage {
15
+ /** The filtered total; `undefined` when the server omits it. */
16
+ count?: number;
17
+ /** One row per package, carrying its latest release version. */
18
+ values: PackageInfo[];
19
+ /** Which route answered — for logs and tests, never for output. */
20
+ source: PackageSearchSource;
21
+ }
22
+ /**
23
+ * The server has only the legacy package search, and that one reads user
24
+ * tokens only. Thrown instead of making a request that can only answer 401, so
25
+ * a caller can tell "cannot be read with this login" from an outage.
26
+ */
27
+ export declare class PackageSearchNeedsUserSessionError extends Error {
28
+ constructor();
29
+ }
30
+ /**
31
+ * One page of the package search. Goes to the Pipelines route
32
+ * (`POST /v1/pipelines/packages/search`), which reads application sessions
33
+ * too. Only on a server without that route does it use the deprecated
34
+ * `POST /api/search/packages`, and that one reads user sessions only: for an
35
+ * application session it throws {@link PackageSearchNeedsUserSessionError}
36
+ * instead.
37
+ *
38
+ * Both routes answer the same query with the same rows, so the caller cannot
39
+ * tell them apart except by `source`.
40
+ */
41
+ export declare function searchPackagesPage(auth: SolutionAuthContext, query: PackageSearchQuery, scope?: RequestInit | InitOverrideFunction): Promise<PackageSearchPage>;
@@ -0,0 +1,43 @@
1
+ import type { SolutionAuthContext } from "./solution-auth.js";
2
+ /**
3
+ * Whether an error from a Pipelines search route means the server has no such
4
+ * route (and the deprecated search it replaces should answer), as opposed to
5
+ * a failure of the route itself. Measured on servers without them: the POST
6
+ * falls onto the GET route sharing its path prefix (`deployments/{key}`,
7
+ * `packages/{packageName}`) and answers **405** with no body; a path matching
8
+ * nothing answers 404 with no body. A 404 with *any* body — an `errorCode`, or
9
+ * a plain ProblemDetails — is the route answering, and must reach the caller.
10
+ */
11
+ export declare function isMissingPipelinesRoute(error: unknown): Promise<boolean>;
12
+ /**
13
+ * Whether the session acts as an application. The identity on the auth
14
+ * context comes first: the login status resolved it from the token's claims
15
+ * and the auth flow saved at login, which decoding the token cannot know. The
16
+ * decode is the fallback for a context that carries none.
17
+ */
18
+ export declare function isApplicationSession(auth: SolutionAuthContext): boolean;
19
+ /** The nouns a search page's refusals use, e.g. `deployment` / `deployments`. */
20
+ export interface SearchRowKind<T> {
21
+ readonly singular: string;
22
+ readonly plural: string;
23
+ /** This package's own deserializer for one row. */
24
+ readonly fromJSON: (row: unknown) => T;
25
+ /**
26
+ * Whether an object is a row at all. The generated deserializers never
27
+ * throw on a missing field — `{}` reads as a row of `undefined`s — so a
28
+ * search whose rows a caller identifies by some field says which here.
29
+ * Without it every object is accepted.
30
+ */
31
+ readonly isRow?: (row: object) => boolean;
32
+ }
33
+ /**
34
+ * One page of a search route, from its raw JSON body: `{ count?, values? }`,
35
+ * every row parsed by this package's own deserializer. A page that is not
36
+ * that shape must not read as "no rows": a caller checking for an existing
37
+ * name would act on it. A missing or null `values` is an empty page; a
38
+ * `count` that is not a number of 0 or more is unknown.
39
+ */
40
+ export declare function parseSearchPage<T>(body: unknown, route: string, kind: SearchRowKind<T>): {
41
+ count?: number;
42
+ values: T[];
43
+ };
@@ -14,12 +14,15 @@
14
14
  */
15
15
  export * from "./commands/project-utils";
16
16
  export * from "./providers/resource-builder-init";
17
+ export { CatalogLookupError, type CatalogLookupFailure, type UncheckedBinding, } from "./services/catalog-lookup-failure";
17
18
  export * from "./services/entry-point-spec-enhancer";
18
19
  export * from "./services/local-resource-matcher";
19
20
  export * from "./services/project-artifacts-service";
20
21
  export * from "./services/project-template-types";
21
22
  export * from "./services/remote-resources";
22
23
  export { normalizeResourceCasing, normalizeResourceFileCasing, saveCasingNormalized, } from "./services/resource-casing";
24
+ export * from "./services/resource-configurations";
25
+ export * from "./services/resource-lookup";
23
26
  export * from "./services/resource-name";
24
27
  export * from "./services/resource-refresh-service";
25
28
  export * from "./services/resource-remote-sync";
@@ -9,6 +9,10 @@ import { MultiFileSolutionDefinitionFactory, MultiFileSolutionDefinitionProvider
9
9
  * `undefined`-valued metadata-declared spec keys.
10
10
  */
11
11
  export declare class ArtefactPairBindingProvider extends MultiFileSolutionDefinitionProvider {
12
+ readAsync(context: ISolutionContext, cancellationToken?: AbortSignal): Promise<SolutionDefinition>;
13
+ protected replaceDuplicateKeysAsync(solution: SolutionDefinition): Promise<void>;
14
+ private describeDuplicateKeys;
15
+ private readResourceKey;
12
16
  writeAsync(context: ISolutionContext, solution: SolutionDefinition, cancellationToken?: AbortSignal): Promise<void>;
13
17
  }
14
18
  /**
@@ -0,0 +1,50 @@
1
+ import type { CliErrorCode, RetryHint } from "@uipath/common";
2
+ /** A binding the sync could not resolve against the cloud. */
3
+ export interface UncheckedBinding {
4
+ kind: string;
5
+ name: string;
6
+ }
7
+ /**
8
+ * - `no_session`: no login, so the SDK could not build a catalog client.
9
+ * - `refused`: the catalog answered 401 or 403.
10
+ * - `failed`: anything else (an outage, a 4xx for one binding, a network error).
11
+ */
12
+ export type CatalogFailureKind = "no_session" | "refused" | "failed";
13
+ /** Why the sync could not resolve a binding against the cloud. */
14
+ export interface CatalogLookupFailure {
15
+ /** The failed call's message, as the SDK reported it. */
16
+ message: string;
17
+ kind: CatalogFailureKind;
18
+ /** The HTTP status the message carried, when it carried one. */
19
+ status?: number;
20
+ }
21
+ /**
22
+ * The SDK's catalog proxy wraps every failure in an `InvalidOperationException`
23
+ * and keeps the HTTP status only in its text (`... Resource Catalog: HTTP 401
24
+ * - <detail>`, from `extractHttpErrorDetails`), so the status is read back off
25
+ * the message.
26
+ */
27
+ export declare function classifyCatalogFailure(error: unknown): CatalogLookupFailure;
28
+ /** Every later call would fail the same way, so the sync stops asking. */
29
+ export declare function stopsCatalogLookups(failure: CatalogLookupFailure): boolean;
30
+ /**
31
+ * The one warning a sync with a failed cloud call reports. `kept` are the
32
+ * bindings the solution already covers (left as they are); `unresolved` have
33
+ * nothing in the solution, and nothing was created for them — a local stub
34
+ * there would deploy as a new, empty resource instead of the cloud one.
35
+ */
36
+ export declare function catalogLookupWarning(failure: CatalogLookupFailure, kept: number, unresolved: readonly UncheckedBinding[]): string;
37
+ /**
38
+ * Thrown by a gating sync (pack, upload) when a binding has nothing in the
39
+ * solution and the cloud could not be asked for it. Carries `errorCode`,
40
+ * `retry` and `instructions` duck-typed, because it crosses a bundle boundary
41
+ * on its way to the envelope (`carriedErrorCode` / `carriedRetry` /
42
+ * `carriedInstructions`).
43
+ */
44
+ export declare class CatalogLookupError extends Error {
45
+ readonly errorCode: CliErrorCode;
46
+ readonly retry: RetryHint;
47
+ readonly instructions: string;
48
+ readonly unresolved: readonly UncheckedBinding[];
49
+ constructor(failure: CatalogLookupFailure, unresolved: readonly UncheckedBinding[]);
50
+ }
@@ -15,6 +15,8 @@ export interface CatalogQuery {
15
15
  }
16
16
  /** Pages through the resource catalog and returns the first row `match` accepts. */
17
17
  export declare function findCatalogEntityAsync(catalog: IResourceCatalogClientProxy, query: CatalogQuery, match: (entity: CatalogEntity) => boolean): Promise<CatalogEntity | undefined>;
18
+ /** Pages through the whole resource catalog and returns every row `match` accepts. */
19
+ export declare function findCatalogEntitiesAsync(catalog: IResourceCatalogClientProxy, query: CatalogQuery, match: (entity: CatalogEntity) => boolean): Promise<CatalogEntity[]>;
18
20
  export declare function toResourceReference(entity: CatalogEntity): ResourceReferenceModel;
19
21
  /** A catalog entity named by what a cached catalog row already holds. */
20
22
  export interface CatalogReference {
@@ -0,0 +1,44 @@
1
+ import type { IResourceBuilderServices } from "@uipath/resource-builder-sdk";
2
+ import type { AllResourceConfigurations, ResourceConfiguration } from "@uipath/resource-builder-sdk/models";
3
+ import type { ISolutionBuilder, ResourceDefinition } from "@uipath/resource-builder-sdk/solution";
4
+ /**
5
+ * Whether a local configuration read failed because the solution does not
6
+ * declare `resourceKey` — as opposed to a broken solution (a missing resource
7
+ * file, dependency or metadata), which must not fall back to a tenant copy.
8
+ */
9
+ export declare function isResourceKeyNotFound(error: unknown, resourceKey: string): boolean;
10
+ /**
11
+ * Refresh each project-backed configuration's spec from its live
12
+ * `entry-points.json`. The SDK registers the enhancer but does not run it on
13
+ * reads, so without this a read returns the snapshot taken at `projects add`.
14
+ * Returns the solution resource behind each configuration it found, by key;
15
+ * an unreadable solution leaves the specs as they are.
16
+ */
17
+ export declare function refreshArtefactSpecsAsync(builder: ISolutionBuilder, configurations: readonly ResourceConfiguration[]): Promise<Map<string, ResourceDefinition>>;
18
+ /** What the caller already knows about a resource, used to narrow the catalog search for its key. */
19
+ export interface ResourceLookupHint {
20
+ name?: string;
21
+ }
22
+ /**
23
+ * A resource the solution does not declare, read the way Studio Web's
24
+ * "retrieve configuration" does: the catalog row by key, then the FPS export,
25
+ * which carries the resource plus its transitive dependencies.
26
+ */
27
+ export declare function exportResourceConfigurationsAsync(services: IResourceBuilderServices, resourceKey: string, hint?: ResourceLookupHint): Promise<AllResourceConfigurations>;
28
+ /**
29
+ * A resource's configuration graph (itself plus its dependencies): from the
30
+ * local solution when `builder` declares the key, with project-backed specs
31
+ * refreshed, and from the tenant otherwise.
32
+ */
33
+ export declare function readResourceConfigurationsAsync(services: IResourceBuilderServices, builder: ISolutionBuilder | undefined, resourceKey: string, hint?: ResourceLookupHint): Promise<AllResourceConfigurations>;
34
+ export interface ResourceConfigurationRead {
35
+ configuration: ResourceConfiguration;
36
+ /** The local declaration behind `configuration`; absent for a tenant read. */
37
+ resource?: ResourceDefinition;
38
+ }
39
+ /**
40
+ * One resource's configuration, without its dependencies: from the local
41
+ * solution when `builder` declares the key, with its project-backed spec
42
+ * refreshed, and from the tenant otherwise.
43
+ */
44
+ export declare function readResourceConfigurationAsync(services: IResourceBuilderServices, builder: ISolutionBuilder | undefined, resourceKey: string): Promise<ResourceConfigurationRead>;
@@ -0,0 +1,29 @@
1
+ import type { IResourceBuilderServices } from "@uipath/resource-builder-sdk";
2
+ import type { ISolutionBuilder } from "@uipath/resource-builder-sdk/solution";
3
+ /** What a resource picker names: a kind, the resource's exact name, and optionally the subtypes and folder it narrows to. */
4
+ export interface ResourceNameLookup {
5
+ kind: string;
6
+ name: string;
7
+ /** Only these subtypes match (e.g. `["Native"]` for a Data Fabric entity), compared case-insensitively. */
8
+ subTypes?: readonly string[];
9
+ /** Narrows catalog rows to one folder; local resources carry no folder key. */
10
+ folderKey?: string;
11
+ }
12
+ export interface ResourceNameMatch {
13
+ key: string;
14
+ /** Declared in the local solution. */
15
+ local: boolean;
16
+ folderPath?: string;
17
+ folderKey?: string;
18
+ }
19
+ /**
20
+ * Every resource of `kind` named exactly `name` (both case-insensitive), of
21
+ * one of `subTypes` when given. When the local solution declares any, those
22
+ * are the resources it means and the tenant is not searched; otherwise every
23
+ * page of the resource catalog is read, narrowed by `folderKey`. Read-only.
24
+ *
25
+ * Unlike `findMatchingLocalResource`, this returns every match, so a caller
26
+ * can report a name that is ambiguous, and it does not accept the `name_<N>`
27
+ * suffixes an add may have minted: a picker names the resource as it is.
28
+ */
29
+ export declare function findResourcesByNameAsync(services: IResourceBuilderServices, builder: ISolutionBuilder | undefined, { kind, name, subTypes, folderKey }: ResourceNameLookup): Promise<ResourceNameMatch[]>;
@@ -1,3 +1,4 @@
1
+ import { type ContributedBinding } from "./sync-resources-from-bindings";
1
2
  /** Discriminator for {@link ResourceRefreshFailure}; library callers can ignore the tag and read `.message` / `.ok`. */
2
3
  export type ResourceRefreshFailureReason = "solution_not_found" | "not_a_solution" | "auth_failed" | "sync_failed";
3
4
  export interface ResourceRefreshOptions {
@@ -12,6 +13,12 @@ export interface ResourceRefreshOptions {
12
13
  * for them on a run that is otherwise going to proceed.
13
14
  */
14
15
  resolveProjectSubTypesAsync?: () => Promise<ReadonlyMap<string, string>>;
16
+ /**
17
+ * Resolves the bindings a project's own tool contributed, keyed by the
18
+ * `.uipx` project `Id`. Called right after `resolveProjectSubTypesAsync`,
19
+ * so a caller can answer both from one collect.
20
+ */
21
+ resolveProjectBindingsAsync?: () => Promise<ReadonlyMap<string, readonly ContributedBinding[]>>;
15
22
  }
16
23
  export interface ResourceRefreshSuccess {
17
24
  ok: true;
@@ -23,6 +30,12 @@ export interface ResourceRefreshSuccess {
23
30
  skipped: number;
24
31
  /** Stale `name_<N>` clones of the solution's own member projects removed this run. */
25
32
  pruned: number;
33
+ /**
34
+ * Project artefact resources (package, process, ...) the `.uipx` project
35
+ * reconcile added this run. Not part of `created`, which counts
36
+ * binding-driven resources only. `0` on a rerun with nothing new.
37
+ */
38
+ projectResourcesCreated: number;
26
39
  /** Non-fatal advisories (e.g. unresolved connections, link-before-deploy hints). */
27
40
  warnings: string[];
28
41
  }
@@ -1,5 +1,6 @@
1
1
  import type { IResourceBuilderServices } from "@uipath/resource-builder-sdk";
2
- import type { ISolutionBuilder, ResourceDefinition } from "@uipath/resource-builder-sdk/solution";
2
+ import { type ISolutionBuilder, type ResourceDefinition } from "@uipath/resource-builder-sdk/solution";
3
+ import { type CatalogLookupFailure, type UncheckedBinding } from "./catalog-lookup-failure";
3
4
  interface RequiredPropertyDefault {
4
5
  property: string;
5
6
  /** Empty placeholder value matching the property's declared type. */
@@ -32,13 +33,37 @@ export interface ResolvedKindMetadata {
32
33
  export { findMatchingLocalResource, findMatchingMemberResource, findMemberCloneResources, normalizeFolderPath, } from "./local-resource-matcher";
33
34
  export declare function formatResourceSubtypes(subtypes: string[]): string;
34
35
  export declare function sameResourceSubtype(a: string | undefined, b: string | undefined): boolean;
36
+ /**
37
+ * One `bindings_v2.json` `resources[]` entry, as a project's tool contributed
38
+ * it. Plain data: the project type that produced it is not this layer's
39
+ * concern (AGENTS.md Hard Rule #19).
40
+ */
41
+ export interface ContributedBinding {
42
+ resource: string;
43
+ key?: string;
44
+ [field: string]: unknown;
45
+ }
35
46
  interface SyncResult {
36
47
  created: number;
37
48
  imported: number;
38
49
  skipped: number;
39
50
  /** Stale `name_<N>` clones of member projects removed this run (UV-15817). */
40
51
  pruned: number;
52
+ /**
53
+ * Project artefact resources (package, process, ...) the `.uipx` project
54
+ * reconcile added this run. Separate from `created`, which counts
55
+ * binding-driven virtuals only; `0` on a rerun with nothing new.
56
+ */
57
+ projectResourcesCreated: number;
41
58
  warnings: string[];
59
+ /**
60
+ * Bindings with nothing in the solution whose Resource Catalog search
61
+ * failed. Nothing was created for them: "could not search" is not "not
62
+ * found", and a local stub would deploy as a new, empty resource.
63
+ */
64
+ unresolved: UncheckedBinding[];
65
+ /** Why the catalog could not be searched, when a search failed. */
66
+ catalogLookupFailure?: CatalogLookupFailure;
42
67
  }
43
68
  /**
44
69
  * Reads bindings_v2.json from project paths and creates/imports matching
@@ -46,8 +71,12 @@ interface SyncResult {
46
71
  *
47
72
  * @param solutionDir - Path to the solution directory
48
73
  * @param projectPaths - Specific project paths to scan (if omitted, scans all projects in .uipx)
74
+ * @param projectBindings - Bindings a project's own tool contributed, keyed by
75
+ * `.uipx` project `Id`, as `bindings_v2.json` `resources[]` entries. Read in
76
+ * place of that project's `bindings_v2.json`: such a project keeps its
77
+ * bindings in its own source format, so a file on disk is a stale copy.
49
78
  */
50
- export declare function syncResourcesFromBindings(solutionDir: string, projectPaths?: string[], projectSubTypes?: ReadonlyMap<string, string>): Promise<SyncResult>;
79
+ export declare function syncResourcesFromBindings(solutionDir: string, projectPaths?: string[], projectSubTypes?: ReadonlyMap<string, string>, projectBindings?: ReadonlyMap<string, readonly ContributedBinding[]>): Promise<SyncResult>;
51
80
  /**
52
81
  * Mirror of SDK's private `addResourceWithUniqueName`
53
82
  * (resource-builder-sdk index.js:673): if any other resource of the same
@@ -98,7 +127,7 @@ export declare function searchRcsResources(builder: ISolutionBuilder, kind: stri
98
127
  * auth or network failure.
99
128
  */
100
129
  export declare function searchRcsResourcesStrict(builder: ISolutionBuilder, kind: string, name: string): Promise<RcsMatch[]>;
101
- export declare function findResourceInRcs(builder: ISolutionBuilder, kind: string, name: string, folderPath?: string): Promise<RcsMatch | undefined>;
130
+ export declare function findResourceInRcs(builder: ISolutionBuilder, kind: string, name: string, folderPath?: string, propagateErrors?: boolean): Promise<RcsMatch | undefined>;
102
131
  /**
103
132
  * Build a resolver that answers kind-metadata questions for many (kind, type)
104
133
  * pairs off one `getOrderedAsync` fetch, caching per pair. Prefer this over
@@ -158,7 +187,15 @@ export interface UipxProject {
158
187
  */
159
188
  export declare function readUipxProjects(solutionDir: string): Promise<UipxProject[]>;
160
189
  /**
161
- * Sync resources from bindings with logging. Non-fatal — logs warnings
162
- * on failure and continues. Used by pack and upload before packaging.
190
+ * Sync resources from bindings with logging. Non-gating callers log failures
191
+ * and continue; pack and upload rethrow them so invalid bindings cannot ship.
192
+ *
193
+ * One exception, under `failOnUnresolved` (the gating callers): a binding
194
+ * the Resource Catalog could not be searched for and that the solution does
195
+ * not hold throws {@link CatalogLookupError} after the sync is saved. Packing
196
+ * without that resource ships a solution that deploys without it.
163
197
  */
164
- export declare function syncAndLog(solutionDir: string, projectSubTypes?: ReadonlyMap<string, string>): Promise<void>;
198
+ export declare function syncAndLog(solutionDir: string, projectSubTypes?: ReadonlyMap<string, string>, options?: {
199
+ projectBindings?: ReadonlyMap<string, readonly ContributedBinding[]>;
200
+ failOnUnresolved?: boolean;
201
+ }): Promise<void>;
@@ -26,6 +26,11 @@ import type { IFileSystem } from "@uipath/filesystem";
26
26
  * `.project` (IDE state) and `.agent-builder` (inline agents)
27
27
  * must still ship.
28
28
  *
29
+ * .flow-debug The full result of the last `flow debug --summary` run of
30
+ * each Flow project (`<solution>/.flow-debug/<project>.json`).
31
+ * A local diagnosis record, with tenant data in it; never
32
+ * part of the solution.
33
+ *
29
34
  * Callers can extend this set per-walk via the `additionalExcludeDirs` option.
30
35
  * User-authored excludes come from `.uipignore` files and go through
31
36
  * `ignoreRules` instead (see {@link UipignoreRules}).
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@uipath/solution-sdk",
3
3
  "author": "UiPath",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
- "version": "1.204.0-preview.254",
5
+ "version": "1.205.0-preview.256",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/UiPath/cli.git",
@@ -31,6 +31,14 @@
31
31
  "./auth": {
32
32
  "types": "./dist/src/solution-auth.d.ts",
33
33
  "default": "./dist/solution-auth.js"
34
+ },
35
+ "./deployments": {
36
+ "types": "./dist/src/deployment-search.d.ts",
37
+ "default": "./dist/deployment-search.js"
38
+ },
39
+ "./packages": {
40
+ "types": "./dist/src/package-search.d.ts",
41
+ "default": "./dist/package-search.js"
34
42
  }
35
43
  },
36
44
  "bin": {
@@ -40,5 +48,5 @@
40
48
  "dist"
41
49
  ],
42
50
  "private": false,
43
- "gitHead": "3ee79cdec05b36231a8da9e8de6bf0043585526a"
51
+ "gitHead": "63740c6cbb7ff282fa9118cc16a148eb030b245f"
44
52
  }