@uipath/solution-sdk 1.204.0 → 1.205.0-preview.258
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.
- package/dist/THIRD-PARTY-NOTICES.md +2 -2
- package/dist/deployment-search.js +182 -0
- package/dist/{embedded-file-reader-rf2g1kfj.js → embedded-file-reader-z4becc02.js} +2 -2
- package/dist/index-78paj2kz.js +1908 -0
- package/dist/index-cs3g624n.js +28 -0
- package/dist/index-eav127tv.js +3004 -0
- package/dist/{index-fb21bjwj.js → index-enc2hqq5.js} +255 -1409
- package/dist/{index-6gp5j7j5.js → index-hkexw5er.js} +193 -118
- package/dist/{index-g0hcxnae.js → index-y4vgqz1w.js} +11 -1
- package/dist/index-zmneg45c.js +1184 -0
- package/dist/index.js +1551 -4214
- package/dist/package-search.js +105 -0
- package/dist/resources/index.js +1183 -1177
- package/dist/solution-auth.js +4 -3
- package/dist/src/deployment-search.d.ts +104 -0
- package/dist/src/legacy-deployment-search-v3.d.ts +24 -0
- package/dist/src/legacy-package-search.d.ts +25 -0
- package/dist/src/package-search.d.ts +41 -0
- package/dist/src/pipelines-route.d.ts +43 -0
- package/dist/src/resources/index.d.ts +3 -0
- package/dist/src/resources/providers/artefact-pair-binding-provider.d.ts +4 -0
- package/dist/src/resources/services/catalog-lookup-failure.d.ts +50 -0
- package/dist/src/resources/services/remote-resources.d.ts +2 -0
- package/dist/src/resources/services/resource-configurations.d.ts +44 -0
- package/dist/src/resources/services/resource-lookup.d.ts +29 -0
- package/dist/src/resources/services/resource-refresh-service.d.ts +13 -0
- package/dist/src/resources/services/sync-resources-from-bindings.d.ts +43 -6
- package/dist/src/zip-utils.d.ts +5 -0
- package/package.json +10 -2
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Configuration as Configuration2,
|
|
3
|
+
PipelinesApi,
|
|
4
|
+
isApplicationSession,
|
|
5
|
+
isMissingPipelinesRoute,
|
|
6
|
+
parseSearchPage
|
|
7
|
+
} from "./index-78paj2kz.js";
|
|
8
|
+
import {
|
|
9
|
+
Configuration,
|
|
10
|
+
PackageInfoFromJSON,
|
|
11
|
+
SearchApi
|
|
12
|
+
} from "./index-eav127tv.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-package-search.ts
|
|
22
|
+
var LEGACY_PACKAGE_SEARCH_ROUTE = "POST /api/search/packages";
|
|
23
|
+
async function searchPackagesLegacy(auth, query, scope) {
|
|
24
|
+
const api = new SearchApi(new Configuration({
|
|
25
|
+
basePath: auth.basePath,
|
|
26
|
+
accessToken: auth.accessToken
|
|
27
|
+
}));
|
|
28
|
+
const response = await api.searchSearchPackagesRaw({
|
|
29
|
+
searchFilter: {
|
|
30
|
+
take: query.take,
|
|
31
|
+
skip: query.skip,
|
|
32
|
+
searchTerm: query.searchTerm,
|
|
33
|
+
orderByColumn: query.orderByColumn,
|
|
34
|
+
orderByDirection: query.orderByDirection
|
|
35
|
+
}
|
|
36
|
+
}, scope);
|
|
37
|
+
return response.raw.json();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// src/package-search.ts
|
|
41
|
+
var PIPELINES_SEARCH_ROUTE = "POST /v1/pipelines/packages/search";
|
|
42
|
+
|
|
43
|
+
class PackageSearchNeedsUserSessionError extends Error {
|
|
44
|
+
constructor() {
|
|
45
|
+
super("This server's package search reads user sessions only; an application (client-credentials) login cannot read it. Sign in with 'uip login' to use it.");
|
|
46
|
+
this.name = "PackageSearchNeedsUserSessionError";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
var PACKAGE_ROWS = {
|
|
50
|
+
singular: "package",
|
|
51
|
+
plural: "packages",
|
|
52
|
+
fromJSON: PackageInfoFromJSON,
|
|
53
|
+
isRow: (row) => isNonEmptyString(row, "key") && isNonEmptyString(row, "name")
|
|
54
|
+
};
|
|
55
|
+
function isNonEmptyString(row, field) {
|
|
56
|
+
const value = field in row ? row[field] : undefined;
|
|
57
|
+
return typeof value === "string" && value !== "";
|
|
58
|
+
}
|
|
59
|
+
var serversWithoutPipelinesSearch = new Set;
|
|
60
|
+
async function searchPackagesPage(auth, query, scope) {
|
|
61
|
+
if (!serversWithoutPipelinesSearch.has(auth.basePath)) {
|
|
62
|
+
const [error, body2] = await catchError(searchViaPipelines(auth, query, scope));
|
|
63
|
+
if (!error) {
|
|
64
|
+
return {
|
|
65
|
+
...parseSearchPage(body2, PIPELINES_SEARCH_ROUTE, PACKAGE_ROWS),
|
|
66
|
+
source: "pipelines"
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
if (!await isMissingPipelinesRoute(error)) {
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
serversWithoutPipelinesSearch.add(auth.basePath);
|
|
73
|
+
logger.debug(`${PIPELINES_SEARCH_ROUTE} is not served at ${auth.basePath}; using the deprecated ${LEGACY_PACKAGE_SEARCH_ROUTE}.`);
|
|
74
|
+
}
|
|
75
|
+
if (isApplicationSession(auth)) {
|
|
76
|
+
throw new PackageSearchNeedsUserSessionError;
|
|
77
|
+
}
|
|
78
|
+
const body = await searchPackagesLegacy(auth, query, scope);
|
|
79
|
+
return {
|
|
80
|
+
...parseSearchPage(body, LEGACY_PACKAGE_SEARCH_ROUTE, PACKAGE_ROWS),
|
|
81
|
+
source: "legacy"
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
async function searchViaPipelines(auth, query, scope) {
|
|
85
|
+
const api = new PipelinesApi(new Configuration2({
|
|
86
|
+
basePath: auth.basePath,
|
|
87
|
+
accessToken: auth.accessToken
|
|
88
|
+
}));
|
|
89
|
+
const response = await api.pipelinesSearchPackagesRaw({
|
|
90
|
+
pipelinePackagesSearchRequest: {
|
|
91
|
+
take: query.take,
|
|
92
|
+
skip: query.skip,
|
|
93
|
+
searchTerm: query.searchTerm,
|
|
94
|
+
orderByColumn: query.orderByColumn,
|
|
95
|
+
orderByDirection: query.orderByDirection
|
|
96
|
+
}
|
|
97
|
+
}, scope);
|
|
98
|
+
return response.raw.json();
|
|
99
|
+
}
|
|
100
|
+
export {
|
|
101
|
+
PackageSearchNeedsUserSessionError,
|
|
102
|
+
searchPackagesPage
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
//# debugId=59AF014B5D549E9E64756E2164756E21
|