@uipath/solution-sdk 1.205.0-preview.277 → 1.206.0-preview.279

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 (31) hide show
  1. package/dist/deployment-search.js +49 -19
  2. package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
  3. package/dist/first-party-service-ahcc6xc6.js +8 -0
  4. package/dist/{index-y4vgqz1w.js → index-0b3srjv7.js} +98 -8
  5. package/dist/{index-78paj2kz.js → index-0drvtcm4.js} +12 -11
  6. package/dist/{index-hkexw5er.js → index-bpn15jyk.js} +35 -20
  7. package/dist/{index-gdtpsdn7.js → index-mm1x18d6.js} +223 -28
  8. package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
  9. package/dist/{index-qq5t2dkg.js → index-t1e17c6h.js} +582 -577
  10. package/dist/{index-enc2hqq5.js → index-tdffhvfs.js} +931 -502
  11. package/dist/index-txd1grjc.js +541 -0
  12. package/dist/{index-cs3g624n.js → index-xnrbg4x3.js} +6 -7
  13. package/dist/index-z2qk2qn6.js +24 -0
  14. package/dist/index.js +1310 -669
  15. package/dist/{jmespath-231m3hyn.js → jmespath-x4na7sj8.js} +1 -1
  16. package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
  17. package/dist/package-search.js +18 -19
  18. package/dist/project-context.js +75 -0
  19. package/dist/resources/index.js +265 -237
  20. package/dist/scripts/generate-sdk.js +2 -2
  21. package/dist/solution-auth.js +6 -7
  22. package/dist/src/deployment-search.d.ts +30 -0
  23. package/dist/src/project-context.d.ts +9 -0
  24. package/dist/src/resources/providers/artefact-pair-binding-provider.d.ts +8 -2
  25. package/dist/src/resources/services/sync-resources-from-bindings.d.ts +14 -1
  26. package/package.json +6 -2
  27. package/dist/first-party-service-sd8yaf73.js +0 -27
  28. package/dist/index-1de529jm.js +0 -39
  29. package/dist/index-53w8skv5.js +0 -262
  30. package/dist/index-dqa169gp.js +0 -25
  31. package/dist/index-zmneg45c.js +0 -1184
@@ -1,27 +1,26 @@
1
+ import"./index-0b3srjv7.js";
1
2
  import {
2
- Configuration as Configuration2,
3
+ catchError,
4
+ logger
5
+ } from "./index-tdffhvfs.js";
6
+ import {
7
+ Configuration2,
3
8
  PipelinesApi,
4
- isApplicationSession,
5
9
  isMissingPipelinesRoute,
10
+ isApplicationSession,
6
11
  parseSearchPage
7
- } from "./index-78paj2kz.js";
8
- import {
9
- Configuration,
10
- DeploymentSearchItemDto2FromJSON,
11
- SearchApi
12
- } from "./index-qq5t2dkg.js";
12
+ } from "./index-0drvtcm4.js";
13
13
  import {
14
- catchError,
15
- logger
16
- } from "./index-enc2hqq5.js";
17
- import"./index-hkexw5er.js";
18
- import"./index-y4vgqz1w.js";
19
- import"./index-1de529jm.js";
14
+ Configuration3,
15
+ DeploymentSearchItemDto2FromJSON2,
16
+ SearchApi2
17
+ } from "./index-t1e17c6h.js";
18
+ import"./index-bpn15jyk.js";
20
19
 
21
20
  // src/legacy-deployment-search-v3.ts
22
21
  var LEGACY_V3_SEARCH_ROUTE = "POST /api/v3/search/deployments";
23
22
  async function searchDeploymentsLegacyV3(auth, query, scope) {
24
- const api = new SearchApi(new Configuration({
23
+ const api = new SearchApi2(new Configuration3({
25
24
  basePath: auth.basePath,
26
25
  accessToken: auth.accessToken
27
26
  }));
@@ -76,14 +75,14 @@ var serversWithoutPipelinesSearch = new Set;
76
75
  var DEPLOYMENT_ROWS = {
77
76
  singular: "deployment",
78
77
  plural: "deployments",
79
- fromJSON: DeploymentSearchItemDto2FromJSON
78
+ fromJSON: DeploymentSearchItemDto2FromJSON2
80
79
  };
81
80
  async function searchDeploymentsPage(auth, query, scope) {
82
81
  if (!serversWithoutPipelinesSearch.has(auth.basePath)) {
83
- const [error, body2] = await catchError(searchViaPipelines(auth, query, scope));
82
+ const [error, body] = await catchError(searchViaPipelines(auth, query, scope));
84
83
  if (!error) {
85
84
  return {
86
- ...parseSearchPage(body2, PIPELINES_SEARCH_ROUTE, DEPLOYMENT_ROWS),
85
+ ...parseSearchPage(body, PIPELINES_SEARCH_ROUTE, DEPLOYMENT_ROWS),
87
86
  source: "pipelines"
88
87
  };
89
88
  }
@@ -123,6 +122,35 @@ async function searchViaPipelines(auth, query, scope) {
123
122
  }, scope);
124
123
  return response.raw.json();
125
124
  }
125
+ var APPLIED_FEED_HEADER = "X-UIPATH-FolderKey";
126
+ var feedHeaderProbes = new Map;
127
+ async function probeFeedHeaderAsync(auth, folderKey, route = "deployments") {
128
+ const cacheKey = `${auth.basePath}|${await sessionDigest(auth.accessToken)}|${route}|${folderKey.toLowerCase()}`;
129
+ const cached = feedHeaderProbes.get(cacheKey);
130
+ if (cached) {
131
+ return cached;
132
+ }
133
+ const api = new PipelinesApi(new Configuration2({
134
+ basePath: auth.basePath,
135
+ accessToken: auth.accessToken
136
+ }));
137
+ const withFeed = async ({ init }) => ({
138
+ headers: { ...init.headers, "X-UIPATH-FolderKey": folderKey }
139
+ });
140
+ const search = route === "packages" ? api.pipelinesSearchPackagesRaw({ pipelinePackagesSearchRequest: { take: 1, skip: 0 } }, withFeed) : api.pipelinesSearchDeploymentsRaw({ pipelineDeploymentsSearchRequest: { take: 1, skip: 0 } }, withFeed);
141
+ const [error, response] = await catchError(search);
142
+ if (error && !await isMissingPipelinesRoute(error)) {
143
+ throw error;
144
+ }
145
+ const echoed = response?.raw.headers.get(APPLIED_FEED_HEADER);
146
+ const result = echoed?.toLowerCase() === folderKey.toLowerCase() ? "applied" : "ignored";
147
+ feedHeaderProbes.set(cacheKey, result);
148
+ return result;
149
+ }
150
+ async function sessionDigest(accessToken) {
151
+ const hash = await globalThis.crypto.subtle.digest("SHA-256", new TextEncoder().encode(accessToken));
152
+ return Array.from(new Uint8Array(hash).slice(0, 8), (b) => b.toString(16).padStart(2, "0")).join("");
153
+ }
126
154
  var DEFAULT_PAGE_SIZE = 50;
127
155
  var DEFAULT_MAX_PAGES = 20;
128
156
  async function searchDeployments(auth, options = {}) {
@@ -173,10 +201,12 @@ function atLeastOne(option, value) {
173
201
  return value;
174
202
  }
175
203
  export {
204
+ APPLIED_FEED_HEADER,
176
205
  DeploymentSearchNeedsUserSessionError,
177
206
  DeploymentSearchTruncatedError,
207
+ probeFeedHeaderAsync,
178
208
  searchDeployments,
179
209
  searchDeploymentsPage
180
210
  };
181
211
 
182
- //# debugId=CF705437CADED1E564756E2164756E21
212
+ //# debugId=95941B97BB459AA864756E2164756E21