@uipath/rules-tool 1.206.0-preview.301 → 1.207.0-preview.305

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 (50) hide show
  1. package/dist/DmnFactory-2Z66XPBB-dcse77vg.js +10 -0
  2. package/dist/DmnModelTypes-QISEK3CY-vth5tgqd.js +8 -0
  3. package/dist/KieDmnMarshaller-KLYKOHUQ-jae862c0.js +8 -0
  4. package/dist/THIRD-PARTY-NOTICES.md +6 -6
  5. package/dist/{business-rules-zfzwr08c.js → business-rules-4b4d9pw6.js} +4 -4
  6. package/dist/{constants-1sdwfz26.js → constants-yt6m7vkn.js} +12 -12
  7. package/dist/{first-party-service-ej32b6j2.js → first-party-service-r63v6skt.js} +1 -1
  8. package/dist/hitPolicyResult-2NPUZW2E-rddfkhb2.js +14 -0
  9. package/dist/{index-y5yffb2s.js → index-189nh3zq.js} +642 -513
  10. package/dist/{index-88sps467.js → index-g955264n.js} +7 -5
  11. package/dist/index-jm0j1yn2.js +212 -0
  12. package/dist/{index-s9wmt93c.js → index-thn9n1n9.js} +1 -1
  13. package/dist/index-xvy3d6qz.js +8 -0
  14. package/dist/index.js +2 -2
  15. package/dist/{rule-catalog-780050xk.js → rule-catalog-0zntgf3s.js} +34 -10
  16. package/dist/rules-command-error-5jq3z0ny.js +15 -0
  17. package/dist/{rules-debug-service-97ye6e73.js → rules-debug-service-cfaqvnep.js} +16 -9
  18. package/dist/{rules-init-service-21zyjtff.js → rules-init-service-vhd0gzmd.js} +7 -7
  19. package/dist/{rules-refresh-service-x3gfnfqt.js → rules-refresh-service-r7fpbbfv.js} +3 -3
  20. package/dist/{rules-validate-service-e47hgykv.js → rules-validate-service-jrw7c1q9.js} +8 -10
  21. package/dist/{solution-definition-helper-trxp0zbj.js → solution-definition-helper-s5v427j0.js} +1 -1
  22. package/dist/{tool-6m0p5jax.js → tool-0r1ykkjf.js} +12 -5
  23. package/dist/{tool-yfaf9b8c.js → tool-19fj7ema.js} +36 -9
  24. package/dist/{tool-sjp6fvze.js → tool-2cxm18e8.js} +2 -2
  25. package/dist/tool-2grmcreg.js +117 -0
  26. package/dist/{tool-b475et36.js → tool-46g75ed0.js} +3 -3
  27. package/dist/{tool-syavphgt.js → tool-5sgkktdb.js} +287 -139
  28. package/dist/{tool-dt23fa28.js → tool-a1wk2tqc.js} +28 -26
  29. package/dist/{tool-jzdt6z77.js → tool-c0peefw8.js} +7 -6
  30. package/dist/tool-e83bfqmj.js +192 -0
  31. package/dist/{tool-3755q59j.js → tool-fsmgxvqa.js} +189 -15
  32. package/dist/tool-fv5xtqv5.js +736 -0
  33. package/dist/{tool-vqm4apm6.js → tool-jykscmfk.js} +206 -203
  34. package/dist/{tool-0tbve332.js → tool-kmzhfjw8.js} +64 -10
  35. package/dist/tool-q02dmnzm.js +74 -0
  36. package/dist/{tool-93hqhaj3.js → tool-q3jw2emw.js} +100 -96
  37. package/dist/tool.js +2 -2
  38. package/package.json +2 -2
  39. package/dist/DmnFactory-L7MABUC6-q2sr3grz.js +0 -10
  40. package/dist/DmnModelTypes-ATR7FVKZ-h8srwcxk.js +0 -8
  41. package/dist/KieDmnMarshaller-LGE63WDG-nfkpv8f4.js +0 -8
  42. package/dist/hitPolicyResult-CGCR73CW-jz89f1aa.js +0 -12
  43. package/dist/index-egzwtc07.js +0 -19
  44. package/dist/index-z4kt2kt6.js +0 -8
  45. package/dist/index-zeszs1ra.js +0 -184
  46. package/dist/rules-command-error-2x1vm0wt.js +0 -13
  47. package/dist/tool-2nmqvfmt.js +0 -26
  48. package/dist/tool-89e90qrm.js +0 -777
  49. package/dist/tool-m59a481n.js +0 -49
  50. package/dist/tool-sbtf80ft.js +0 -218
@@ -6,7 +6,7 @@ import {
6
6
  getSdkUserAgentToken,
7
7
  addSdkUserAgentHeader,
8
8
  installSdkUserAgentHeader
9
- } from "./tool-syavphgt.js";
9
+ } from "./tool-5sgkktdb.js";
10
10
  import {
11
11
  __require
12
12
  } from "./tool-epsr41wx.js";
@@ -42,6 +42,8 @@ function settlePromiseLike(thenable) {
42
42
  // ../auth/src/constants.ts
43
43
  var UIPATH_HOME_DIR = ".uipath";
44
44
  var AUTH_FILENAME = ".auth";
45
+ var AUTH_FILE_MODE = 384;
46
+ var AUTH_DIR_MODE = 448;
45
47
  var DEFAULT_BASE_URL = "https://cloud.uipath.com";
46
48
  var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
47
49
 
@@ -865,6 +867,38 @@ var loadEnvFileAsync = async ({ envPath }) => {
865
867
  }
866
868
  return parseEnvContent(content);
867
869
  };
870
+ var findAuthHomeDir = (fs, dir) => {
871
+ let current = dir;
872
+ for (;; ) {
873
+ if (fs.path.basename(current) === UIPATH_HOME_DIR)
874
+ return current;
875
+ const parent = fs.path.dirname(current);
876
+ if (parent === current)
877
+ return;
878
+ current = parent;
879
+ }
880
+ };
881
+ var TEMP_FILE_ATTEMPTS = 5;
882
+ var isFileExists = (error) => error instanceof Error && error.code === "EEXIST";
883
+ var writeTempFile = async (fs, targetPath, content) => {
884
+ for (let attempt = 1;; attempt++) {
885
+ const tempPath = `${targetPath}.${crypto.randomUUID()}.tmp`;
886
+ try {
887
+ await fs.writeFile(tempPath, content, {
888
+ mode: AUTH_FILE_MODE,
889
+ exclusive: true
890
+ });
891
+ return tempPath;
892
+ } catch (error) {
893
+ if (!isFileExists(error)) {
894
+ await fs.rm(tempPath).catch(() => {});
895
+ throw error;
896
+ }
897
+ if (attempt === TEMP_FILE_ATTEMPTS)
898
+ throw error;
899
+ }
900
+ }
901
+ };
868
902
  var saveEnvFileAsync = async ({
869
903
  envPath,
870
904
  data,
@@ -892,10 +926,18 @@ var saveEnvFileAsync = async ({
892
926
  `)}
893
927
  `;
894
928
  const dir = fs.path.dirname(absolutePath);
895
- await fs.mkdir(dir);
896
- const tempPath = `${absolutePath}.tmp`;
897
- await fs.writeFile(tempPath, content);
898
- await fs.rename(tempPath, absolutePath);
929
+ await fs.mkdir(dir, { mode: AUTH_DIR_MODE });
930
+ const authHomeDir = findAuthHomeDir(fs, dir);
931
+ if (authHomeDir !== undefined) {
932
+ await fs.chmod?.(authHomeDir, AUTH_DIR_MODE);
933
+ }
934
+ const tempPath = await writeTempFile(fs, absolutePath, content);
935
+ try {
936
+ await fs.rename(tempPath, absolutePath);
937
+ } catch (error) {
938
+ await fs.rm(tempPath).catch(() => {});
939
+ throw error;
940
+ }
899
941
  };
900
942
 
901
943
  // ../auth/src/loginStatus.ts
@@ -2332,6 +2374,37 @@ function MachineFolderDtoFromJSONTyped(json, ignoreDiscriminator) {
2332
2374
  updateInfo: json["UpdateInfo"] == null ? undefined : UpdateInfoDtoFromJSON(json["UpdateInfo"])
2333
2375
  };
2334
2376
  }
2377
+ // ../orchestrator-sdk/generated/src/models/MachineRuntimeDto.ts
2378
+ var MachineRuntimeDtoTypeEnum = {
2379
+ NonProduction: "NonProduction",
2380
+ Attended: "Attended",
2381
+ Unattended: "Unattended",
2382
+ Development: "Development",
2383
+ Studio: "Studio",
2384
+ RpaDeveloper: "RpaDeveloper",
2385
+ StudioX: "StudioX",
2386
+ CitizenDeveloper: "CitizenDeveloper",
2387
+ Headless: "Headless",
2388
+ StudioPro: "StudioPro",
2389
+ RpaDeveloperPro: "RpaDeveloperPro",
2390
+ TestAutomation: "TestAutomation",
2391
+ AutomationCloud: "AutomationCloud",
2392
+ Serverless: "Serverless",
2393
+ AutomationKit: "AutomationKit",
2394
+ ServerlessTestAutomation: "ServerlessTestAutomation",
2395
+ AutomationCloudTestAutomation: "AutomationCloudTestAutomation",
2396
+ AttendedStudioWeb: "AttendedStudioWeb",
2397
+ Hosting: "Hosting",
2398
+ AssistantWeb: "AssistantWeb",
2399
+ ProcessOrchestration: "ProcessOrchestration",
2400
+ AgentService: "AgentService",
2401
+ AppTest: "AppTest",
2402
+ PerformanceTest: "PerformanceTest",
2403
+ BusinessRule: "BusinessRule",
2404
+ CaseManagement: "CaseManagement",
2405
+ Flow: "Flow",
2406
+ Local: "Local"
2407
+ };
2335
2408
  // ../orchestrator-sdk/generated/src/models/UserDto.ts
2336
2409
  function UserDtoFromJSON(json) {
2337
2410
  return UserDtoFromJSONTyped(json, false);
@@ -2573,6 +2646,7 @@ function UserEntityDtoFromJSONTyped(json, ignoreDiscriminator) {
2573
2646
  return {
2574
2647
  fullName: json["FullName"] == null ? undefined : json["FullName"],
2575
2648
  authenticationSource: json["AuthenticationSource"] == null ? undefined : json["AuthenticationSource"],
2649
+ emailAddress: json["EmailAddress"] == null ? undefined : json["EmailAddress"],
2576
2650
  key: json["Key"] == null ? undefined : json["Key"],
2577
2651
  userName: json["UserName"] == null ? undefined : json["UserName"],
2578
2652
  isInherited: json["IsInherited"] == null ? undefined : json["IsInherited"],
@@ -2868,6 +2942,50 @@ class PersonalWorkspacesApi extends BaseAPI {
2868
2942
  const response = await this.personalWorkspacesGetPersonalWorkspaceRaw(requestParameters, initOverrides);
2869
2943
  return await response.value();
2870
2944
  }
2945
+ async personalWorkspacesStartExploringByIdRaw(requestParameters, initOverrides) {
2946
+ if (requestParameters["key"] == null) {
2947
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling personalWorkspacesStartExploringById().');
2948
+ }
2949
+ const queryParameters = {};
2950
+ const headerParameters = {};
2951
+ if (this.configuration && this.configuration.accessToken) {
2952
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
2953
+ }
2954
+ let urlPath = `/odata/PersonalWorkspaces({key})/UiPath.Server.Configuration.OData.StartExploring`;
2955
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
2956
+ const response = await this.request({
2957
+ path: urlPath,
2958
+ method: "POST",
2959
+ headers: headerParameters,
2960
+ query: queryParameters
2961
+ }, initOverrides);
2962
+ return new VoidApiResponse(response);
2963
+ }
2964
+ async personalWorkspacesStartExploringById(requestParameters, initOverrides) {
2965
+ await this.personalWorkspacesStartExploringByIdRaw(requestParameters, initOverrides);
2966
+ }
2967
+ async personalWorkspacesStopExploringByIdRaw(requestParameters, initOverrides) {
2968
+ if (requestParameters["key"] == null) {
2969
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling personalWorkspacesStopExploringById().');
2970
+ }
2971
+ const queryParameters = {};
2972
+ const headerParameters = {};
2973
+ if (this.configuration && this.configuration.accessToken) {
2974
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
2975
+ }
2976
+ let urlPath = `/odata/PersonalWorkspaces({key})/UiPath.Server.Configuration.OData.StopExploring`;
2977
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
2978
+ const response = await this.request({
2979
+ path: urlPath,
2980
+ method: "POST",
2981
+ headers: headerParameters,
2982
+ query: queryParameters
2983
+ }, initOverrides);
2984
+ return new VoidApiResponse(response);
2985
+ }
2986
+ async personalWorkspacesStopExploringById(requestParameters, initOverrides) {
2987
+ await this.personalWorkspacesStopExploringByIdRaw(requestParameters, initOverrides);
2988
+ }
2871
2989
  }
2872
2990
 
2873
2991
  // ../common/src/session-kind.ts
@@ -2904,7 +3022,7 @@ var package_default = {
2904
3022
  name: "@uipath/orchestrator-sdk",
2905
3023
  author: "UiPath",
2906
3024
  license: "SEE LICENSE IN LICENSE.txt",
2907
- version: "1.206.0",
3025
+ version: "1.207.0",
2908
3026
  repository: {
2909
3027
  type: "git",
2910
3028
  url: "https://github.com/UiPath/cli.git",
@@ -3144,6 +3262,9 @@ class FoldersApi extends BaseAPI {
3144
3262
  if (requestParameters["searchText"] != null) {
3145
3263
  queryParameters["searchText"] = requestParameters["searchText"];
3146
3264
  }
3265
+ if (requestParameters["includeTenantRoles"] != null) {
3266
+ queryParameters["includeTenantRoles"] = requestParameters["includeTenantRoles"];
3267
+ }
3147
3268
  if (requestParameters["$select"] != null) {
3148
3269
  queryParameters["$select"] = requestParameters["$select"];
3149
3270
  }
@@ -3502,27 +3623,40 @@ class FoldersApi extends BaseAPI {
3502
3623
  }
3503
3624
 
3504
3625
  // ../orchestrator-sdk/src/folder-resolver.ts
3626
+ function folderNotFound(input) {
3627
+ return Object.assign(new Error(`Folder not found: '${input}'.`), {
3628
+ errorCode: "not_found",
3629
+ retry: "RetryWillNotFix"
3630
+ });
3631
+ }
3505
3632
  var UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
3506
3633
  async function resolveFolder(input, options) {
3507
3634
  if (!input?.folderPath && !input?.folderKey) {
3508
3635
  return;
3509
3636
  }
3510
3637
  const config = await createOrchestratorConfig(options);
3511
- const foldersApi = new FoldersApi(config);
3638
+ const signal = options?.signal;
3639
+ const foldersApi = abortable(new FoldersApi(config), signal);
3512
3640
  if (input.folderKey) {
3513
3641
  if (!UUID_REGEX.test(input.folderKey)) {
3514
3642
  throw new Error(`Invalid folder key: '${input.folderKey}'. Expected a UUID (e.g. '12345678-1234-1234-1234-123456789abc').`);
3515
3643
  }
3516
3644
  return resolveByKey(foldersApi, input.folderKey);
3517
3645
  }
3518
- return resolveByPath(config, foldersApi, input.folderPath);
3646
+ return resolveByPath(config, foldersApi, input.folderPath, signal);
3647
+ }
3648
+ function abortable(api, signal) {
3649
+ return signal ? api.withPreMiddleware(async ({ url, init }) => ({
3650
+ url,
3651
+ init: { ...init, signal }
3652
+ })) : api;
3519
3653
  }
3520
3654
  async function resolveByKey(foldersApi, folderKey) {
3521
3655
  const folder = await foldersApi.foldersGetByKeyByIdentifier({
3522
3656
  identifier: folderKey
3523
3657
  });
3524
3658
  if (!folder?.id || !folder.key || !folder.fullyQualifiedName || !folder.displayName) {
3525
- throw new Error(`Folder not found: '${folderKey}'.`);
3659
+ throw folderNotFound(folderKey);
3526
3660
  }
3527
3661
  return {
3528
3662
  id: folder.id,
@@ -3532,14 +3666,14 @@ async function resolveByKey(foldersApi, folderKey) {
3532
3666
  feedType: folder.feedType
3533
3667
  };
3534
3668
  }
3535
- async function resolveByPath(config, foldersApi, folderPath) {
3669
+ async function resolveByPath(config, foldersApi, folderPath, signal) {
3536
3670
  const response = await foldersApi.foldersGet({
3537
3671
  $filter: `FullyQualifiedName eq '${folderPath.replace(/'/g, "''")}'`,
3538
3672
  $top: 1
3539
3673
  });
3540
- const folder = response.value?.[0] ?? await resolveInPersonalWorkspace(config, foldersApi, folderPath);
3674
+ const folder = response.value?.[0] ?? await resolveInPersonalWorkspace(config, foldersApi, folderPath, signal);
3541
3675
  if (!folder?.id || !folder.key || !folder.fullyQualifiedName || !folder.displayName) {
3542
- throw new Error(`Folder not found: '${folderPath}'.`);
3676
+ throw folderNotFound(folderPath);
3543
3677
  }
3544
3678
  return {
3545
3679
  id: folder.id,
@@ -3551,8 +3685,8 @@ async function resolveByPath(config, foldersApi, folderPath) {
3551
3685
  }
3552
3686
  var CURRENT_USER_FOLDER_PAGE_SIZE = 1000;
3553
3687
  var CURRENT_USER_FOLDER_PAGE_LIMIT = 50;
3554
- async function resolveInPersonalWorkspace(config, foldersApi, folderPath) {
3555
- const workspace = await lookupOrMiss("GetPersonalWorkspace", folderPath, () => new PersonalWorkspacesApi(config).personalWorkspacesGetPersonalWorkspace());
3688
+ async function resolveInPersonalWorkspace(config, foldersApi, folderPath, signal) {
3689
+ const workspace = await lookupOrMiss("GetPersonalWorkspace", folderPath, () => abortable(new PersonalWorkspacesApi(config), signal).personalWorkspacesGetPersonalWorkspace());
3556
3690
  if (!workspace?.key || !workspace.name) {
3557
3691
  return;
3558
3692
  }
@@ -3618,6 +3752,23 @@ function quoteODataStringLiteral(value) {
3618
3752
  }
3619
3753
  return `'${value.replace(/'/g, "''")}'`;
3620
3754
  }
3755
+ // ../orchestrator-sdk/generated/src/apis/MachinesApi.ts
3756
+ var MachinesGetRuntimesForFolderByFolderidProcessTypeEnum = {
3757
+ Undefined: "Undefined",
3758
+ Process: "Process",
3759
+ ProcessOrchestration: "ProcessOrchestration",
3760
+ WebApp: "WebApp",
3761
+ Agent: "Agent",
3762
+ TestAutomationProcess: "TestAutomationProcess",
3763
+ Api: "Api",
3764
+ McpServer: "MCPServer",
3765
+ BusinessRules: "BusinessRules",
3766
+ CaseManagement: "CaseManagement",
3767
+ Flow: "Flow",
3768
+ Function: "Function",
3769
+ System: "System",
3770
+ FlowAutomate: "FlowAutomate"
3771
+ };
3621
3772
  // ../orchestrator-sdk/generated/src/apis/UsersApi.ts
3622
3773
  class UsersApi extends BaseAPI {
3623
3774
  async usersAssignRolesByIdRaw(requestParameters, initOverrides) {
@@ -3835,6 +3986,29 @@ class UsersApi extends BaseAPI {
3835
3986
  await this.usersPutByIdRaw(requestParameters, initOverrides);
3836
3987
  }
3837
3988
  }
3989
+ // ../orchestrator-sdk/src/folder-runtimes.ts
3990
+ var FOLDER_RUNTIMES = {
3991
+ [MachinesGetRuntimesForFolderByFolderidProcessTypeEnum.Process]: [
3992
+ MachineRuntimeDtoTypeEnum.Serverless,
3993
+ MachineRuntimeDtoTypeEnum.AutomationCloud,
3994
+ MachineRuntimeDtoTypeEnum.AutomationCloudTestAutomation,
3995
+ MachineRuntimeDtoTypeEnum.AppTest,
3996
+ MachineRuntimeDtoTypeEnum.PerformanceTest,
3997
+ MachineRuntimeDtoTypeEnum.Unattended,
3998
+ MachineRuntimeDtoTypeEnum.NonProduction,
3999
+ MachineRuntimeDtoTypeEnum.TestAutomation
4000
+ ],
4001
+ [MachinesGetRuntimesForFolderByFolderidProcessTypeEnum.TestAutomationProcess]: [
4002
+ MachineRuntimeDtoTypeEnum.Serverless,
4003
+ MachineRuntimeDtoTypeEnum.ServerlessTestAutomation,
4004
+ MachineRuntimeDtoTypeEnum.AutomationCloudTestAutomation,
4005
+ MachineRuntimeDtoTypeEnum.AutomationCloud,
4006
+ MachineRuntimeDtoTypeEnum.AppTest,
4007
+ MachineRuntimeDtoTypeEnum.TestAutomation,
4008
+ MachineRuntimeDtoTypeEnum.Unattended
4009
+ ],
4010
+ [MachinesGetRuntimesForFolderByFolderidProcessTypeEnum.McpServer]: [MachineRuntimeDtoTypeEnum.Serverless]
4011
+ };
3838
4012
  // ../orchestrator-sdk/src/knowledge-bundles.ts
3839
4013
  var KB_INLINE_LIMITS = {
3840
4014
  maxObjectBytes: 16 * 1024 * 1024,
@@ -3843,4 +4017,4 @@ var KB_INLINE_LIMITS = {
3843
4017
  };
3844
4018
  export { getLoginStatusAsync, getAuthContext, BusinessRulesApi, PersonalWorkspacesApi, UsersApi, createApiClient, resolveFolder, quoteODataStringLiteral };
3845
4019
 
3846
- //# debugId=FCF55219427BCDC464756E2164756E21
4020
+ //# debugId=057E89A52D2C174B64756E2164756E21