@uipath/solution-sdk 1.197.0 → 1.198.0-preview.80

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.
package/dist/index.js CHANGED
@@ -2535,7 +2535,7 @@ class TextApiResponse {
2535
2535
  var package_default = {
2536
2536
  name: "@uipath/solution-sdk",
2537
2537
  license: "MIT",
2538
- version: "1.197.0",
2538
+ version: "1.198.0-preview.80",
2539
2539
  repository: {
2540
2540
  type: "git",
2541
2541
  url: "https://github.com/UiPath/cli.git",
@@ -10439,6 +10439,7 @@ function getLogFilePath() {
10439
10439
  // ../common/src/output-format-context.ts
10440
10440
  var formatSlot = singleton("OutputFormat");
10441
10441
  var formatExplicitSlot = singleton("OutputFormatExplicit");
10442
+ var helpRequestedSlot = singleton("HelpRequested");
10442
10443
  var filterSlot = singleton("OutputFilter");
10443
10444
  function getOutputFormat() {
10444
10445
  return formatSlot.get("json");
@@ -11500,6 +11501,9 @@ var OutputFormatter;
11500
11501
  if (opts?.warning) {
11501
11502
  data.Warning = opts.warning;
11502
11503
  }
11504
+ if (opts?.pagination) {
11505
+ data.Pagination = opts.pagination;
11506
+ }
11503
11507
  success(data);
11504
11508
  }
11505
11509
  OutputFormatter.emitList = emitList;
@@ -11939,6 +11943,7 @@ var savedOriginalsSlot = singleton("ConsoleGuardOriginals");
11939
11943
  var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
11940
11944
  // ../common/src/interactivity-context.ts
11941
11945
  var modeSlot = singleton("InteractivityMode");
11946
+ var interactiveFlagSlot = singleton("InteractiveFlag");
11942
11947
  // ../common/src/polling/types.ts
11943
11948
  var PollOutcome = {
11944
11949
  Completed: "completed",
@@ -14516,6 +14521,30 @@ function buildStudioWebConfiguration(config, organizationName) {
14516
14521
  function createSolutionApi(config, organizationName) {
14517
14522
  return new SolutionApi(buildStudioWebConfiguration(config, organizationName));
14518
14523
  }
14524
+ // src/solution-info.ts
14525
+ async function getStudioWebSolutionProjects(config, organizationName, solutionId) {
14526
+ const api = createSolutionApi(config, organizationName);
14527
+ try {
14528
+ const solution = await api.solutionGetSolution({ solutionId });
14529
+ return (solution.projects ?? []).flatMap((project) => project.id ? [
14530
+ {
14531
+ id: project.id,
14532
+ designId: project.designId ?? undefined,
14533
+ name: project.name ?? undefined,
14534
+ projectType: project.projectType ?? undefined
14535
+ }
14536
+ ] : []);
14537
+ } catch (error) {
14538
+ if (error instanceof ResponseError2) {
14539
+ if (error.response.status === 404) {
14540
+ return;
14541
+ }
14542
+ const text = await error.response.text().catch(() => "");
14543
+ throw new Error(`Studio Web solution lookup failed (${error.response.status}): ${text}`);
14544
+ }
14545
+ throw error;
14546
+ }
14547
+ }
14519
14548
  // src/upload-service.ts
14520
14549
  class HttpError extends Error {
14521
14550
  status;
@@ -14675,6 +14704,7 @@ export {
14675
14704
  instanceOfCreateConfigurationCommand,
14676
14705
  instanceOfBlobFileAccessDto,
14677
14706
  importSolution,
14707
+ getStudioWebSolutionProjects,
14678
14708
  findSolutionFile,
14679
14709
  findNearestParentUipxFile,
14680
14710
  exists,
@@ -14864,4 +14894,4 @@ export {
14864
14894
  BASE_PATH
14865
14895
  };
14866
14896
 
14867
- //# debugId=2003B66939FE5E6664756E2164756E21
14897
+ //# debugId=D44D58D04B84DA3C64756E2164756E21
@@ -3,7 +3,8 @@ export * from "../generated/src/index.js";
3
3
  export { buildSolutionPackageFromDir, bundleSolution, resolveSolutionDir, } from "./bundle-service";
4
4
  export type { ParentSolutionDiscovery, ProjectSolutionRegistration, RegisterProjectOptions, } from "./solution-file";
5
5
  export { findNearestParentUipxFile, findSolutionFile, isProjectRegisteredInSolution, normalizeProjectType, readSolutionManifest, readUipxFile, toPortableRelativePath, tryRegisterProjectInParentSolution, updateSolutionFile, updateUipxSolutionId, } from "./solution-file";
6
- export type { BundleResult, SolutionImportResponse, StudioWebConfig, UipxFile, UipxProject, } from "./types";
6
+ export { getStudioWebSolutionProjects } from "./solution-info";
7
+ export type { BundleResult, SolutionImportResponse, StudioWebConfig, StudioWebSolutionProject, UipxFile, UipxProject, } from "./types";
7
8
  export { importSolution, overwriteSolution, solutionExistsOnStudioWeb, uploadOrOverwriteSolution, } from "./upload-service";
8
9
  export { SDK_USER_AGENT } from "./user-agent.js";
9
10
  export { collectFiles, createZipFromDir } from "./zip-utils";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Read solution metadata from UiPath Studio Web.
3
+ */
4
+ import type { StudioWebConfig, StudioWebSolutionProject } from "./types";
5
+ /**
6
+ * Fetch the projects of a Studio Web solution
7
+ * (`Solution_GetSolution` → `GET /api/Solution/{solutionId}`).
8
+ *
9
+ * Each project carries both the cloud project `id` and the design-time
10
+ * `designId` (the `Projects[].Id` written to the local `.uipx` manifest), so
11
+ * callers can map a local design-time ID to the real Studio Web project ID.
12
+ *
13
+ * Returns `undefined` when the solution does not exist (404) so callers can
14
+ * produce a targeted error. Throws on any other non-2xx status.
15
+ */
16
+ export declare function getStudioWebSolutionProjects(config: StudioWebConfig, organizationName: string, solutionId: string): Promise<StudioWebSolutionProject[] | undefined>;
@@ -16,6 +16,15 @@ export interface SolutionImportResponse {
16
16
  name: string;
17
17
  }>;
18
18
  }
19
+ /** A project of a Studio Web solution, as returned by Solution_GetSolution. */
20
+ export interface StudioWebSolutionProject {
21
+ /** Cloud (Studio Web) project ID. */
22
+ id: string;
23
+ /** Design-time ID — matches `Projects[].Id` in the local .uipx manifest. */
24
+ designId?: string;
25
+ name?: string;
26
+ projectType?: string;
27
+ }
19
28
  /** A project entry inside a .uipx file. */
20
29
  export interface UipxProject {
21
30
  Type: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/solution-sdk",
3
3
  "license": "MIT",
4
- "version": "1.197.0",
4
+ "version": "1.198.0-preview.80",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/UiPath/cli.git",
@@ -31,5 +31,5 @@
31
31
  "dist"
32
32
  ],
33
33
  "private": false,
34
- "gitHead": "56f68b263cec4ea1f2a39d738bd99ecf52f88fea"
34
+ "gitHead": "9b2c3c0f21a256d2f38dd28bc97e72e6f7b10a9c"
35
35
  }