@uipath/solution-sdk 1.203.0-preview.212 → 1.204.0-preview.211

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 (27) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +2 -2
  2. package/dist/{embedded-file-reader-xxqe8vs8.js → embedded-file-reader-rf2g1kfj.js} +2 -2
  3. package/dist/generated/src/apis/DeploymentsApi.d.ts +27 -23
  4. package/dist/generated/src/models/DeploymentResourceInfo.d.ts +109 -0
  5. package/dist/generated/src/models/DeploymentResourceReplacementDto.d.ts +50 -0
  6. package/dist/generated/src/models/DeploymentUpgradeState.d.ts +27 -0
  7. package/dist/generated/src/models/PageInfoDtoOfDeploymentResourceInfo.d.ts +39 -0
  8. package/dist/generated/src/models/ResetConfigurationSource.d.ts +25 -0
  9. package/dist/generated/src/models/index.d.ts +5 -2
  10. package/dist/{index-y8tgscfm.js → index-6gp5j7j5.js} +22 -6
  11. package/dist/{index-4zqv4bn2.js → index-bdpp6dsk.js} +565 -92
  12. package/dist/index.js +345 -209
  13. package/dist/resources/index.js +418 -82
  14. package/dist/scripts/generate-sdk.js +14 -7
  15. package/dist/solution-auth.js +1 -1
  16. package/dist/src/index.d.ts +0 -1
  17. package/dist/src/resources/index.d.ts +2 -0
  18. package/dist/src/resources/providers/resource-builder-init.d.ts +1 -1
  19. package/dist/src/resources/services/remote-resources.d.ts +45 -0
  20. package/dist/src/resources/services/resource-name.d.ts +28 -0
  21. package/dist/src/resources/services/sync-resources-from-bindings.d.ts +17 -5
  22. package/dist/src/solution-auth.d.ts +3 -0
  23. package/dist/src/zip-utils.d.ts +8 -0
  24. package/package.json +2 -2
  25. package/dist/generated/src/models/DeploymentRunResponse.d.ts +0 -51
  26. package/dist/generated/src/models/DeploymentUpgradeRequest.d.ts +0 -38
  27. package/dist/src/deployments-auto-install.d.ts +0 -55
@@ -69,24 +69,31 @@ function filterSwaggerPaths(swagger) {
69
69
  "/api/v3/search/"
70
70
  ];
71
71
  const explicitlyIncludedPaths = [
72
- "/api/deployments/{deploymentKey}",
73
- "/api/deployments/{deploymentKey}/upgrade",
74
- "/api/deployments/{deploymentKey}/run",
75
72
  "/api/deployments/{deploymentKey}/validation-result",
73
+ "/api/deployments/{deploymentKey}",
74
+ "/api/deployments/{deploymentKey}/resources",
76
75
  "/api/deployments/deploy",
77
76
  "/api/search/packages",
78
77
  "/api/v3/search/deployments"
79
78
  ];
79
+ const includedMethodsByPath = {
80
+ "/api/deployments/{deploymentKey}": ["get", "delete"],
81
+ "/api/deployments/{deploymentKey}/resources": ["get"]
82
+ };
80
83
  for (const [path, methods] of Object.entries(swagger.paths)) {
81
84
  const isExplicitlyIncluded = explicitlyIncludedPaths.includes(path);
82
85
  const shouldExclude = !isExplicitlyIncluded && excludedPathPrefixes.some((prefix) => path.startsWith(prefix));
83
86
  if (shouldExclude) {
84
87
  console.log(` Skipping path: ${path} (problematic headers)`);
85
88
  } else {
86
- if (path === "/api/deployments/{deploymentKey}") {
89
+ const includedMethods = includedMethodsByPath[path];
90
+ if (includedMethods) {
87
91
  const pathMethods = methods;
88
- filteredPaths[path] = { get: pathMethods.get };
89
- console.log(`Including path: GET ${path} (explicitly included)`);
92
+ filteredPaths[path] = Object.fromEntries(includedMethods.map((method) => [
93
+ method,
94
+ pathMethods[method]
95
+ ]));
96
+ console.log(`Including path: ${includedMethods.map((method) => method.toUpperCase()).join(", ")} ${path} (explicitly included)`);
90
97
  } else {
91
98
  filteredPaths[path] = methods;
92
99
  console.log(`Including path: ${path}`);
@@ -199,4 +206,4 @@ export {
199
206
  main as generateSdk
200
207
  };
201
208
 
202
- //# debugId=DC425A840998D54264756E2164756E21
209
+ //# debugId=5FDB74266FA3ECA564756E2164756E21
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getSolutionAuthContext
3
- } from "./index-y8tgscfm.js";
3
+ } from "./index-6gp5j7j5.js";
4
4
  import"./index-g0hcxnae.js";
5
5
  import"./index-1de529jm.js";
6
6
  export {
@@ -2,7 +2,6 @@ import "./user-agent.js";
2
2
  export { getAvailablePublishLocationsV2, type PublishLocationType, type PublishLocationV2, } from "@uipath/studioweb-sdk";
3
3
  export * from "../generated/src/index.js";
4
4
  export { buildSolutionPackageFromDir, bundleSolution, resolveSolutionDir, } from "./bundle-service";
5
- export { type AutoInstallClientConfig, type DeploymentAutoInstallRequest, deploymentsAutoInstall, } from "./deployments-auto-install";
6
5
  export { getProjectDebugStatus, isDebugProvisioningSucceeded, isDebugProvisioningTerminal, type ProjectDebugStatusClientConfig, type ProjectDebugStatusError, type ProjectDebugStatusResponse, } from "./project-debug-status";
7
6
  export { type PackageVersionSearchFilter, type PackageVersionSearchRow, type PackageVersionsClientConfig, searchPackageVersions, } from "./search-package-versions";
8
7
  export type { AutoCreatedSolution, ParentSolutionDiscovery, PrepareProjectLocationOptions, PrepareProjectLocationResult, ProjectSolutionRegistration, RegisterProjectOptions, SolutionManifestCreation, } from "./solution-file";
@@ -18,7 +18,9 @@ export * from "./services/entry-point-spec-enhancer";
18
18
  export * from "./services/local-resource-matcher";
19
19
  export * from "./services/project-artifacts-service";
20
20
  export * from "./services/project-template-types";
21
+ export * from "./services/remote-resources";
21
22
  export { normalizeResourceCasing, normalizeResourceFileCasing, saveCasingNormalized, } from "./services/resource-casing";
23
+ export * from "./services/resource-name";
22
24
  export * from "./services/resource-refresh-service";
23
25
  export * from "./services/resource-remote-sync";
24
26
  export * from "./services/solution-manifest";
@@ -1,4 +1,4 @@
1
- import type { IResourceBuilderServices } from "@uipath/resource-builder-sdk";
1
+ import { type IResourceBuilderServices } from "@uipath/resource-builder-sdk";
2
2
  /**
3
3
  * CLI entry for ResourceBuilderServices. Adds three providers on top of the SDK
4
4
  * defaults: `ArtefactPairBindingSolutionDefinitionFactory` (fills the
@@ -0,0 +1,45 @@
1
+ import type { IResourceBuilderServices } from "@uipath/resource-builder-sdk";
2
+ import type { IResourceCatalogClientProxy } from "@uipath/resource-builder-sdk/clients";
3
+ import type { EnhancedResourceDefinition, IImportResourceHelper } from "@uipath/resource-builder-sdk/helpers";
4
+ import type { ResourceReferenceModel } from "@uipath/resource-builder-sdk/models";
5
+ /** One resource catalog row; the SDK does not export a name for it. */
6
+ export type CatalogEntity = NonNullable<Awaited<ReturnType<IResourceCatalogClientProxy["searchFolderEntities"]>>["items"]>[number];
7
+ export interface RemoteResourceClients {
8
+ catalog: IResourceCatalogClientProxy;
9
+ importer: IImportResourceHelper;
10
+ }
11
+ export declare function getRemoteResourceClients(services: IResourceBuilderServices): RemoteResourceClients;
12
+ export interface CatalogQuery {
13
+ name?: string;
14
+ entityTypes?: string[];
15
+ }
16
+ /** Pages through the resource catalog and returns the first row `match` accepts. */
17
+ export declare function findCatalogEntityAsync(catalog: IResourceCatalogClientProxy, query: CatalogQuery, match: (entity: CatalogEntity) => boolean): Promise<CatalogEntity | undefined>;
18
+ export declare function toResourceReference(entity: CatalogEntity): ResourceReferenceModel;
19
+ /** A catalog entity named by what a cached catalog row already holds. */
20
+ export interface CatalogReference {
21
+ kind: string;
22
+ type?: string;
23
+ key: string;
24
+ name?: string;
25
+ folderPath?: string;
26
+ folderKey?: string;
27
+ }
28
+ export declare function toCatalogReference(reference: CatalogReference): ResourceReferenceModel;
29
+ /**
30
+ * The export carries the resource plus its transitive dependencies, so the
31
+ * definition is picked by key; `undefined` when the export holds none for it.
32
+ */
33
+ export declare function exportResourceDefinitionAsync(importer: IImportResourceHelper, reference: ResourceReferenceModel): Promise<EnhancedResourceDefinition | undefined>;
34
+ /** Reads a spec property by exact name, falling back to a case-insensitive match. */
35
+ export declare function readSpecProperty(spec: Record<string, unknown> | null | undefined, name: string): unknown;
36
+ /** Same row shape as `uip or packages entry-points`; the schemas stay JSON strings. */
37
+ export interface CatalogEntryPoint {
38
+ UniqueId: string;
39
+ Path: string;
40
+ DisplayName: string;
41
+ InputArguments: unknown;
42
+ OutputArguments: unknown;
43
+ }
44
+ /** The `entryPoints` on an exported resource spec; `undefined` when the spec carries none. */
45
+ export declare function readSpecEntryPoints(spec: Record<string, unknown> | null | undefined): CatalogEntryPoint[] | undefined;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Validation for a resource name that is about to become a file under
3
+ * `resources/<folder>/<kind>/<name>.json`. Shared by every path that mints a
4
+ * local resource (`solution resources add --source local`, `agent memory
5
+ * add` inside a solution), so a name is checked the same way before any
6
+ * write regardless of which tool asked.
7
+ */
8
+ /** Orchestrator's most permissive resource-name limit is 256 chars (Asset). */
9
+ export declare const MAX_RESOURCE_NAME_LENGTH = 256;
10
+ export type ResourceNameValidation = {
11
+ ok: true;
12
+ } | {
13
+ ok: false;
14
+ message: string;
15
+ instructions: string;
16
+ };
17
+ /**
18
+ * Check a resource name for length and unsafe characters. `optionName` is
19
+ * the CLI flag the name came from, so the message points at the right one
20
+ * (`--name` for `resources add`, `--memory-space` for `agent memory add`).
21
+ */
22
+ export declare function validateResourceName(name: string, options?: {
23
+ optionName?: string;
24
+ }): ResourceNameValidation;
25
+ /** Throwing form for callers that already run inside a `catchError` block. */
26
+ export declare function assertValidResourceName(name: string, options?: {
27
+ optionName?: string;
28
+ }): void;
@@ -26,8 +26,12 @@ export interface ResolvedKindMetadata {
26
26
  * newer metadata version still counts.
27
27
  */
28
28
  specProperties: Set<string>;
29
+ subtypes: string[];
30
+ typeMatched: boolean;
29
31
  }
30
32
  export { findMatchingLocalResource, findMatchingMemberResource, findMemberCloneResources, normalizeFolderPath, } from "./local-resource-matcher";
33
+ export declare function formatResourceSubtypes(subtypes: string[]): string;
34
+ export declare function sameResourceSubtype(a: string | undefined, b: string | undefined): boolean;
31
35
  interface SyncResult {
32
36
  created: number;
33
37
  imported: number;
@@ -61,10 +65,10 @@ export declare function uniqueNameForResource(name: string, kind: string, exclud
61
65
  export interface RcsMatch {
62
66
  key: string;
63
67
  name: string;
64
- /** Subtype as RCS reports it (e.g. `Text` for Asset). `undefined` for
65
- * kinds without a subtype (Queue). Callers may need to forward this to
66
- * `addOrUpdateResourceToSolutionAsync`, which rejects type-less imports
67
- * for kinds that SDK metadata indexes by (kind, type). */
68
+ /** Subtype in its solution name (e.g. `stringAsset` for a Text asset).
69
+ * `undefined` for kinds without a subtype (Queue). Callers may need to
70
+ * forward this to `addOrUpdateResourceToSolutionAsync`, which rejects
71
+ * type-less imports for kinds that SDK metadata indexes by (kind, type). */
68
72
  type?: string;
69
73
  folder?: {
70
74
  fullyQualifiedName: string;
@@ -83,9 +87,17 @@ export declare function findResourceByKeyInRcs(builder: ISolutionBuilder, kind:
83
87
  /**
84
88
  * Page through RCS for a given (kind, name) and collect every match. Returns
85
89
  * an empty array on lookup error (logged as a warning). Callers decide what
86
- * to do with 0/1/many matches.
90
+ * to do with 0/1/many matches. Callers that must tell "nothing matched"
91
+ * from "the catalog could not be searched" use {@link searchRcsResourcesStrict}.
87
92
  */
88
93
  export declare function searchRcsResources(builder: ISolutionBuilder, kind: string, name: string): Promise<RcsMatch[]>;
94
+ /**
95
+ * Same search as {@link searchRcsResources}, but a failed catalog call is
96
+ * thrown instead of swallowed into an empty result. Use it where an empty
97
+ * answer leads to a user-facing "not found" that would be wrong after an
98
+ * auth or network failure.
99
+ */
100
+ export declare function searchRcsResourcesStrict(builder: ISolutionBuilder, kind: string, name: string): Promise<RcsMatch[]>;
89
101
  export declare function findResourceInRcs(builder: ISolutionBuilder, kind: string, name: string, folderPath?: string): Promise<RcsMatch | undefined>;
90
102
  /**
91
103
  * Build a resolver that answers kind-metadata questions for many (kind, type)
@@ -1,8 +1,11 @@
1
+ import { type SessionIdentity } from "@uipath/auth";
1
2
  export interface SolutionAuthContext {
2
3
  accessToken: string;
3
4
  basePath: string;
4
5
  organizationId: string;
5
6
  tenantName: string;
7
+ /** Who the session acts as, as the login status resolved it (see `AuthContext.identity`). */
8
+ identity?: SessionIdentity;
6
9
  }
7
10
  export declare function getSolutionAuthContext(options: {
8
11
  tenant?: string;
@@ -18,6 +18,14 @@ import type { IFileSystem } from "@uipath/filesystem";
18
18
  * restores its own packages on import, so uploading this one
19
19
  * only costs bundle size and time.
20
20
  *
21
+ * .flow-sdk The Maestro builder SDK's authoring work directory: the
22
+ * `.flow.ts` source, its author-side `bindings.json` and the
23
+ * generated connector modules. Studio Web reads none of them;
24
+ * it gets the compiled `.flow` and `bindings_v2.json` beside
25
+ * this folder. Excluded by name, not as "any dot-folder":
26
+ * `.project` (IDE state) and `.agent-builder` (inline agents)
27
+ * must still ship.
28
+ *
21
29
  * Callers can extend this set per-walk via the `additionalExcludeDirs` option
22
30
  * (sourced from a `.uipignore` file at the solution root by bundle-service).
23
31
  */
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.203.0-preview.212",
5
+ "version": "1.204.0-preview.211",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/UiPath/cli.git",
@@ -40,5 +40,5 @@
40
40
  "dist"
41
41
  ],
42
42
  "private": false,
43
- "gitHead": "15094ce85cf76c59a54affbed3304febc271f41a"
43
+ "gitHead": "275e01f1f6098d4c3bc9673f5225f33372822534"
44
44
  }
@@ -1,51 +0,0 @@
1
- /**
2
- * UiPath.AutomationSolutionsService.WebApi 1.0
3
- * Solutions API
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { ServiceMessage } from './ServiceMessage';
13
- /**
14
- *
15
- * @export
16
- * @interface DeploymentRunResponse
17
- */
18
- export interface DeploymentRunResponse {
19
- /**
20
- *
21
- * @type {string}
22
- * @memberof DeploymentRunResponse
23
- */
24
- instanceId?: string | null;
25
- /**
26
- *
27
- * @type {boolean}
28
- * @memberof DeploymentRunResponse
29
- */
30
- scheduled: boolean;
31
- /**
32
- *
33
- * @type {Array<ServiceMessage>}
34
- * @memberof DeploymentRunResponse
35
- */
36
- errors: Array<ServiceMessage>;
37
- /**
38
- *
39
- * @type {boolean}
40
- * @memberof DeploymentRunResponse
41
- */
42
- complete: boolean;
43
- }
44
- /**
45
- * Check if a given object implements the DeploymentRunResponse interface.
46
- */
47
- export declare function instanceOfDeploymentRunResponse(value: object): value is DeploymentRunResponse;
48
- export declare function DeploymentRunResponseFromJSON(json: any): DeploymentRunResponse;
49
- export declare function DeploymentRunResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeploymentRunResponse;
50
- export declare function DeploymentRunResponseToJSON(json: any): DeploymentRunResponse;
51
- export declare function DeploymentRunResponseToJSONTyped(value?: DeploymentRunResponse | null, ignoreDiscriminator?: boolean): any;
@@ -1,38 +0,0 @@
1
- /**
2
- * UiPath.AutomationSolutionsService.WebApi 1.0
3
- * Solutions API
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- /**
13
- *
14
- * @export
15
- * @interface DeploymentUpgradeRequest
16
- */
17
- export interface DeploymentUpgradeRequest {
18
- /**
19
- *
20
- * @type {string}
21
- * @memberof DeploymentUpgradeRequest
22
- */
23
- deploymentName?: string | null;
24
- /**
25
- *
26
- * @type {string}
27
- * @memberof DeploymentUpgradeRequest
28
- */
29
- packageVersionKey?: string | null;
30
- }
31
- /**
32
- * Check if a given object implements the DeploymentUpgradeRequest interface.
33
- */
34
- export declare function instanceOfDeploymentUpgradeRequest(value: object): value is DeploymentUpgradeRequest;
35
- export declare function DeploymentUpgradeRequestFromJSON(json: any): DeploymentUpgradeRequest;
36
- export declare function DeploymentUpgradeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeploymentUpgradeRequest;
37
- export declare function DeploymentUpgradeRequestToJSON(json: any): DeploymentUpgradeRequest;
38
- export declare function DeploymentUpgradeRequestToJSONTyped(value?: DeploymentUpgradeRequest | null, ignoreDiscriminator?: boolean): any;
@@ -1,55 +0,0 @@
1
- /**
2
- * Automation Solutions "auto-install" deploy (v2).
3
- *
4
- * Hand-written wrapper — `POST /api/v2/deployments/auto-install` is not yet in
5
- * the committed swagger the generator pulls from, so it isn't in the generated
6
- * `DeploymentsApi`. It supersedes the older `POST /api/deployments/deploy`
7
- * (generated `deploymentsDeploy`) for feed deploys: unlike that endpoint, it
8
- * accepts a caller-chosen `deploymentName` and `solutionRootFolderName`
9
- * instead of auto-naming the deployment `AutoDeploy-<solution>`. It is the
10
- * same call Studio Web makes for a deploy-only ("packageAndDeploy: false")
11
- * flow. Once the v2 path ships in the spec, regenerate and drop this file in
12
- * favor of the generated method.
13
- */
14
- /** Auth/endpoint inputs for {@link deploymentsAutoInstall}. */
15
- export interface AutoInstallClientConfig {
16
- /** Tenant-scoped Automation Solutions base path (`.../automationsolutions_`). */
17
- basePath: string;
18
- accessToken: string;
19
- }
20
- /** Body of `POST /api/v2/deployments/auto-install` (mirrors Studio Web). */
21
- export interface DeploymentAutoInstallRequest {
22
- /** Caller-chosen deployment name — the field the v1 auto-deploy endpoint lacked. */
23
- deploymentName: string;
24
- packageVersionKey: string;
25
- /** Client-generated GUID for the deployment to create. */
26
- newDeploymentKey: string;
27
- /** Activate right after install (server-side; no separate activate call). */
28
- forceActivate: boolean;
29
- /** Key of the folder the deployment installs into. The server creates
30
- * `solutionRootFolderName` under THIS folder — not under
31
- * `pathFullyQualifiedName`, which only feeds the deployment record. */
32
- installationFolderKey: string;
33
- /** FQN of that same folder — recorded as the deployment's displayed path,
34
- * so it must agree with `installationFolderKey`. */
35
- pathFullyQualifiedName: string;
36
- /** False → deploy an already-published package (the CLI's case). */
37
- packageAndDeploy: boolean;
38
- /** Name of the new Orchestrator folder created for the deployment. */
39
- solutionRootFolderName: string;
40
- pauseBeforeRun: boolean;
41
- runtimeSetup?: {
42
- requireServerlessTemplate: boolean;
43
- };
44
- }
45
- /**
46
- * Deploy a feed package via the v2 auto-install endpoint.
47
- *
48
- * `feedFolderKey` is sent as `X-UIPATH-FolderKey` so the server resolves the
49
- * package version within that feed (same scoping the search endpoints use).
50
- * Non-2xx responses throw the generated runtime's {@link ResponseError} so
51
- * callers' `extractErrorDetails` handling (status + body parsing) works
52
- * unchanged. The response body is returned parsed when it is a JSON object,
53
- * `{}` otherwise — the endpoint's response shape is not pinned by the spec yet.
54
- */
55
- export declare function deploymentsAutoInstall(config: AutoInstallClientConfig, request: DeploymentAutoInstallRequest, feedFolderKey: string): Promise<Record<string, unknown>>;