@uipath/maestro-sdk 1.206.0-preview.310 → 1.206.0-preview.312

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.
@@ -900,7 +900,7 @@ var init_package = __esm(() => {
900
900
  name: "@uipath/integrationservice-sdk",
901
901
  author: "UiPath",
902
902
  license: "SEE LICENSE IN LICENSE.txt",
903
- version: "1.206.0-preview.310",
903
+ version: "1.206.0-preview.312",
904
904
  repository: {
905
905
  type: "git",
906
906
  url: "https://github.com/UiPath/cli.git",
@@ -47541,9 +47541,21 @@ function toCatalogReference(reference) {
47541
47541
  };
47542
47542
  }
47543
47543
  async function exportResourceDefinitionAsync(importer, reference) {
47544
- const payload = await importer.exportResourceAsync(reference);
47544
+ const [error, payload] = await catchError2(importer.exportResourceAsync(reference));
47545
+ if (error) {
47546
+ throw withExportStatus(error);
47547
+ }
47545
47548
  return payload.resourceDefinitions.find((d) => d.key === reference.key);
47546
47549
  }
47550
+ function withExportStatus(error) {
47551
+ if (!(error instanceof Error) || !("exceptionData" in error)) {
47552
+ return error;
47553
+ }
47554
+ const data = error.exceptionData;
47555
+ const text = typeof data === "object" && data !== null ? data.errorMessage : undefined;
47556
+ const match = typeof text === "string" ? /^HTTP (\d{3})\b/.exec(text) : null;
47557
+ return match ? new ResourceExportError(error.message, Number(match[1]), error) : error;
47558
+ }
47547
47559
  function readSpecProperty(spec, name) {
47548
47560
  if (!spec) {
47549
47561
  return;
@@ -47575,9 +47587,18 @@ function parseJsonString(raw) {
47575
47587
  const [error, parsed] = catchError2(() => JSON.parse(raw));
47576
47588
  return error ? undefined : parsed;
47577
47589
  }
47590
+ var ResourceExportError;
47578
47591
  var init_remote_resources = __esm(() => {
47579
47592
  init_src4();
47580
47593
  init_service_tokens();
47594
+ ResourceExportError = class ResourceExportError extends Error {
47595
+ status;
47596
+ constructor(message, status, cause) {
47597
+ super(message, { cause });
47598
+ this.status = status;
47599
+ this.name = "ResourceExportError";
47600
+ }
47601
+ };
47581
47602
  });
47582
47603
 
47583
47604
  // ../solution-sdk/src/resources/services/resource-casing.ts
@@ -49046,6 +49067,7 @@ __export(exports_resources, {
49046
49067
  EntryPointSpecEnhancer: () => EntryPointSpecEnhancer,
49047
49068
  MAX_RESOURCE_NAME_LENGTH: () => MAX_RESOURCE_NAME_LENGTH,
49048
49069
  ProjectManifestError: () => ProjectManifestError,
49070
+ ResourceExportError: () => ResourceExportError,
49049
49071
  addProjectArtifactsToSolutionAsync: () => addProjectArtifactsToSolutionAsync,
49050
49072
  applyEntryPointEnhancementAsync: () => applyEntryPointEnhancementAsync,
49051
49073
  assertSolutionManifest: () => assertSolutionManifest,
@@ -247456,4 +247478,4 @@ export {
247456
247478
  studioCatalogTypeCache
247457
247479
  };
247458
247480
 
247459
- //# debugId=1CCA2DDE61E51E9E64756E2164756E21
247481
+ //# debugId=A436B62ED6C95EF164756E2164756E21
package/dist/index.js CHANGED
@@ -131368,7 +131368,7 @@ var init_package = __esm(() => {
131368
131368
  name: "@uipath/integrationservice-sdk",
131369
131369
  author: "UiPath",
131370
131370
  license: "SEE LICENSE IN LICENSE.txt",
131371
- version: "1.206.0-preview.310",
131371
+ version: "1.206.0-preview.312",
131372
131372
  repository: {
131373
131373
  type: "git",
131374
131374
  url: "https://github.com/UiPath/cli.git",
@@ -163831,9 +163831,21 @@ function toCatalogReference(reference) {
163831
163831
  };
163832
163832
  }
163833
163833
  async function exportResourceDefinitionAsync(importer, reference) {
163834
- const payload = await importer.exportResourceAsync(reference);
163834
+ const [error, payload] = await catchError(importer.exportResourceAsync(reference));
163835
+ if (error) {
163836
+ throw withExportStatus(error);
163837
+ }
163835
163838
  return payload.resourceDefinitions.find((d) => d.key === reference.key);
163836
163839
  }
163840
+ function withExportStatus(error) {
163841
+ if (!(error instanceof Error) || !("exceptionData" in error)) {
163842
+ return error;
163843
+ }
163844
+ const data = error.exceptionData;
163845
+ const text = typeof data === "object" && data !== null ? data.errorMessage : undefined;
163846
+ const match = typeof text === "string" ? /^HTTP (\d{3})\b/.exec(text) : null;
163847
+ return match ? new ResourceExportError(error.message, Number(match[1]), error) : error;
163848
+ }
163837
163849
  function readSpecProperty(spec, name) {
163838
163850
  if (!spec) {
163839
163851
  return;
@@ -163865,9 +163877,18 @@ function parseJsonString(raw) {
163865
163877
  const [error, parsed] = catchError(() => JSON.parse(raw));
163866
163878
  return error ? undefined : parsed;
163867
163879
  }
163880
+ var ResourceExportError;
163868
163881
  var init_remote_resources = __esm(() => {
163869
163882
  init_src2();
163870
163883
  init_service_tokens();
163884
+ ResourceExportError = class ResourceExportError extends Error {
163885
+ status;
163886
+ constructor(message, status, cause) {
163887
+ super(message, { cause });
163888
+ this.status = status;
163889
+ this.name = "ResourceExportError";
163890
+ }
163891
+ };
163871
163892
  });
163872
163893
 
163873
163894
  // ../solution-sdk/src/resources/services/resource-casing.ts
@@ -165336,6 +165357,7 @@ __export(exports_resources, {
165336
165357
  EntryPointSpecEnhancer: () => EntryPointSpecEnhancer,
165337
165358
  MAX_RESOURCE_NAME_LENGTH: () => MAX_RESOURCE_NAME_LENGTH,
165338
165359
  ProjectManifestError: () => ProjectManifestError,
165360
+ ResourceExportError: () => ResourceExportError,
165339
165361
  addProjectArtifactsToSolutionAsync: () => addProjectArtifactsToSolutionAsync,
165340
165362
  applyEntryPointEnhancementAsync: () => applyEntryPointEnhancementAsync,
165341
165363
  assertSolutionManifest: () => assertSolutionManifest,
@@ -262807,4 +262829,4 @@ export {
262807
262829
  withPimsCall
262808
262830
  };
262809
262831
 
262810
- //# debugId=BC766DEF834E951664756E2164756E21
262832
+ //# debugId=3AA0A0333457510064756E2164756E21
@@ -131204,7 +131204,7 @@ var init_package = __esm(() => {
131204
131204
  name: "@uipath/integrationservice-sdk",
131205
131205
  author: "UiPath",
131206
131206
  license: "SEE LICENSE IN LICENSE.txt",
131207
- version: "1.206.0-preview.310",
131207
+ version: "1.206.0-preview.312",
131208
131208
  repository: {
131209
131209
  type: "git",
131210
131210
  url: "https://github.com/UiPath/cli.git",
@@ -163763,9 +163763,21 @@ function toCatalogReference(reference) {
163763
163763
  };
163764
163764
  }
163765
163765
  async function exportResourceDefinitionAsync(importer, reference) {
163766
- const payload = await importer.exportResourceAsync(reference);
163766
+ const [error, payload] = await catchError(importer.exportResourceAsync(reference));
163767
+ if (error) {
163768
+ throw withExportStatus(error);
163769
+ }
163767
163770
  return payload.resourceDefinitions.find((d) => d.key === reference.key);
163768
163771
  }
163772
+ function withExportStatus(error) {
163773
+ if (!(error instanceof Error) || !("exceptionData" in error)) {
163774
+ return error;
163775
+ }
163776
+ const data = error.exceptionData;
163777
+ const text = typeof data === "object" && data !== null ? data.errorMessage : undefined;
163778
+ const match = typeof text === "string" ? /^HTTP (\d{3})\b/.exec(text) : null;
163779
+ return match ? new ResourceExportError(error.message, Number(match[1]), error) : error;
163780
+ }
163769
163781
  function readSpecProperty(spec, name) {
163770
163782
  if (!spec) {
163771
163783
  return;
@@ -163797,9 +163809,18 @@ function parseJsonString(raw) {
163797
163809
  const [error, parsed] = catchError(() => JSON.parse(raw));
163798
163810
  return error ? undefined : parsed;
163799
163811
  }
163812
+ var ResourceExportError;
163800
163813
  var init_remote_resources = __esm(() => {
163801
163814
  init_src2();
163802
163815
  init_service_tokens();
163816
+ ResourceExportError = class ResourceExportError extends Error {
163817
+ status;
163818
+ constructor(message, status, cause) {
163819
+ super(message, { cause });
163820
+ this.status = status;
163821
+ this.name = "ResourceExportError";
163822
+ }
163823
+ };
163803
163824
  });
163804
163825
 
163805
163826
  // ../solution-sdk/src/resources/services/resource-casing.ts
@@ -165268,6 +165289,7 @@ __export(exports_resources, {
165268
165289
  EntryPointSpecEnhancer: () => EntryPointSpecEnhancer,
165269
165290
  MAX_RESOURCE_NAME_LENGTH: () => MAX_RESOURCE_NAME_LENGTH,
165270
165291
  ProjectManifestError: () => ProjectManifestError,
165292
+ ResourceExportError: () => ResourceExportError,
165271
165293
  addProjectArtifactsToSolutionAsync: () => addProjectArtifactsToSolutionAsync,
165272
165294
  applyEntryPointEnhancementAsync: () => applyEntryPointEnhancementAsync,
165273
165295
  assertSolutionManifest: () => assertSolutionManifest,
@@ -246916,4 +246938,4 @@ export {
246916
246938
  shownRows
246917
246939
  };
246918
246940
 
246919
- //# debugId=6CFECC501BE6F48D64756E2164756E21
246941
+ //# debugId=6B8469D11ADF50E664756E2164756E21
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@uipath/maestro-sdk",
3
3
  "author": "UiPath",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
- "version": "1.206.0-preview.310",
5
+ "version": "1.206.0-preview.312",
6
6
  "description": "SDK for the UiPath Maestro (PIMS) API — process instance management.",
7
7
  "repository": {
8
8
  "type": "git",
@@ -113,5 +113,5 @@
113
113
  "files": [
114
114
  "dist"
115
115
  ],
116
- "gitHead": "493ebd2c2baccd31ad19b739e42605d7c89f720d"
116
+ "gitHead": "ee91749054ba110153977dd920a4c84761ce82cd"
117
117
  }