@uipath/maestro-sdk 1.207.0-preview.386 → 1.207.0-preview.387

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.
@@ -1125,7 +1125,7 @@ var init_package = __esm(() => {
1125
1125
  name: "@uipath/integrationservice-sdk",
1126
1126
  author: "UiPath",
1127
1127
  license: "SEE LICENSE IN LICENSE.txt",
1128
- version: "1.207.0-preview.386",
1128
+ version: "1.207.0-preview.387",
1129
1129
  repository: {
1130
1130
  type: "git",
1131
1131
  url: "https://github.com/UiPath/cli.git",
@@ -265684,4 +265684,4 @@ export {
265684
265684
  studioCatalogTypeCache
265685
265685
  };
265686
265686
 
265687
- //# debugId=B888CD1F7B863E7A64756E2164756E21
265687
+ //# debugId=E9A1E730DB1E26B664756E2164756E21
package/dist/index.js CHANGED
@@ -145144,7 +145144,7 @@ var init_package = __esm(() => {
145144
145144
  name: "@uipath/integrationservice-sdk",
145145
145145
  author: "UiPath",
145146
145146
  license: "SEE LICENSE IN LICENSE.txt",
145147
- version: "1.207.0-preview.386",
145147
+ version: "1.207.0-preview.387",
145148
145148
  repository: {
145149
145149
  type: "git",
145150
145150
  url: "https://github.com/UiPath/cli.git",
@@ -263706,7 +263706,11 @@ function nodeCacheScope(login) {
263706
263706
  const tenantId = login.tenantId?.trim();
263707
263707
  if (!baseUrl || !organizationId || !tenantId)
263708
263708
  return;
263709
- return [baseUrl, organizationId, tenantId].join("|").toLowerCase();
263709
+ const principal = login.identity?.userId || login.identity?.clientId || (login.accessToken ? `token:${sha256Hex(login.accessToken)}` : undefined);
263710
+ if (!principal)
263711
+ return;
263712
+ const scopes = [...login.scopes ?? []].sort((a, b) => a.localeCompare(b)).join(" ");
263713
+ return [baseUrl, organizationId, tenantId, principal, scopes].join("|").toLowerCase();
263710
263714
  }
263711
263715
  async function saveConnectorFetch(scope, options, result) {
263712
263716
  const fs = getFileSystem();
@@ -264000,6 +264004,7 @@ async function rederiveNodeIndexArtifacts() {
264000
264004
  var CACHE_FORMAT_VERSION = 8, INDEX_FILE = "index.json", METADATA_FILE = "index.meta.json", SEARCH_INDEX_FILE = "search-index.json", ESSENTIALS_INDEX_FILE = "get-essentials.json", WRITE_LOCK_FILE = ".index-write.lock", CONNECTOR_FETCH_FILE = "connector-nodes.json", MISS_REFRESH_PREFIX = "miss-refresh-";
264001
264005
  var init_node_storage = __esm(() => {
264002
264006
  init_src2();
264007
+ init_sha256();
264003
264008
  init_src();
264004
264009
  });
264005
264010
 
@@ -289547,4 +289552,4 @@ export {
289547
289552
  withPimsCall
289548
289553
  };
289549
289554
 
289550
- //# debugId=364668510A9B326C64756E2164756E21
289555
+ //# debugId=D48DD2AE7B574CDB64756E2164756E21
@@ -144980,7 +144980,7 @@ var init_package = __esm(() => {
144980
144980
  name: "@uipath/integrationservice-sdk",
144981
144981
  author: "UiPath",
144982
144982
  license: "SEE LICENSE IN LICENSE.txt",
144983
- version: "1.207.0-preview.386",
144983
+ version: "1.207.0-preview.387",
144984
144984
  repository: {
144985
144985
  type: "git",
144986
144986
  url: "https://github.com/UiPath/cli.git",
@@ -263706,7 +263706,11 @@ function nodeCacheScope(login) {
263706
263706
  const tenantId = login.tenantId?.trim();
263707
263707
  if (!baseUrl || !organizationId || !tenantId)
263708
263708
  return;
263709
- return [baseUrl, organizationId, tenantId].join("|").toLowerCase();
263709
+ const principal = login.identity?.userId || login.identity?.clientId || (login.accessToken ? `token:${sha256Hex(login.accessToken)}` : undefined);
263710
+ if (!principal)
263711
+ return;
263712
+ const scopes = [...login.scopes ?? []].sort((a, b) => a.localeCompare(b)).join(" ");
263713
+ return [baseUrl, organizationId, tenantId, principal, scopes].join("|").toLowerCase();
263710
263714
  }
263711
263715
  async function saveConnectorFetch(scope, options, result) {
263712
263716
  const fs = getFileSystem();
@@ -264000,6 +264004,7 @@ async function rederiveNodeIndexArtifacts() {
264000
264004
  var CACHE_FORMAT_VERSION = 8, INDEX_FILE = "index.json", METADATA_FILE = "index.meta.json", SEARCH_INDEX_FILE = "search-index.json", ESSENTIALS_INDEX_FILE = "get-essentials.json", WRITE_LOCK_FILE = ".index-write.lock", CONNECTOR_FETCH_FILE = "connector-nodes.json", MISS_REFRESH_PREFIX = "miss-refresh-";
264001
264005
  var init_node_storage = __esm(() => {
264002
264006
  init_src2();
264007
+ init_sha256();
264003
264008
  init_src();
264004
264009
  });
264005
264010
 
@@ -265283,4 +265288,4 @@ export {
265283
265288
  shownRows
265284
265289
  };
265285
265290
 
265286
- //# debugId=4B8F917D5FBA573864756E2164756E21
265291
+ //# debugId=E773AA809D3D0A4764756E2164756E21
@@ -59,21 +59,39 @@ export interface SyncMetadata {
59
59
  }>;
60
60
  }
61
61
  /**
62
- * The cache key for a tenant's node manifest: platform URL, organization and
63
- * tenant. The manifest request carries no folder (flow-core's `AuthContext`
64
- * is org + tenant only), so the folder is not part of the key.
62
+ * The cache key for a login's node manifest: platform URL, organization,
63
+ * tenant, who the token acts as, and the scopes it carries. The manifest
64
+ * request carries no folder (flow-core's `AuthContext` is org + tenant only),
65
+ * so the folder is not part of the key.
65
66
  *
66
- * Returns `undefined` when any part is missing — an unauthenticated caller
67
- * has no tenant, and must never read a logged-in tenant's nodes.
67
+ * The identity and scopes are in the key because they decide what the fetch
68
+ * can read: an application token gets 401 from the connector catalogue, so
69
+ * its index lacks every connector node. Keyed by tenant alone, that partial
70
+ * index and its miss-refresh record would answer a user's lookup on the same
71
+ * tenant with "not found".
72
+ * Opaque tokens carry no decoded identity: use their SHA-256 fingerprint
73
+ * instead, so different credentials cannot share a cache and the token is
74
+ * never written to disk. A renewed opaque token therefore starts a new cache.
75
+ *
76
+ * Returns `undefined` when the URL, organization or tenant is missing — an
77
+ * unauthenticated caller has no tenant, and must never read a logged-in
78
+ * tenant's nodes. Also returns `undefined` when neither a principal nor an
79
+ * access token is available to identify the caller.
68
80
  *
69
81
  * @example
70
- * nodeCacheScope({ baseUrl: "https://cloud.uipath.com/", organizationId: "Org-1", tenantId: "T-1" })
71
- * // => "https://cloud.uipath.com|org-1|t-1"
82
+ * nodeCacheScope({ baseUrl: "https://cloud.uipath.com/", organizationId: "Org-1", tenantId: "T-1", identity: { userId: "U-1" }, scopes: ["OR.Jobs", "IS"] })
83
+ * // => "https://cloud.uipath.com|org-1|t-1|u-1|is or.jobs"
72
84
  */
73
85
  export declare function nodeCacheScope(login: {
74
86
  baseUrl?: string;
75
87
  organizationId?: string;
76
88
  tenantId?: string;
89
+ identity?: {
90
+ userId?: string;
91
+ clientId?: string;
92
+ };
93
+ scopes?: string[];
94
+ accessToken?: string;
77
95
  }): string | undefined;
78
96
  /** Save the connector catalogue a pull fetched for `scope`. */
79
97
  export declare function saveConnectorFetch(scope: string, options: string, result: ConnectorFetcherResult): Promise<void>;
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.207.0-preview.386",
5
+ "version": "1.207.0-preview.387",
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": "235efd65ea72df59110ba49db59f3e6b2b74868b"
116
+ "gitHead": "e04380b6897a13fb96316ca38097b55946c8b455"
117
117
  }