@uipath/solution-sdk 1.204.0-preview.255 → 1.205.0-preview.256

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 (29) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +2 -2
  2. package/dist/deployment-search.js +182 -0
  3. package/dist/{embedded-file-reader-rf2g1kfj.js → embedded-file-reader-z4becc02.js} +2 -2
  4. package/dist/index-78paj2kz.js +1908 -0
  5. package/dist/index-7h5s8895.js +3004 -0
  6. package/dist/index-cs3g624n.js +28 -0
  7. package/dist/{index-fb21bjwj.js → index-enc2hqq5.js} +255 -1409
  8. package/dist/{index-6gp5j7j5.js → index-hkexw5er.js} +193 -118
  9. package/dist/{index-g0hcxnae.js → index-y4vgqz1w.js} +11 -1
  10. package/dist/index-zmneg45c.js +1184 -0
  11. package/dist/index.js +1551 -4214
  12. package/dist/package-search.js +105 -0
  13. package/dist/resources/index.js +1183 -1177
  14. package/dist/solution-auth.js +4 -3
  15. package/dist/src/deployment-search.d.ts +104 -0
  16. package/dist/src/legacy-deployment-search-v3.d.ts +24 -0
  17. package/dist/src/legacy-package-search.d.ts +25 -0
  18. package/dist/src/package-search.d.ts +41 -0
  19. package/dist/src/pipelines-route.d.ts +43 -0
  20. package/dist/src/resources/index.d.ts +3 -0
  21. package/dist/src/resources/providers/artefact-pair-binding-provider.d.ts +4 -0
  22. package/dist/src/resources/services/catalog-lookup-failure.d.ts +50 -0
  23. package/dist/src/resources/services/remote-resources.d.ts +2 -0
  24. package/dist/src/resources/services/resource-configurations.d.ts +44 -0
  25. package/dist/src/resources/services/resource-lookup.d.ts +29 -0
  26. package/dist/src/resources/services/resource-refresh-service.d.ts +13 -0
  27. package/dist/src/resources/services/sync-resources-from-bindings.d.ts +43 -6
  28. package/dist/src/zip-utils.d.ts +5 -0
  29. package/package.json +10 -2
@@ -7,7 +7,7 @@ those licences require.
7
7
 
8
8
  18 bundled dependencies:
9
9
 
10
- - @uipath/resource-builder-sdk@2025.11.0-alpha6004-4107 — ISC
10
+ - @uipath/resource-builder-sdk@2025.11.0-alpha6584-4367 — ISC
11
11
  - bundle-name@4.1.0 — MIT
12
12
  - commander@14.0.3 — MIT
13
13
  - default-browser@5.5.0 — MIT
@@ -28,7 +28,7 @@ those licences require.
28
28
 
29
29
  ---
30
30
 
31
- ## @uipath/resource-builder-sdk@2025.11.0-alpha6004-4107
31
+ ## @uipath/resource-builder-sdk@2025.11.0-alpha6584-4367
32
32
 
33
33
  SPDX: ISC
34
34
 
@@ -0,0 +1,182 @@
1
+ import {
2
+ Configuration as Configuration2,
3
+ PipelinesApi,
4
+ isApplicationSession,
5
+ isMissingPipelinesRoute,
6
+ parseSearchPage
7
+ } from "./index-78paj2kz.js";
8
+ import {
9
+ Configuration,
10
+ DeploymentSearchItemDto2FromJSON,
11
+ SearchApi
12
+ } from "./index-7h5s8895.js";
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";
20
+
21
+ // src/legacy-deployment-search-v3.ts
22
+ var LEGACY_V3_SEARCH_ROUTE = "POST /api/v3/search/deployments";
23
+ async function searchDeploymentsLegacyV3(auth, query, scope) {
24
+ const api = new SearchApi(new Configuration({
25
+ basePath: auth.basePath,
26
+ accessToken: auth.accessToken
27
+ }));
28
+ const response = await api.searchSearchDeployments22Raw({ deploymentsSearchRequest2: toLegacyV3Request(query) }, scope);
29
+ return response.raw.json();
30
+ }
31
+ function toLegacyV3Request(query) {
32
+ return {
33
+ searchTerm: query.searchTerm ?? query.deploymentName ?? query.packageName,
34
+ packageName: query.packageName,
35
+ ...query.targetFolderName ? { targetFolderName: query.targetFolderName } : {},
36
+ take: query.take,
37
+ skip: query.skip,
38
+ orderByColumn: query.orderByColumn,
39
+ orderByDirection: query.orderByDirection,
40
+ operationStatuses: query.operationStatuses ?? [],
41
+ activationStatuses: query.activationStatuses ?? []
42
+ };
43
+ }
44
+
45
+ // src/deployment-search.ts
46
+ var PIPELINES_SEARCH_ROUTE = "POST /v1/pipelines/deployments/search";
47
+
48
+ class DeploymentSearchNeedsUserSessionError extends Error {
49
+ constructor() {
50
+ super("This server's deployment search reads user sessions only; an application (client-credentials) login cannot read it. Sign in with 'uip login' to use it.");
51
+ this.name = "DeploymentSearchNeedsUserSessionError";
52
+ }
53
+ }
54
+ function truncationMessage(rowsRead, reason) {
55
+ switch (reason) {
56
+ case "page-cap":
57
+ return `The deployment search read ${rowsRead} rows and more rows remain. Narrow the search (for example by package or folder) so it fits.`;
58
+ case "skip-ignored":
59
+ return `The deployment search stopped after ${rowsRead} rows: the server returned the same page again, so the search cannot page past it.`;
60
+ case "short-page":
61
+ return `The deployment search read ${rowsRead} rows, but the server counted more and then returned a short page, so the rest cannot be read. Retry the search; if it keeps happening, narrow it (for example by package or folder).`;
62
+ }
63
+ }
64
+
65
+ class DeploymentSearchTruncatedError extends Error {
66
+ rowsRead;
67
+ reason;
68
+ constructor(rowsRead, reason) {
69
+ super(truncationMessage(rowsRead, reason));
70
+ this.rowsRead = rowsRead;
71
+ this.reason = reason;
72
+ this.name = "DeploymentSearchTruncatedError";
73
+ }
74
+ }
75
+ var serversWithoutPipelinesSearch = new Set;
76
+ var DEPLOYMENT_ROWS = {
77
+ singular: "deployment",
78
+ plural: "deployments",
79
+ fromJSON: DeploymentSearchItemDto2FromJSON
80
+ };
81
+ async function searchDeploymentsPage(auth, query, scope) {
82
+ if (!serversWithoutPipelinesSearch.has(auth.basePath)) {
83
+ const [error, body2] = await catchError(searchViaPipelines(auth, query, scope));
84
+ if (!error) {
85
+ return {
86
+ ...parseSearchPage(body2, PIPELINES_SEARCH_ROUTE, DEPLOYMENT_ROWS),
87
+ source: "pipelines"
88
+ };
89
+ }
90
+ if (!await isMissingPipelinesRoute(error)) {
91
+ throw error;
92
+ }
93
+ serversWithoutPipelinesSearch.add(auth.basePath);
94
+ logger.debug(`${PIPELINES_SEARCH_ROUTE} is not served at ${auth.basePath}; using the deprecated ${LEGACY_V3_SEARCH_ROUTE}.`);
95
+ }
96
+ if (isApplicationSession(auth)) {
97
+ throw new DeploymentSearchNeedsUserSessionError;
98
+ }
99
+ const body = await searchDeploymentsLegacyV3(auth, query, scope);
100
+ return {
101
+ ...parseSearchPage(body, LEGACY_V3_SEARCH_ROUTE, DEPLOYMENT_ROWS),
102
+ source: "legacy-v3"
103
+ };
104
+ }
105
+ async function searchViaPipelines(auth, query, scope) {
106
+ const api = new PipelinesApi(new Configuration2({
107
+ basePath: auth.basePath,
108
+ accessToken: auth.accessToken
109
+ }));
110
+ const response = await api.pipelinesSearchDeploymentsRaw({
111
+ pipelineDeploymentsSearchRequest: {
112
+ take: query.take,
113
+ skip: query.skip,
114
+ deploymentName: query.deploymentName,
115
+ packageName: query.packageName,
116
+ targetFolderName: query.targetFolderName,
117
+ searchTerm: query.searchTerm,
118
+ orderByColumn: query.orderByColumn,
119
+ orderByDirection: query.orderByDirection,
120
+ operationStatuses: query.operationStatuses,
121
+ activationStatuses: query.activationStatuses
122
+ }
123
+ }, scope);
124
+ return response.raw.json();
125
+ }
126
+ var DEFAULT_PAGE_SIZE = 50;
127
+ var DEFAULT_MAX_PAGES = 20;
128
+ async function searchDeployments(auth, options = {}) {
129
+ const take = atLeastOne("pageSize", options.pageSize ?? DEFAULT_PAGE_SIZE);
130
+ const maxPages = atLeastOne("maxPages", options.maxPages ?? DEFAULT_MAX_PAGES);
131
+ const matches = [];
132
+ let rowsRead = 0;
133
+ let previousFirst;
134
+ for (let page = 0;page < maxPages; page += 1) {
135
+ const result = await searchDeploymentsPage(auth, {
136
+ take,
137
+ skip: rowsRead,
138
+ packageName: options.packageName,
139
+ targetFolderName: options.folderPath,
140
+ orderByColumn: options.orderByColumn,
141
+ orderByDirection: options.orderByDirection
142
+ }, options.scope);
143
+ const values = result.values;
144
+ if (values.length > 0) {
145
+ const first = JSON.stringify(values[0]);
146
+ if (first === previousFirst) {
147
+ throw new DeploymentSearchTruncatedError(rowsRead, "skip-ignored");
148
+ }
149
+ previousFirst = first;
150
+ }
151
+ rowsRead += values.length;
152
+ for (const deployment of values) {
153
+ const wrongPackage = options.exactPackageMatch === true && options.packageName !== undefined && deployment.packageName !== options.packageName;
154
+ if (!wrongPackage)
155
+ matches.push(deployment);
156
+ }
157
+ const shortPage = values.length < take;
158
+ if (result.count === undefined) {
159
+ if (shortPage)
160
+ return matches;
161
+ } else if (rowsRead >= result.count) {
162
+ return matches;
163
+ } else if (shortPage) {
164
+ throw new DeploymentSearchTruncatedError(rowsRead, "short-page");
165
+ }
166
+ }
167
+ throw new DeploymentSearchTruncatedError(rowsRead, "page-cap");
168
+ }
169
+ function atLeastOne(option, value) {
170
+ if (!Number.isInteger(value) || value < 1) {
171
+ throw new RangeError(`${option} must be a whole number of 1 or more; got ${String(value)}.`);
172
+ }
173
+ return value;
174
+ }
175
+ export {
176
+ DeploymentSearchNeedsUserSessionError,
177
+ DeploymentSearchTruncatedError,
178
+ searchDeployments,
179
+ searchDeploymentsPage
180
+ };
181
+
182
+ //# debugId=CF705437CADED1E564756E2164756E21