@uipath/resourcecatalog-tool 0.1.0 → 1.1.0
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/index.js +958 -105
- package/dist/tool.js +960 -104
- package/package.json +4 -12
package/dist/index.js
CHANGED
|
@@ -1006,7 +1006,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1006
1006
|
this._exitCallback = (err) => {
|
|
1007
1007
|
if (err.code !== "commander.executeSubCommandAsync") {
|
|
1008
1008
|
throw err;
|
|
1009
|
-
}
|
|
1009
|
+
}
|
|
1010
1010
|
};
|
|
1011
1011
|
}
|
|
1012
1012
|
return this;
|
|
@@ -2477,11 +2477,11 @@ import path from "node:path";
|
|
|
2477
2477
|
import { fileURLToPath } from "node:url";
|
|
2478
2478
|
import childProcess3 from "node:child_process";
|
|
2479
2479
|
import fs5, { constants as fsConstants2 } from "node:fs/promises";
|
|
2480
|
-
function detectArchBinary(
|
|
2481
|
-
if (typeof
|
|
2482
|
-
return
|
|
2480
|
+
function detectArchBinary(binary) {
|
|
2481
|
+
if (typeof binary === "string" || Array.isArray(binary)) {
|
|
2482
|
+
return binary;
|
|
2483
2483
|
}
|
|
2484
|
-
const { [arch]: archBinary } =
|
|
2484
|
+
const { [arch]: archBinary } = binary;
|
|
2485
2485
|
if (!archBinary) {
|
|
2486
2486
|
throw new Error(`${arch} is not supported`);
|
|
2487
2487
|
}
|
|
@@ -2894,9 +2894,7 @@ var init_node = __esm(() => {
|
|
|
2894
2894
|
init_open();
|
|
2895
2895
|
});
|
|
2896
2896
|
// ../../filesystem/src/index.ts
|
|
2897
|
-
var fsInstance, getFileSystem = () =>
|
|
2898
|
-
return fsInstance;
|
|
2899
|
-
};
|
|
2897
|
+
var fsInstance, getFileSystem = () => fsInstance;
|
|
2900
2898
|
var init_src = __esm(() => {
|
|
2901
2899
|
init_node();
|
|
2902
2900
|
init_node();
|
|
@@ -2944,7 +2942,7 @@ function isBrowser() {
|
|
|
2944
2942
|
|
|
2945
2943
|
// ../../../node_modules/@uipath/coreipc/index.js
|
|
2946
2944
|
var require_coreipc = __commonJS((exports, module) => {
|
|
2947
|
-
var __dirname = "/
|
|
2945
|
+
var __dirname = "/Users/alexandru.oltean/github/cli/node_modules/@uipath/coreipc";
|
|
2948
2946
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2949
2947
|
(function(e, t) {
|
|
2950
2948
|
typeof exports == "object" && typeof module == "object" ? module.exports = t() : typeof define == "function" && define.amd ? define([], t) : typeof exports == "object" ? exports.ipc = t() : e.ipc = t();
|
|
@@ -21155,7 +21153,7 @@ var {
|
|
|
21155
21153
|
// package.json
|
|
21156
21154
|
var package_default = {
|
|
21157
21155
|
name: "@uipath/resourcecatalog-tool",
|
|
21158
|
-
version: "
|
|
21156
|
+
version: "1.1.0",
|
|
21159
21157
|
description: "CLI plugin for the UiPath Resource Catalog Service.",
|
|
21160
21158
|
private: false,
|
|
21161
21159
|
repository: {
|
|
@@ -21197,6 +21195,9 @@ var package_default = {
|
|
|
21197
21195
|
}
|
|
21198
21196
|
};
|
|
21199
21197
|
|
|
21198
|
+
// ../../common/src/attachment-binding.ts
|
|
21199
|
+
init_src();
|
|
21200
|
+
|
|
21200
21201
|
// ../../common/src/catch-error.ts
|
|
21201
21202
|
function isPromiseLike(value) {
|
|
21202
21203
|
return value !== null && typeof value === "object" && typeof value.then === "function";
|
|
@@ -21224,78 +21225,7 @@ function settlePromiseLike(thenable) {
|
|
|
21224
21225
|
undefined
|
|
21225
21226
|
]);
|
|
21226
21227
|
}
|
|
21227
|
-
// ../../common/src/command-examples.ts
|
|
21228
|
-
var examplesByCommand = new WeakMap;
|
|
21229
|
-
Command.prototype.examples = function(examples) {
|
|
21230
|
-
examplesByCommand.set(this, examples);
|
|
21231
|
-
return this;
|
|
21232
|
-
};
|
|
21233
|
-
// ../../common/src/singleton.ts
|
|
21234
|
-
var PREFIX = "@uipath/common/";
|
|
21235
|
-
var _g = globalThis;
|
|
21236
|
-
function singleton(ctorOrName) {
|
|
21237
|
-
const name = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
|
|
21238
|
-
const key = Symbol.for(PREFIX + name);
|
|
21239
|
-
return {
|
|
21240
|
-
get(fallback) {
|
|
21241
|
-
return _g[key] ?? fallback;
|
|
21242
|
-
},
|
|
21243
|
-
set(value) {
|
|
21244
|
-
_g[key] = value;
|
|
21245
|
-
},
|
|
21246
|
-
clear() {
|
|
21247
|
-
delete _g[key];
|
|
21248
|
-
},
|
|
21249
|
-
getOrInit(factory, guard) {
|
|
21250
|
-
const existing = _g[key];
|
|
21251
|
-
if (existing != null && typeof existing === "object") {
|
|
21252
|
-
if (!guard || guard(existing)) {
|
|
21253
|
-
return existing;
|
|
21254
|
-
}
|
|
21255
|
-
}
|
|
21256
|
-
const instance = factory();
|
|
21257
|
-
_g[key] = instance;
|
|
21258
|
-
return instance;
|
|
21259
|
-
}
|
|
21260
|
-
};
|
|
21261
|
-
}
|
|
21262
21228
|
|
|
21263
|
-
// ../../common/src/output-context.ts
|
|
21264
|
-
function createStorage() {
|
|
21265
|
-
const [error, mod] = catchError(() => __require("node:async_hooks"));
|
|
21266
|
-
if (error || typeof mod?.AsyncLocalStorage !== "function") {
|
|
21267
|
-
return {
|
|
21268
|
-
getStore: () => {
|
|
21269
|
-
return;
|
|
21270
|
-
},
|
|
21271
|
-
run: (_store, fn) => fn()
|
|
21272
|
-
};
|
|
21273
|
-
}
|
|
21274
|
-
return new mod.AsyncLocalStorage;
|
|
21275
|
-
}
|
|
21276
|
-
var storageSingleton = singleton("OutputStorage");
|
|
21277
|
-
var sinkSlot = singleton("OutputSink");
|
|
21278
|
-
var outputStorage = storageSingleton.getOrInit(createStorage, (v) => ("getStore" in v));
|
|
21279
|
-
var CONSOLE_FALLBACK = {
|
|
21280
|
-
writeOut: (str) => process.stdout.write(str),
|
|
21281
|
-
writeErr: (str) => process.stderr.write(str),
|
|
21282
|
-
writeLog: (str) => process.stdout.write(str),
|
|
21283
|
-
capabilities: {
|
|
21284
|
-
isInteractive: false,
|
|
21285
|
-
supportsColor: false,
|
|
21286
|
-
outputWidth: 80
|
|
21287
|
-
}
|
|
21288
|
-
};
|
|
21289
|
-
function getOutputSink() {
|
|
21290
|
-
return outputStorage.getStore() ?? sinkSlot.get() ?? CONSOLE_FALLBACK;
|
|
21291
|
-
}
|
|
21292
|
-
// ../../common/src/completer.ts
|
|
21293
|
-
var COMPLETER_SYMBOL = Symbol.for("@uipath/common/completer");
|
|
21294
|
-
// ../../common/src/console-guard.ts
|
|
21295
|
-
var guardInstalledSlot = singleton("ConsoleGuardInstalled");
|
|
21296
|
-
var savedOriginalsSlot = singleton("ConsoleGuardOriginals");
|
|
21297
|
-
// ../../common/src/constants.ts
|
|
21298
|
-
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
21299
21229
|
// ../../common/src/error-handler.ts
|
|
21300
21230
|
var DEFAULT_401 = "Unauthorized (401). Run `uip login` to authenticate.";
|
|
21301
21231
|
var DEFAULT_403 = "Forbidden (403). Ensure the account has the required permissions.";
|
|
@@ -21431,6 +21361,79 @@ async function extractErrorMessage(error, options) {
|
|
|
21431
21361
|
const { message } = await extractErrorDetails(error, options);
|
|
21432
21362
|
return message;
|
|
21433
21363
|
}
|
|
21364
|
+
// ../../common/src/command-examples.ts
|
|
21365
|
+
var examplesByCommand = new WeakMap;
|
|
21366
|
+
Command.prototype.examples = function(examples) {
|
|
21367
|
+
examplesByCommand.set(this, examples);
|
|
21368
|
+
return this;
|
|
21369
|
+
};
|
|
21370
|
+
// ../../common/src/singleton.ts
|
|
21371
|
+
var PREFIX = "@uipath/common/";
|
|
21372
|
+
var _g = globalThis;
|
|
21373
|
+
function singleton(ctorOrName) {
|
|
21374
|
+
const name = typeof ctorOrName === "string" ? ctorOrName : ctorOrName.name;
|
|
21375
|
+
const key = Symbol.for(PREFIX + name);
|
|
21376
|
+
return {
|
|
21377
|
+
get(fallback) {
|
|
21378
|
+
return _g[key] ?? fallback;
|
|
21379
|
+
},
|
|
21380
|
+
set(value) {
|
|
21381
|
+
_g[key] = value;
|
|
21382
|
+
},
|
|
21383
|
+
clear() {
|
|
21384
|
+
delete _g[key];
|
|
21385
|
+
},
|
|
21386
|
+
getOrInit(factory, guard) {
|
|
21387
|
+
const existing = _g[key];
|
|
21388
|
+
if (existing != null && typeof existing === "object") {
|
|
21389
|
+
if (!guard || guard(existing)) {
|
|
21390
|
+
return existing;
|
|
21391
|
+
}
|
|
21392
|
+
}
|
|
21393
|
+
const instance = factory();
|
|
21394
|
+
_g[key] = instance;
|
|
21395
|
+
return instance;
|
|
21396
|
+
}
|
|
21397
|
+
};
|
|
21398
|
+
}
|
|
21399
|
+
|
|
21400
|
+
// ../../common/src/output-context.ts
|
|
21401
|
+
function createStorage() {
|
|
21402
|
+
const [error, mod] = catchError(() => __require("node:async_hooks"));
|
|
21403
|
+
if (error || typeof mod?.AsyncLocalStorage !== "function") {
|
|
21404
|
+
return {
|
|
21405
|
+
getStore: () => {
|
|
21406
|
+
return;
|
|
21407
|
+
},
|
|
21408
|
+
run: (_store, fn) => fn()
|
|
21409
|
+
};
|
|
21410
|
+
}
|
|
21411
|
+
return new mod.AsyncLocalStorage;
|
|
21412
|
+
}
|
|
21413
|
+
var storageSingleton = singleton("OutputStorage");
|
|
21414
|
+
var sinkSlot = singleton("OutputSink");
|
|
21415
|
+
var outputStorage = storageSingleton.getOrInit(createStorage, (v) => ("getStore" in v));
|
|
21416
|
+
var CONSOLE_FALLBACK = {
|
|
21417
|
+
writeOut: (str) => process.stdout.write(str),
|
|
21418
|
+
writeErr: (str) => process.stderr.write(str),
|
|
21419
|
+
writeLog: (str) => process.stdout.write(str),
|
|
21420
|
+
capabilities: {
|
|
21421
|
+
isInteractive: false,
|
|
21422
|
+
supportsColor: false,
|
|
21423
|
+
outputWidth: 80
|
|
21424
|
+
}
|
|
21425
|
+
};
|
|
21426
|
+
function getOutputSink() {
|
|
21427
|
+
return outputStorage.getStore() ?? sinkSlot.get() ?? CONSOLE_FALLBACK;
|
|
21428
|
+
}
|
|
21429
|
+
// ../../common/src/completer.ts
|
|
21430
|
+
var COMPLETER_SYMBOL = Symbol.for("@uipath/common/completer");
|
|
21431
|
+
// ../../common/src/console-guard.ts
|
|
21432
|
+
var guardInstalledSlot = singleton("ConsoleGuardInstalled");
|
|
21433
|
+
var savedOriginalsSlot = singleton("ConsoleGuardOriginals");
|
|
21434
|
+
// ../../common/src/constants.ts
|
|
21435
|
+
var DEFAULT_PAGE_SIZE = 50;
|
|
21436
|
+
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
21434
21437
|
// ../../../node_modules/@jmespath-community/jmespath/dist/index.mjs
|
|
21435
21438
|
var isObject = (obj) => {
|
|
21436
21439
|
return obj !== null && Object.prototype.toString.call(obj) === "[object Object]";
|
|
@@ -26475,15 +26478,26 @@ class SuccessOutput {
|
|
|
26475
26478
|
}
|
|
26476
26479
|
}
|
|
26477
26480
|
}
|
|
26478
|
-
function
|
|
26481
|
+
function escapeNonAscii(jsonText) {
|
|
26482
|
+
return jsonText.replace(/[\u0080-\uffff]/g, (c) => {
|
|
26483
|
+
const hex = c.charCodeAt(0).toString(16).padStart(4, "0");
|
|
26484
|
+
return `\\u${hex}`;
|
|
26485
|
+
});
|
|
26486
|
+
}
|
|
26487
|
+
function needsAsciiSafeJson(sink) {
|
|
26488
|
+
return process.platform === "win32" && !sink.capabilities.isInteractive;
|
|
26489
|
+
}
|
|
26490
|
+
function printOutput(data, format = "json", logFn, asciiSafe = false) {
|
|
26479
26491
|
if (!data) {
|
|
26480
26492
|
logFn("Empty response object. No data to display.");
|
|
26481
26493
|
return;
|
|
26482
26494
|
}
|
|
26483
26495
|
switch (format) {
|
|
26484
|
-
case "json":
|
|
26485
|
-
|
|
26496
|
+
case "json": {
|
|
26497
|
+
const json2 = JSON.stringify(data, null, 2);
|
|
26498
|
+
logFn(asciiSafe ? escapeNonAscii(json2) : json2);
|
|
26486
26499
|
break;
|
|
26500
|
+
}
|
|
26487
26501
|
case "yaml":
|
|
26488
26502
|
logFn(toYaml(data));
|
|
26489
26503
|
break;
|
|
@@ -26518,7 +26532,7 @@ function printOutput(data, format = "json", logFn) {
|
|
|
26518
26532
|
function logOutput(data, format = "json") {
|
|
26519
26533
|
const sink = getOutputSink();
|
|
26520
26534
|
printOutput(data, format, (msg) => sink.writeOut(`${msg}
|
|
26521
|
-
`));
|
|
26535
|
+
`), needsAsciiSafeJson(sink));
|
|
26522
26536
|
}
|
|
26523
26537
|
function cellToString(val) {
|
|
26524
26538
|
return val != null && typeof val === "object" ? JSON.stringify(val) : String(val ?? "");
|
|
@@ -26698,7 +26712,9 @@ var OutputFormatter;
|
|
|
26698
26712
|
const format = getOutputFormat();
|
|
26699
26713
|
const sink = getOutputSink();
|
|
26700
26714
|
if (format === "json") {
|
|
26701
|
-
|
|
26715
|
+
const json2 = JSON.stringify(data);
|
|
26716
|
+
const safe = needsAsciiSafeJson(sink) ? escapeNonAscii(json2) : json2;
|
|
26717
|
+
sink.writeErr(`${safe}
|
|
26702
26718
|
`);
|
|
26703
26719
|
} else {
|
|
26704
26720
|
for (const [key, value] of Object.entries(data)) {
|
|
@@ -26714,9 +26730,10 @@ var OutputFormatter;
|
|
|
26714
26730
|
data.Data = applyFilter(data.Data, filter);
|
|
26715
26731
|
}
|
|
26716
26732
|
const lines = [];
|
|
26733
|
+
const sink = getOutputSink();
|
|
26717
26734
|
printOutput(data, getOutputFormat(), (msg) => {
|
|
26718
26735
|
lines.push(msg);
|
|
26719
|
-
});
|
|
26736
|
+
}, needsAsciiSafeJson(sink));
|
|
26720
26737
|
return lines.join(`
|
|
26721
26738
|
`);
|
|
26722
26739
|
}
|
|
@@ -28125,6 +28142,46 @@ JSONPath.prototype.safeVm = {
|
|
|
28125
28142
|
Script: SafeScript
|
|
28126
28143
|
};
|
|
28127
28144
|
JSONPath.prototype.vm = vm;
|
|
28145
|
+
// ../../common/src/option-aliases.ts
|
|
28146
|
+
function resolveDeprecatedOptionAlias({
|
|
28147
|
+
preferredValue,
|
|
28148
|
+
deprecatedValue,
|
|
28149
|
+
preferredFlag,
|
|
28150
|
+
deprecatedFlag
|
|
28151
|
+
}) {
|
|
28152
|
+
const hasPreferred = preferredValue !== undefined;
|
|
28153
|
+
const hasDeprecated = deprecatedValue !== undefined;
|
|
28154
|
+
if (hasPreferred && hasDeprecated) {
|
|
28155
|
+
return {
|
|
28156
|
+
value: undefined,
|
|
28157
|
+
usedDeprecated: true,
|
|
28158
|
+
error: {
|
|
28159
|
+
message: `${deprecatedFlag} and ${preferredFlag} are aliases. Use only ${preferredFlag}.`,
|
|
28160
|
+
instructions: `Replace ${deprecatedFlag} with ${preferredFlag}.`
|
|
28161
|
+
}
|
|
28162
|
+
};
|
|
28163
|
+
}
|
|
28164
|
+
return {
|
|
28165
|
+
value: hasPreferred ? preferredValue : deprecatedValue,
|
|
28166
|
+
usedDeprecated: hasDeprecated
|
|
28167
|
+
};
|
|
28168
|
+
}
|
|
28169
|
+
function warnDeprecatedOptionAlias(deprecatedFlag, preferredFlag) {
|
|
28170
|
+
getOutputSink().writeErr(`[WARN] ${deprecatedFlag} is deprecated. Use ${preferredFlag} instead.
|
|
28171
|
+
`);
|
|
28172
|
+
}
|
|
28173
|
+
var TENANT_SWITCH_COMMAND = "uip login tenant set <tenant>";
|
|
28174
|
+
function createHiddenDeprecatedTenantOption(flags = "-t, --tenant <tenant-name>") {
|
|
28175
|
+
return new Option(flags, `Tenant name. Deprecated; use ${TENANT_SWITCH_COMMAND} to switch active tenants.`).hideHelp().argParser((tenant) => {
|
|
28176
|
+
warnDeprecatedTenantOption(tenant);
|
|
28177
|
+
return tenant;
|
|
28178
|
+
});
|
|
28179
|
+
}
|
|
28180
|
+
function warnDeprecatedTenantOption(tenant) {
|
|
28181
|
+
if (tenant === undefined)
|
|
28182
|
+
return;
|
|
28183
|
+
warnDeprecatedOptionAlias("--tenant", TENANT_SWITCH_COMMAND);
|
|
28184
|
+
}
|
|
28128
28185
|
// ../../common/src/polling/terminal-statuses.ts
|
|
28129
28186
|
var TERMINAL_STATUSES = new Set([
|
|
28130
28187
|
"completed",
|
|
@@ -28603,6 +28660,14 @@ class VoidApiResponse {
|
|
|
28603
28660
|
}
|
|
28604
28661
|
}
|
|
28605
28662
|
|
|
28663
|
+
// ../resourcecatalog-sdk/generated/src/models/EntitySearchState.ts
|
|
28664
|
+
function EntitySearchStateFromJSON(json2) {
|
|
28665
|
+
return EntitySearchStateFromJSONTyped(json2, false);
|
|
28666
|
+
}
|
|
28667
|
+
function EntitySearchStateFromJSONTyped(json2, ignoreDiscriminator) {
|
|
28668
|
+
return json2;
|
|
28669
|
+
}
|
|
28670
|
+
|
|
28606
28671
|
// ../resourcecatalog-sdk/generated/src/models/TagType.ts
|
|
28607
28672
|
var TagType = {
|
|
28608
28673
|
Label: "Label",
|
|
@@ -28618,6 +28683,168 @@ function TagTypeToJSON(value) {
|
|
|
28618
28683
|
return value;
|
|
28619
28684
|
}
|
|
28620
28685
|
|
|
28686
|
+
// ../resourcecatalog-sdk/generated/src/models/TagModel.ts
|
|
28687
|
+
function TagModelFromJSON(json2) {
|
|
28688
|
+
return TagModelFromJSONTyped(json2, false);
|
|
28689
|
+
}
|
|
28690
|
+
function TagModelFromJSONTyped(json2, ignoreDiscriminator) {
|
|
28691
|
+
if (json2 == null) {
|
|
28692
|
+
return json2;
|
|
28693
|
+
}
|
|
28694
|
+
return {
|
|
28695
|
+
key: json2["key"] == null ? undefined : json2["key"],
|
|
28696
|
+
displayName: json2["displayName"] == null ? undefined : json2["displayName"],
|
|
28697
|
+
name: json2["name"] == null ? undefined : json2["name"],
|
|
28698
|
+
displayValue: json2["displayValue"] == null ? undefined : json2["displayValue"],
|
|
28699
|
+
value: json2["value"] == null ? undefined : json2["value"],
|
|
28700
|
+
type: json2["type"] == null ? undefined : TagTypeFromJSON(json2["type"]),
|
|
28701
|
+
accountKey: json2["accountKey"] == null ? undefined : json2["accountKey"],
|
|
28702
|
+
tenantKey: json2["tenantKey"] == null ? undefined : json2["tenantKey"],
|
|
28703
|
+
userKey: json2["userKey"] == null ? undefined : json2["userKey"]
|
|
28704
|
+
};
|
|
28705
|
+
}
|
|
28706
|
+
|
|
28707
|
+
// ../resourcecatalog-sdk/generated/src/models/EntityScope.ts
|
|
28708
|
+
function EntityScopeFromJSON(json2) {
|
|
28709
|
+
return EntityScopeFromJSONTyped(json2, false);
|
|
28710
|
+
}
|
|
28711
|
+
function EntityScopeFromJSONTyped(json2, ignoreDiscriminator) {
|
|
28712
|
+
return json2;
|
|
28713
|
+
}
|
|
28714
|
+
|
|
28715
|
+
// ../resourcecatalog-sdk/generated/src/models/FolderType.ts
|
|
28716
|
+
function FolderTypeFromJSON(json2) {
|
|
28717
|
+
return FolderTypeFromJSONTyped(json2, false);
|
|
28718
|
+
}
|
|
28719
|
+
function FolderTypeFromJSONTyped(json2, ignoreDiscriminator) {
|
|
28720
|
+
return json2;
|
|
28721
|
+
}
|
|
28722
|
+
|
|
28723
|
+
// ../resourcecatalog-sdk/generated/src/models/FolderModel.ts
|
|
28724
|
+
function FolderModelFromJSON(json2) {
|
|
28725
|
+
return FolderModelFromJSONTyped(json2, false);
|
|
28726
|
+
}
|
|
28727
|
+
function FolderModelFromJSONTyped(json2, ignoreDiscriminator) {
|
|
28728
|
+
if (json2 == null) {
|
|
28729
|
+
return json2;
|
|
28730
|
+
}
|
|
28731
|
+
return {
|
|
28732
|
+
id: json2["id"] == null ? undefined : json2["id"],
|
|
28733
|
+
key: json2["key"] == null ? undefined : json2["key"],
|
|
28734
|
+
displayName: json2["displayName"] == null ? undefined : json2["displayName"],
|
|
28735
|
+
code: json2["code"] == null ? undefined : json2["code"],
|
|
28736
|
+
fullyQualifiedName: json2["fullyQualifiedName"] == null ? undefined : json2["fullyQualifiedName"],
|
|
28737
|
+
timestamp: json2["timestamp"] == null ? undefined : new Date(json2["timestamp"]),
|
|
28738
|
+
tenantKey: json2["tenantKey"] == null ? undefined : json2["tenantKey"],
|
|
28739
|
+
accountKey: json2["accountKey"] == null ? undefined : json2["accountKey"],
|
|
28740
|
+
userKey: json2["userKey"] == null ? undefined : json2["userKey"],
|
|
28741
|
+
type: json2["type"] == null ? undefined : FolderTypeFromJSON(json2["type"]),
|
|
28742
|
+
path: json2["path"] == null ? undefined : json2["path"],
|
|
28743
|
+
permissions: json2["permissions"] == null ? undefined : json2["permissions"]
|
|
28744
|
+
};
|
|
28745
|
+
}
|
|
28746
|
+
|
|
28747
|
+
// ../resourcecatalog-sdk/generated/src/models/EntityModel.ts
|
|
28748
|
+
function EntityModelFromJSON(json2) {
|
|
28749
|
+
return EntityModelFromJSONTyped(json2, false);
|
|
28750
|
+
}
|
|
28751
|
+
function EntityModelFromJSONTyped(json2, ignoreDiscriminator) {
|
|
28752
|
+
if (json2 == null) {
|
|
28753
|
+
return json2;
|
|
28754
|
+
}
|
|
28755
|
+
return {
|
|
28756
|
+
entityKey: json2["entityKey"] == null ? undefined : json2["entityKey"],
|
|
28757
|
+
name: json2["name"] == null ? undefined : json2["name"],
|
|
28758
|
+
description: json2["description"] == null ? undefined : json2["description"],
|
|
28759
|
+
entityType: json2["entityType"] == null ? undefined : json2["entityType"],
|
|
28760
|
+
tags: json2["tags"] == null ? undefined : json2["tags"].map(TagModelFromJSON),
|
|
28761
|
+
folders: json2["folders"] == null ? undefined : json2["folders"].map(FolderModelFromJSON),
|
|
28762
|
+
linkedFoldersCount: json2["linkedFoldersCount"] == null ? undefined : json2["linkedFoldersCount"],
|
|
28763
|
+
source: json2["source"] == null ? undefined : json2["source"],
|
|
28764
|
+
scope: json2["scope"] == null ? undefined : EntityScopeFromJSON(json2["scope"]),
|
|
28765
|
+
searchState: json2["searchState"] == null ? undefined : EntitySearchStateFromJSON(json2["searchState"]),
|
|
28766
|
+
timestamp: json2["timestamp"] == null ? undefined : new Date(json2["timestamp"]),
|
|
28767
|
+
folderKey: json2["folderKey"] == null ? undefined : json2["folderKey"],
|
|
28768
|
+
folderKeys: json2["folderKeys"] == null ? undefined : json2["folderKeys"],
|
|
28769
|
+
tenantKey: json2["tenantKey"] == null ? undefined : json2["tenantKey"],
|
|
28770
|
+
accountKey: json2["accountKey"] == null ? undefined : json2["accountKey"],
|
|
28771
|
+
userKey: json2["userKey"] == null ? undefined : json2["userKey"],
|
|
28772
|
+
dependencies: json2["dependencies"] == null ? undefined : json2["dependencies"],
|
|
28773
|
+
customData: json2["customData"] == null ? undefined : json2["customData"],
|
|
28774
|
+
entitySubType: json2["entitySubType"] == null ? undefined : json2["entitySubType"]
|
|
28775
|
+
};
|
|
28776
|
+
}
|
|
28777
|
+
|
|
28778
|
+
// ../resourcecatalog-sdk/generated/src/models/EntityModelPaginationResult.ts
|
|
28779
|
+
function EntityModelPaginationResultFromJSON(json2) {
|
|
28780
|
+
return EntityModelPaginationResultFromJSONTyped(json2, false);
|
|
28781
|
+
}
|
|
28782
|
+
function EntityModelPaginationResultFromJSONTyped(json2, ignoreDiscriminator) {
|
|
28783
|
+
if (json2 == null) {
|
|
28784
|
+
return json2;
|
|
28785
|
+
}
|
|
28786
|
+
return {
|
|
28787
|
+
count: json2["count"] == null ? undefined : json2["count"],
|
|
28788
|
+
value: json2["value"] == null ? undefined : json2["value"].map(EntityModelFromJSON)
|
|
28789
|
+
};
|
|
28790
|
+
}
|
|
28791
|
+
|
|
28792
|
+
// ../resourcecatalog-sdk/generated/src/models/FolderDto.ts
|
|
28793
|
+
function FolderDtoFromJSON(json2) {
|
|
28794
|
+
return FolderDtoFromJSONTyped(json2, false);
|
|
28795
|
+
}
|
|
28796
|
+
function FolderDtoFromJSONTyped(json2, ignoreDiscriminator) {
|
|
28797
|
+
if (json2 == null) {
|
|
28798
|
+
return json2;
|
|
28799
|
+
}
|
|
28800
|
+
return {
|
|
28801
|
+
key: json2["key"] == null ? undefined : json2["key"],
|
|
28802
|
+
fullyQualifiedName: json2["fullyQualifiedName"] == null ? undefined : json2["fullyQualifiedName"],
|
|
28803
|
+
isPersonal: json2["isPersonal"] == null ? undefined : json2["isPersonal"],
|
|
28804
|
+
folderType: json2["folderType"] == null ? undefined : FolderTypeFromJSON(json2["folderType"])
|
|
28805
|
+
};
|
|
28806
|
+
}
|
|
28807
|
+
|
|
28808
|
+
// ../resourcecatalog-sdk/generated/src/models/FolderEntityModel.ts
|
|
28809
|
+
function FolderEntityModelFromJSON(json2) {
|
|
28810
|
+
return FolderEntityModelFromJSONTyped(json2, false);
|
|
28811
|
+
}
|
|
28812
|
+
function FolderEntityModelFromJSONTyped(json2, ignoreDiscriminator) {
|
|
28813
|
+
if (json2 == null) {
|
|
28814
|
+
return json2;
|
|
28815
|
+
}
|
|
28816
|
+
return {
|
|
28817
|
+
folderKey: json2["folderKey"] == null ? undefined : json2["folderKey"],
|
|
28818
|
+
folderName: json2["folderName"] == null ? undefined : json2["folderName"],
|
|
28819
|
+
folderCode: json2["folderCode"] == null ? undefined : json2["folderCode"],
|
|
28820
|
+
fullyQualifiedName: json2["fullyQualifiedName"] == null ? undefined : json2["fullyQualifiedName"],
|
|
28821
|
+
folderType: json2["folderType"] == null ? undefined : FolderTypeFromJSON(json2["folderType"]),
|
|
28822
|
+
folderPath: json2["folderPath"] == null ? undefined : json2["folderPath"],
|
|
28823
|
+
entityKey: json2["entityKey"] == null ? undefined : json2["entityKey"],
|
|
28824
|
+
entityName: json2["entityName"] == null ? undefined : json2["entityName"],
|
|
28825
|
+
entityDescription: json2["entityDescription"] == null ? undefined : json2["entityDescription"],
|
|
28826
|
+
entityType: json2["entityType"] == null ? undefined : json2["entityType"],
|
|
28827
|
+
entitySubType: json2["entitySubType"] == null ? undefined : json2["entitySubType"],
|
|
28828
|
+
entitySource: json2["entitySource"] == null ? undefined : json2["entitySource"]
|
|
28829
|
+
};
|
|
28830
|
+
}
|
|
28831
|
+
|
|
28832
|
+
// ../resourcecatalog-sdk/generated/src/models/FolderEntityModelCursorPaginationResult.ts
|
|
28833
|
+
function FolderEntityModelCursorPaginationResultFromJSON(json2) {
|
|
28834
|
+
return FolderEntityModelCursorPaginationResultFromJSONTyped(json2, false);
|
|
28835
|
+
}
|
|
28836
|
+
function FolderEntityModelCursorPaginationResultFromJSONTyped(json2, ignoreDiscriminator) {
|
|
28837
|
+
if (json2 == null) {
|
|
28838
|
+
return json2;
|
|
28839
|
+
}
|
|
28840
|
+
return {
|
|
28841
|
+
items: json2["items"] == null ? undefined : json2["items"].map(FolderEntityModelFromJSON),
|
|
28842
|
+
totalCount: json2["totalCount"] == null ? undefined : json2["totalCount"],
|
|
28843
|
+
nextPage: json2["nextPage"] == null ? undefined : json2["nextPage"],
|
|
28844
|
+
previousPage: json2["previousPage"] == null ? undefined : json2["previousPage"]
|
|
28845
|
+
};
|
|
28846
|
+
}
|
|
28847
|
+
|
|
28621
28848
|
// ../resourcecatalog-sdk/generated/src/models/TagReferencesModel.ts
|
|
28622
28849
|
function TagReferencesModelFromJSON(json2) {
|
|
28623
28850
|
return TagReferencesModelFromJSONTyped(json2, false);
|
|
@@ -28762,8 +28989,445 @@ function ValueModelToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
28762
28989
|
};
|
|
28763
28990
|
}
|
|
28764
28991
|
|
|
28765
|
-
// ../resourcecatalog-sdk/generated/src/apis/
|
|
28766
|
-
class
|
|
28992
|
+
// ../resourcecatalog-sdk/generated/src/apis/EntitiesApi.ts
|
|
28993
|
+
class EntitiesApi extends BaseAPI {
|
|
28994
|
+
async entitiesGetRaw(requestParameters, initOverrides) {
|
|
28995
|
+
if (requestParameters["xUiPathInternalAccountId"] == null) {
|
|
28996
|
+
throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGet().');
|
|
28997
|
+
}
|
|
28998
|
+
const queryParameters = {};
|
|
28999
|
+
if (requestParameters["skip"] != null) {
|
|
29000
|
+
queryParameters["skip"] = requestParameters["skip"];
|
|
29001
|
+
}
|
|
29002
|
+
if (requestParameters["take"] != null) {
|
|
29003
|
+
queryParameters["take"] = requestParameters["take"];
|
|
29004
|
+
}
|
|
29005
|
+
if (requestParameters["entityTypes"] != null) {
|
|
29006
|
+
queryParameters["entityTypes"] = requestParameters["entityTypes"];
|
|
29007
|
+
}
|
|
29008
|
+
if (requestParameters["entitySubType"] != null) {
|
|
29009
|
+
queryParameters["entitySubType"] = requestParameters["entitySubType"];
|
|
29010
|
+
}
|
|
29011
|
+
if (requestParameters["apiVersion"] != null) {
|
|
29012
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
29013
|
+
}
|
|
29014
|
+
const headerParameters = {};
|
|
29015
|
+
if (requestParameters["xVersion"] != null) {
|
|
29016
|
+
headerParameters["X-Version"] = String(requestParameters["xVersion"]);
|
|
29017
|
+
}
|
|
29018
|
+
if (requestParameters["xUiPathInternalAccountId"] != null) {
|
|
29019
|
+
headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
|
|
29020
|
+
}
|
|
29021
|
+
if (requestParameters["xUiPathInternalTenantId"] != null) {
|
|
29022
|
+
headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
|
|
29023
|
+
}
|
|
29024
|
+
if (requestParameters["xUIPATHOrganizationUnitId"] != null) {
|
|
29025
|
+
headerParameters["X-UIPATH-OrganizationUnitId"] = String(requestParameters["xUIPATHOrganizationUnitId"]);
|
|
29026
|
+
}
|
|
29027
|
+
if (requestParameters["xUIPATHFolderPath"] != null) {
|
|
29028
|
+
headerParameters["X-UIPATH-FolderPath"] = String(requestParameters["xUIPATHFolderPath"]);
|
|
29029
|
+
}
|
|
29030
|
+
if (requestParameters["xUIPATHFolderPathEncoded"] != null) {
|
|
29031
|
+
headerParameters["X-UIPATH-FolderPath-Encoded"] = String(requestParameters["xUIPATHFolderPathEncoded"]);
|
|
29032
|
+
}
|
|
29033
|
+
if (requestParameters["xUIPATHFolderKey"] != null) {
|
|
29034
|
+
headerParameters["X-UIPATH-FolderKey"] = String(requestParameters["xUIPATHFolderKey"]);
|
|
29035
|
+
}
|
|
29036
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
29037
|
+
const token = this.configuration.accessToken;
|
|
29038
|
+
const tokenString = await token("Bearer", []);
|
|
29039
|
+
if (tokenString) {
|
|
29040
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
29041
|
+
}
|
|
29042
|
+
}
|
|
29043
|
+
let urlPath = `/Entities`;
|
|
29044
|
+
const response = await this.request({
|
|
29045
|
+
path: urlPath,
|
|
29046
|
+
method: "GET",
|
|
29047
|
+
headers: headerParameters,
|
|
29048
|
+
query: queryParameters
|
|
29049
|
+
}, initOverrides);
|
|
29050
|
+
return new JSONApiResponse(response, (jsonValue) => EntityModelPaginationResultFromJSON(jsonValue));
|
|
29051
|
+
}
|
|
29052
|
+
async entitiesGet(requestParameters, initOverrides) {
|
|
29053
|
+
const response = await this.entitiesGetRaw(requestParameters, initOverrides);
|
|
29054
|
+
return await response.value();
|
|
29055
|
+
}
|
|
29056
|
+
async entitiesGetByEntityTypeRaw(requestParameters, initOverrides) {
|
|
29057
|
+
if (requestParameters["entityType"] == null) {
|
|
29058
|
+
throw new RequiredError("entityType", 'Required parameter "entityType" was null or undefined when calling entitiesGetByEntityType().');
|
|
29059
|
+
}
|
|
29060
|
+
if (requestParameters["xUiPathInternalAccountId"] == null) {
|
|
29061
|
+
throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGetByEntityType().');
|
|
29062
|
+
}
|
|
29063
|
+
const queryParameters = {};
|
|
29064
|
+
if (requestParameters["name"] != null) {
|
|
29065
|
+
queryParameters["name"] = requestParameters["name"];
|
|
29066
|
+
}
|
|
29067
|
+
if (requestParameters["skip"] != null) {
|
|
29068
|
+
queryParameters["skip"] = requestParameters["skip"];
|
|
29069
|
+
}
|
|
29070
|
+
if (requestParameters["take"] != null) {
|
|
29071
|
+
queryParameters["take"] = requestParameters["take"];
|
|
29072
|
+
}
|
|
29073
|
+
if (requestParameters["entitySubType"] != null) {
|
|
29074
|
+
queryParameters["entitySubType"] = requestParameters["entitySubType"];
|
|
29075
|
+
}
|
|
29076
|
+
if (requestParameters["apiVersion"] != null) {
|
|
29077
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
29078
|
+
}
|
|
29079
|
+
const headerParameters = {};
|
|
29080
|
+
if (requestParameters["xVersion"] != null) {
|
|
29081
|
+
headerParameters["X-Version"] = String(requestParameters["xVersion"]);
|
|
29082
|
+
}
|
|
29083
|
+
if (requestParameters["xUiPathInternalAccountId"] != null) {
|
|
29084
|
+
headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
|
|
29085
|
+
}
|
|
29086
|
+
if (requestParameters["xUiPathInternalTenantId"] != null) {
|
|
29087
|
+
headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
|
|
29088
|
+
}
|
|
29089
|
+
if (requestParameters["xUIPATHOrganizationUnitId"] != null) {
|
|
29090
|
+
headerParameters["X-UIPATH-OrganizationUnitId"] = String(requestParameters["xUIPATHOrganizationUnitId"]);
|
|
29091
|
+
}
|
|
29092
|
+
if (requestParameters["xUIPATHFolderPath"] != null) {
|
|
29093
|
+
headerParameters["X-UIPATH-FolderPath"] = String(requestParameters["xUIPATHFolderPath"]);
|
|
29094
|
+
}
|
|
29095
|
+
if (requestParameters["xUIPATHFolderPathEncoded"] != null) {
|
|
29096
|
+
headerParameters["X-UIPATH-FolderPath-Encoded"] = String(requestParameters["xUIPATHFolderPathEncoded"]);
|
|
29097
|
+
}
|
|
29098
|
+
if (requestParameters["xUIPATHFolderKey"] != null) {
|
|
29099
|
+
headerParameters["X-UIPATH-FolderKey"] = String(requestParameters["xUIPATHFolderKey"]);
|
|
29100
|
+
}
|
|
29101
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
29102
|
+
const token = this.configuration.accessToken;
|
|
29103
|
+
const tokenString = await token("Bearer", []);
|
|
29104
|
+
if (tokenString) {
|
|
29105
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
29106
|
+
}
|
|
29107
|
+
}
|
|
29108
|
+
let urlPath = `/Entities/{entityType}`;
|
|
29109
|
+
urlPath = urlPath.replace(`{${"entityType"}}`, encodeURIComponent(String(requestParameters["entityType"])));
|
|
29110
|
+
const response = await this.request({
|
|
29111
|
+
path: urlPath,
|
|
29112
|
+
method: "GET",
|
|
29113
|
+
headers: headerParameters,
|
|
29114
|
+
query: queryParameters
|
|
29115
|
+
}, initOverrides);
|
|
29116
|
+
return new JSONApiResponse(response, (jsonValue) => EntityModelPaginationResultFromJSON(jsonValue));
|
|
29117
|
+
}
|
|
29118
|
+
async entitiesGetByEntityType(requestParameters, initOverrides) {
|
|
29119
|
+
const response = await this.entitiesGetByEntityTypeRaw(requestParameters, initOverrides);
|
|
29120
|
+
return await response.value();
|
|
29121
|
+
}
|
|
29122
|
+
async entitiesGetDependenciesRaw(requestParameters, initOverrides) {
|
|
29123
|
+
if (requestParameters["entityKey"] == null) {
|
|
29124
|
+
throw new RequiredError("entityKey", 'Required parameter "entityKey" was null or undefined when calling entitiesGetDependencies().');
|
|
29125
|
+
}
|
|
29126
|
+
if (requestParameters["xUiPathInternalAccountId"] == null) {
|
|
29127
|
+
throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGetDependencies().');
|
|
29128
|
+
}
|
|
29129
|
+
const queryParameters = {};
|
|
29130
|
+
if (requestParameters["apiVersion"] != null) {
|
|
29131
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
29132
|
+
}
|
|
29133
|
+
const headerParameters = {};
|
|
29134
|
+
if (requestParameters["xVersion"] != null) {
|
|
29135
|
+
headerParameters["X-Version"] = String(requestParameters["xVersion"]);
|
|
29136
|
+
}
|
|
29137
|
+
if (requestParameters["xUiPathInternalAccountId"] != null) {
|
|
29138
|
+
headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
|
|
29139
|
+
}
|
|
29140
|
+
if (requestParameters["xUiPathInternalTenantId"] != null) {
|
|
29141
|
+
headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
|
|
29142
|
+
}
|
|
29143
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
29144
|
+
const token = this.configuration.accessToken;
|
|
29145
|
+
const tokenString = await token("Bearer", []);
|
|
29146
|
+
if (tokenString) {
|
|
29147
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
29148
|
+
}
|
|
29149
|
+
}
|
|
29150
|
+
let urlPath = `/Entities/{entityKey}/Dependencies`;
|
|
29151
|
+
urlPath = urlPath.replace(`{${"entityKey"}}`, encodeURIComponent(String(requestParameters["entityKey"])));
|
|
29152
|
+
const response = await this.request({
|
|
29153
|
+
path: urlPath,
|
|
29154
|
+
method: "GET",
|
|
29155
|
+
headers: headerParameters,
|
|
29156
|
+
query: queryParameters
|
|
29157
|
+
}, initOverrides);
|
|
29158
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(EntityModelFromJSON));
|
|
29159
|
+
}
|
|
29160
|
+
async entitiesGetDependencies(requestParameters, initOverrides) {
|
|
29161
|
+
const response = await this.entitiesGetDependenciesRaw(requestParameters, initOverrides);
|
|
29162
|
+
return await response.value();
|
|
29163
|
+
}
|
|
29164
|
+
async entitiesGetEntitiesByKeysRaw(requestParameters, initOverrides) {
|
|
29165
|
+
if (requestParameters["xUiPathInternalAccountId"] == null) {
|
|
29166
|
+
throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGetEntitiesByKeys().');
|
|
29167
|
+
}
|
|
29168
|
+
const queryParameters = {};
|
|
29169
|
+
if (requestParameters["apiVersion"] != null) {
|
|
29170
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
29171
|
+
}
|
|
29172
|
+
const headerParameters = {};
|
|
29173
|
+
headerParameters["Content-Type"] = "application/json";
|
|
29174
|
+
if (requestParameters["xVersion"] != null) {
|
|
29175
|
+
headerParameters["X-Version"] = String(requestParameters["xVersion"]);
|
|
29176
|
+
}
|
|
29177
|
+
if (requestParameters["xUiPathInternalAccountId"] != null) {
|
|
29178
|
+
headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
|
|
29179
|
+
}
|
|
29180
|
+
if (requestParameters["xUiPathInternalTenantId"] != null) {
|
|
29181
|
+
headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
|
|
29182
|
+
}
|
|
29183
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
29184
|
+
const token = this.configuration.accessToken;
|
|
29185
|
+
const tokenString = await token("Bearer", []);
|
|
29186
|
+
if (tokenString) {
|
|
29187
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
29188
|
+
}
|
|
29189
|
+
}
|
|
29190
|
+
let urlPath = `/Entities/GetEntitiesByKeys`;
|
|
29191
|
+
const response = await this.request({
|
|
29192
|
+
path: urlPath,
|
|
29193
|
+
method: "POST",
|
|
29194
|
+
headers: headerParameters,
|
|
29195
|
+
query: queryParameters,
|
|
29196
|
+
body: requestParameters["requestBody"]
|
|
29197
|
+
}, initOverrides);
|
|
29198
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(EntityModelFromJSON));
|
|
29199
|
+
}
|
|
29200
|
+
async entitiesGetEntitiesByKeys(requestParameters, initOverrides) {
|
|
29201
|
+
const response = await this.entitiesGetEntitiesByKeysRaw(requestParameters, initOverrides);
|
|
29202
|
+
return await response.value();
|
|
29203
|
+
}
|
|
29204
|
+
async entitiesGetFoldersRaw(requestParameters, initOverrides) {
|
|
29205
|
+
if (requestParameters["entityType"] == null) {
|
|
29206
|
+
throw new RequiredError("entityType", 'Required parameter "entityType" was null or undefined when calling entitiesGetFolders().');
|
|
29207
|
+
}
|
|
29208
|
+
if (requestParameters["xUiPathInternalAccountId"] == null) {
|
|
29209
|
+
throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGetFolders().');
|
|
29210
|
+
}
|
|
29211
|
+
const queryParameters = {};
|
|
29212
|
+
if (requestParameters["permissions"] != null) {
|
|
29213
|
+
queryParameters["permissions"] = requestParameters["permissions"];
|
|
29214
|
+
}
|
|
29215
|
+
if (requestParameters["folderTypes"] != null) {
|
|
29216
|
+
queryParameters["folderTypes"] = requestParameters["folderTypes"];
|
|
29217
|
+
}
|
|
29218
|
+
if (requestParameters["apiVersion"] != null) {
|
|
29219
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
29220
|
+
}
|
|
29221
|
+
const headerParameters = {};
|
|
29222
|
+
if (requestParameters["xVersion"] != null) {
|
|
29223
|
+
headerParameters["X-Version"] = String(requestParameters["xVersion"]);
|
|
29224
|
+
}
|
|
29225
|
+
if (requestParameters["xUiPathInternalAccountId"] != null) {
|
|
29226
|
+
headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
|
|
29227
|
+
}
|
|
29228
|
+
if (requestParameters["xUiPathInternalTenantId"] != null) {
|
|
29229
|
+
headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
|
|
29230
|
+
}
|
|
29231
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
29232
|
+
const token = this.configuration.accessToken;
|
|
29233
|
+
const tokenString = await token("Bearer", []);
|
|
29234
|
+
if (tokenString) {
|
|
29235
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
29236
|
+
}
|
|
29237
|
+
}
|
|
29238
|
+
let urlPath = `/Entities/{entityType}/Folders`;
|
|
29239
|
+
urlPath = urlPath.replace(`{${"entityType"}}`, encodeURIComponent(String(requestParameters["entityType"])));
|
|
29240
|
+
const response = await this.request({
|
|
29241
|
+
path: urlPath,
|
|
29242
|
+
method: "GET",
|
|
29243
|
+
headers: headerParameters,
|
|
29244
|
+
query: queryParameters
|
|
29245
|
+
}, initOverrides);
|
|
29246
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(FolderDtoFromJSON));
|
|
29247
|
+
}
|
|
29248
|
+
async entitiesGetFolders(requestParameters, initOverrides) {
|
|
29249
|
+
const response = await this.entitiesGetFoldersRaw(requestParameters, initOverrides);
|
|
29250
|
+
return await response.value();
|
|
29251
|
+
}
|
|
29252
|
+
async entitiesGetPermissionsRaw(requestParameters, initOverrides) {
|
|
29253
|
+
if (requestParameters["entityType"] == null) {
|
|
29254
|
+
throw new RequiredError("entityType", 'Required parameter "entityType" was null or undefined when calling entitiesGetPermissions().');
|
|
29255
|
+
}
|
|
29256
|
+
if (requestParameters["xUiPathInternalAccountId"] == null) {
|
|
29257
|
+
throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGetPermissions().');
|
|
29258
|
+
}
|
|
29259
|
+
const queryParameters = {};
|
|
29260
|
+
if (requestParameters["apiVersion"] != null) {
|
|
29261
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
29262
|
+
}
|
|
29263
|
+
const headerParameters = {};
|
|
29264
|
+
if (requestParameters["xVersion"] != null) {
|
|
29265
|
+
headerParameters["X-Version"] = String(requestParameters["xVersion"]);
|
|
29266
|
+
}
|
|
29267
|
+
if (requestParameters["xUiPathInternalAccountId"] != null) {
|
|
29268
|
+
headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
|
|
29269
|
+
}
|
|
29270
|
+
if (requestParameters["xUiPathInternalTenantId"] != null) {
|
|
29271
|
+
headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
|
|
29272
|
+
}
|
|
29273
|
+
if (requestParameters["xUIPATHOrganizationUnitId"] != null) {
|
|
29274
|
+
headerParameters["X-UIPATH-OrganizationUnitId"] = String(requestParameters["xUIPATHOrganizationUnitId"]);
|
|
29275
|
+
}
|
|
29276
|
+
if (requestParameters["xUIPATHFolderPath"] != null) {
|
|
29277
|
+
headerParameters["X-UIPATH-FolderPath"] = String(requestParameters["xUIPATHFolderPath"]);
|
|
29278
|
+
}
|
|
29279
|
+
if (requestParameters["xUIPATHFolderPathEncoded"] != null) {
|
|
29280
|
+
headerParameters["X-UIPATH-FolderPath-Encoded"] = String(requestParameters["xUIPATHFolderPathEncoded"]);
|
|
29281
|
+
}
|
|
29282
|
+
if (requestParameters["xUIPATHFolderKey"] != null) {
|
|
29283
|
+
headerParameters["X-UIPATH-FolderKey"] = String(requestParameters["xUIPATHFolderKey"]);
|
|
29284
|
+
}
|
|
29285
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
29286
|
+
const token = this.configuration.accessToken;
|
|
29287
|
+
const tokenString = await token("Bearer", []);
|
|
29288
|
+
if (tokenString) {
|
|
29289
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
29290
|
+
}
|
|
29291
|
+
}
|
|
29292
|
+
let urlPath = `/Entities/{entityType}/Permissions`;
|
|
29293
|
+
urlPath = urlPath.replace(`{${"entityType"}}`, encodeURIComponent(String(requestParameters["entityType"])));
|
|
29294
|
+
const response = await this.request({
|
|
29295
|
+
path: urlPath,
|
|
29296
|
+
method: "GET",
|
|
29297
|
+
headers: headerParameters,
|
|
29298
|
+
query: queryParameters
|
|
29299
|
+
}, initOverrides);
|
|
29300
|
+
return new JSONApiResponse(response);
|
|
29301
|
+
}
|
|
29302
|
+
async entitiesGetPermissions(requestParameters, initOverrides) {
|
|
29303
|
+
const response = await this.entitiesGetPermissionsRaw(requestParameters, initOverrides);
|
|
29304
|
+
return await response.value();
|
|
29305
|
+
}
|
|
29306
|
+
async entitiesSearchRaw(requestParameters, initOverrides) {
|
|
29307
|
+
if (requestParameters["xUiPathInternalAccountId"] == null) {
|
|
29308
|
+
throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesSearch().');
|
|
29309
|
+
}
|
|
29310
|
+
const queryParameters = {};
|
|
29311
|
+
if (requestParameters["name"] != null) {
|
|
29312
|
+
queryParameters["name"] = requestParameters["name"];
|
|
29313
|
+
}
|
|
29314
|
+
if (requestParameters["skip"] != null) {
|
|
29315
|
+
queryParameters["skip"] = requestParameters["skip"];
|
|
29316
|
+
}
|
|
29317
|
+
if (requestParameters["take"] != null) {
|
|
29318
|
+
queryParameters["take"] = requestParameters["take"];
|
|
29319
|
+
}
|
|
29320
|
+
if (requestParameters["entityTypes"] != null) {
|
|
29321
|
+
queryParameters["entityTypes"] = requestParameters["entityTypes"];
|
|
29322
|
+
}
|
|
29323
|
+
if (requestParameters["entitySubType"] != null) {
|
|
29324
|
+
queryParameters["entitySubType"] = requestParameters["entitySubType"];
|
|
29325
|
+
}
|
|
29326
|
+
if (requestParameters["apiVersion"] != null) {
|
|
29327
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
29328
|
+
}
|
|
29329
|
+
const headerParameters = {};
|
|
29330
|
+
if (requestParameters["xVersion"] != null) {
|
|
29331
|
+
headerParameters["X-Version"] = String(requestParameters["xVersion"]);
|
|
29332
|
+
}
|
|
29333
|
+
if (requestParameters["xUiPathInternalAccountId"] != null) {
|
|
29334
|
+
headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
|
|
29335
|
+
}
|
|
29336
|
+
if (requestParameters["xUiPathInternalTenantId"] != null) {
|
|
29337
|
+
headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
|
|
29338
|
+
}
|
|
29339
|
+
if (requestParameters["xUIPATHOrganizationUnitId"] != null) {
|
|
29340
|
+
headerParameters["X-UIPATH-OrganizationUnitId"] = String(requestParameters["xUIPATHOrganizationUnitId"]);
|
|
29341
|
+
}
|
|
29342
|
+
if (requestParameters["xUIPATHFolderPath"] != null) {
|
|
29343
|
+
headerParameters["X-UIPATH-FolderPath"] = String(requestParameters["xUIPATHFolderPath"]);
|
|
29344
|
+
}
|
|
29345
|
+
if (requestParameters["xUIPATHFolderPathEncoded"] != null) {
|
|
29346
|
+
headerParameters["X-UIPATH-FolderPath-Encoded"] = String(requestParameters["xUIPATHFolderPathEncoded"]);
|
|
29347
|
+
}
|
|
29348
|
+
if (requestParameters["xUIPATHFolderKey"] != null) {
|
|
29349
|
+
headerParameters["X-UIPATH-FolderKey"] = String(requestParameters["xUIPATHFolderKey"]);
|
|
29350
|
+
}
|
|
29351
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
29352
|
+
const token = this.configuration.accessToken;
|
|
29353
|
+
const tokenString = await token("Bearer", []);
|
|
29354
|
+
if (tokenString) {
|
|
29355
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
29356
|
+
}
|
|
29357
|
+
}
|
|
29358
|
+
let urlPath = `/Entities/Search`;
|
|
29359
|
+
const response = await this.request({
|
|
29360
|
+
path: urlPath,
|
|
29361
|
+
method: "GET",
|
|
29362
|
+
headers: headerParameters,
|
|
29363
|
+
query: queryParameters
|
|
29364
|
+
}, initOverrides);
|
|
29365
|
+
return new JSONApiResponse(response, (jsonValue) => EntityModelPaginationResultFromJSON(jsonValue));
|
|
29366
|
+
}
|
|
29367
|
+
async entitiesSearch(requestParameters, initOverrides) {
|
|
29368
|
+
const response = await this.entitiesSearchRaw(requestParameters, initOverrides);
|
|
29369
|
+
return await response.value();
|
|
29370
|
+
}
|
|
29371
|
+
async entitiesSearchFolderEntitiesRaw(requestParameters, initOverrides) {
|
|
29372
|
+
if (requestParameters["xUiPathInternalAccountId"] == null) {
|
|
29373
|
+
throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesSearchFolderEntities().');
|
|
29374
|
+
}
|
|
29375
|
+
const queryParameters = {};
|
|
29376
|
+
if (requestParameters["name"] != null) {
|
|
29377
|
+
queryParameters["name"] = requestParameters["name"];
|
|
29378
|
+
}
|
|
29379
|
+
if (requestParameters["pageCursor"] != null) {
|
|
29380
|
+
queryParameters["pageCursor"] = requestParameters["pageCursor"];
|
|
29381
|
+
}
|
|
29382
|
+
if (requestParameters["pageSize"] != null) {
|
|
29383
|
+
queryParameters["pageSize"] = requestParameters["pageSize"];
|
|
29384
|
+
}
|
|
29385
|
+
if (requestParameters["entityTypes"] != null) {
|
|
29386
|
+
queryParameters["entityTypes"] = requestParameters["entityTypes"];
|
|
29387
|
+
}
|
|
29388
|
+
if (requestParameters["entitySubTypes"] != null) {
|
|
29389
|
+
queryParameters["entitySubTypes"] = requestParameters["entitySubTypes"];
|
|
29390
|
+
}
|
|
29391
|
+
if (requestParameters["folderTypes"] != null) {
|
|
29392
|
+
queryParameters["folderTypes"] = requestParameters["folderTypes"];
|
|
29393
|
+
}
|
|
29394
|
+
if (requestParameters["apiVersion"] != null) {
|
|
29395
|
+
queryParameters["api-version"] = requestParameters["apiVersion"];
|
|
29396
|
+
}
|
|
29397
|
+
const headerParameters = {};
|
|
29398
|
+
if (requestParameters["xVersion"] != null) {
|
|
29399
|
+
headerParameters["X-Version"] = String(requestParameters["xVersion"]);
|
|
29400
|
+
}
|
|
29401
|
+
if (requestParameters["xUiPathInternalAccountId"] != null) {
|
|
29402
|
+
headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
|
|
29403
|
+
}
|
|
29404
|
+
if (requestParameters["xUiPathInternalTenantId"] != null) {
|
|
29405
|
+
headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
|
|
29406
|
+
}
|
|
29407
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
29408
|
+
const token = this.configuration.accessToken;
|
|
29409
|
+
const tokenString = await token("Bearer", []);
|
|
29410
|
+
if (tokenString) {
|
|
29411
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
29412
|
+
}
|
|
29413
|
+
}
|
|
29414
|
+
let urlPath = `/Entities/SearchFolderEntities`;
|
|
29415
|
+
const response = await this.request({
|
|
29416
|
+
path: urlPath,
|
|
29417
|
+
method: "GET",
|
|
29418
|
+
headers: headerParameters,
|
|
29419
|
+
query: queryParameters
|
|
29420
|
+
}, initOverrides);
|
|
29421
|
+
return new JSONApiResponse(response, (jsonValue) => FolderEntityModelCursorPaginationResultFromJSON(jsonValue));
|
|
29422
|
+
}
|
|
29423
|
+
async entitiesSearchFolderEntities(requestParameters, initOverrides) {
|
|
29424
|
+
const response = await this.entitiesSearchFolderEntitiesRaw(requestParameters, initOverrides);
|
|
29425
|
+
return await response.value();
|
|
29426
|
+
}
|
|
29427
|
+
}
|
|
29428
|
+
|
|
29429
|
+
// ../resourcecatalog-sdk/generated/src/apis/TagsApi.ts
|
|
29430
|
+
class TagsApi extends BaseAPI {
|
|
28767
29431
|
async tagsBulkDeleteRaw(requestParameters, initOverrides) {
|
|
28768
29432
|
if (requestParameters["xUiPathInternalAccountId"] == null) {
|
|
28769
29433
|
throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsBulkDelete().');
|
|
@@ -29382,7 +30046,9 @@ var DEFAULT_SCOPES = [
|
|
|
29382
30046
|
"AutomationSolutions",
|
|
29383
30047
|
"StudioWebTypeCacheService",
|
|
29384
30048
|
"Docs.GPT.Search",
|
|
29385
|
-
"Insights"
|
|
30049
|
+
"Insights",
|
|
30050
|
+
"ReferenceToken",
|
|
30051
|
+
"Audit.Read"
|
|
29386
30052
|
];
|
|
29387
30053
|
var normalizeAndValidateBaseUrl = (rawUrl) => {
|
|
29388
30054
|
let baseUrl = rawUrl;
|
|
@@ -29521,6 +30187,7 @@ var getTokenExpiration = (accessToken) => {
|
|
|
29521
30187
|
|
|
29522
30188
|
// ../../auth/src/envAuth.ts
|
|
29523
30189
|
var ENV_AUTH_ENABLE_VAR = "UIPATH_CLI_ENABLE_ENV_AUTH";
|
|
30190
|
+
var ENFORCE_ROBOT_AUTH_VAR = "UIPATH_CLI_ENFORCE_ROBOT_AUTH";
|
|
29524
30191
|
var ENV_AUTH_VARS = {
|
|
29525
30192
|
token: "UIPATH_CLI_AUTH_TOKEN",
|
|
29526
30193
|
organizationName: "UIPATH_CLI_ORGANIZATION_NAME",
|
|
@@ -29536,6 +30203,7 @@ class EnvAuthConfigError extends Error {
|
|
|
29536
30203
|
}
|
|
29537
30204
|
}
|
|
29538
30205
|
var isEnvAuthEnabled = () => process.env[ENV_AUTH_ENABLE_VAR] === "true";
|
|
30206
|
+
var isRobotAuthEnforced = () => process.env[ENFORCE_ROBOT_AUTH_VAR] === "true";
|
|
29539
30207
|
var requireEnv = (name) => {
|
|
29540
30208
|
const value = process.env[name];
|
|
29541
30209
|
if (!value) {
|
|
@@ -29577,7 +30245,9 @@ var readAuthFromEnv = () => {
|
|
|
29577
30245
|
expiration
|
|
29578
30246
|
};
|
|
29579
30247
|
};
|
|
30248
|
+
|
|
29580
30249
|
// ../../auth/src/robotClientFallback.ts
|
|
30250
|
+
init_src();
|
|
29581
30251
|
var DEFAULT_TIMEOUT_MS = 1000;
|
|
29582
30252
|
var CLOSE_TIMEOUT_MS = 500;
|
|
29583
30253
|
var NOTICE_SENTINEL = Symbol.for("@uipath/auth/robotFallbackNoticePrinted");
|
|
@@ -29589,6 +30259,35 @@ var printNoticeOnce = () => {
|
|
|
29589
30259
|
catchError2(() => process.stderr.write(`Using UiPath Robot credentials. Run 'uip login' for a dedicated session.
|
|
29590
30260
|
`));
|
|
29591
30261
|
};
|
|
30262
|
+
var ROBOT_USER_SERVICES_PIPE = "UiPathUserServices";
|
|
30263
|
+
var ROBOT_USER_SERVICES_ALTERNATE_PIPE = `${ROBOT_USER_SERVICES_PIPE}Alternate`;
|
|
30264
|
+
var PIPE_NAME_MAX_LENGTH = 103;
|
|
30265
|
+
var getRobotIpcPipeNames = async () => {
|
|
30266
|
+
const fs7 = getFileSystem();
|
|
30267
|
+
const username = fs7.env.getenv("USER") ?? fs7.env.getenv("USERNAME");
|
|
30268
|
+
if (!username) {
|
|
30269
|
+
throw new Error("Unable to determine current username");
|
|
30270
|
+
}
|
|
30271
|
+
const tempPath = fs7.env.getenv("TMPDIR") ?? "/tmp/";
|
|
30272
|
+
return [ROBOT_USER_SERVICES_PIPE, ROBOT_USER_SERVICES_ALTERNATE_PIPE].map((baseName) => fs7.path.join(tempPath, `${baseName}_${username}`).substring(0, PIPE_NAME_MAX_LENGTH));
|
|
30273
|
+
};
|
|
30274
|
+
var defaultIsRobotIpcAvailable = async () => {
|
|
30275
|
+
if (process.platform === "win32") {
|
|
30276
|
+
return true;
|
|
30277
|
+
}
|
|
30278
|
+
const [pipeNamesError, pipeNames] = await catchError2(getRobotIpcPipeNames());
|
|
30279
|
+
if (pipeNamesError || !pipeNames) {
|
|
30280
|
+
return false;
|
|
30281
|
+
}
|
|
30282
|
+
const fs7 = getFileSystem();
|
|
30283
|
+
for (const pipeName of pipeNames) {
|
|
30284
|
+
const [existsError, exists] = await catchError2(fs7.exists(pipeName));
|
|
30285
|
+
if (!existsError && exists === true) {
|
|
30286
|
+
return true;
|
|
30287
|
+
}
|
|
30288
|
+
}
|
|
30289
|
+
return false;
|
|
30290
|
+
};
|
|
29592
30291
|
var withTimeout = (promise, timeoutMs) => new Promise((resolve2, reject) => {
|
|
29593
30292
|
const timer = setTimeout(() => reject(new Error(`Robot IPC call timed out after ${timeoutMs}ms`)), timeoutMs);
|
|
29594
30293
|
promise.then((value) => {
|
|
@@ -29620,14 +30319,20 @@ var defaultLoadModule = async () => {
|
|
|
29620
30319
|
var tryRobotClientFallback = async (options = {}) => {
|
|
29621
30320
|
if (isBrowser())
|
|
29622
30321
|
return;
|
|
29623
|
-
if (
|
|
29624
|
-
|
|
29625
|
-
|
|
29626
|
-
|
|
29627
|
-
|
|
30322
|
+
if (!options.force) {
|
|
30323
|
+
if (process.env.CI || process.env.GITHUB_ACTIONS) {
|
|
30324
|
+
return;
|
|
30325
|
+
}
|
|
30326
|
+
if (process.env.UIPATH_URL) {
|
|
30327
|
+
return;
|
|
30328
|
+
}
|
|
29628
30329
|
}
|
|
29629
30330
|
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
30331
|
+
const isRobotIpcAvailable = options.isRobotIpcAvailable ?? defaultIsRobotIpcAvailable;
|
|
29630
30332
|
const loadModule = options.loadModule ?? defaultLoadModule;
|
|
30333
|
+
if (!await isRobotIpcAvailable()) {
|
|
30334
|
+
return;
|
|
30335
|
+
}
|
|
29631
30336
|
const mod2 = await loadModule();
|
|
29632
30337
|
if (!mod2)
|
|
29633
30338
|
return;
|
|
@@ -29895,10 +30600,6 @@ function normalizeTokenRefreshUnavailableFailure() {
|
|
|
29895
30600
|
return "token refresh failed before authentication completed";
|
|
29896
30601
|
}
|
|
29897
30602
|
var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
|
|
29898
|
-
if (isEnvAuthEnabled()) {
|
|
29899
|
-
return readAuthFromEnv();
|
|
29900
|
-
}
|
|
29901
|
-
const { envFilePath = DEFAULT_ENV_FILENAME, ensureTokenValidityMinutes } = options;
|
|
29902
30603
|
const {
|
|
29903
30604
|
resolveEnvFilePath = resolveEnvFilePathAsync,
|
|
29904
30605
|
loadEnvFile = loadEnvFileAsync,
|
|
@@ -29908,6 +30609,34 @@ var getLoginStatusWithDeps = async (options = {}, deps = {}) => {
|
|
|
29908
30609
|
resolveConfig = resolveConfigAsync,
|
|
29909
30610
|
robotFallback = tryRobotClientFallback
|
|
29910
30611
|
} = deps;
|
|
30612
|
+
if (isRobotAuthEnforced()) {
|
|
30613
|
+
if (isEnvAuthEnabled()) {
|
|
30614
|
+
throw new EnvAuthConfigError(`${ENV_AUTH_ENABLE_VAR}=true and ${ENFORCE_ROBOT_AUTH_VAR}=true ` + `are mutually exclusive. Unset one of them and re-run.`);
|
|
30615
|
+
}
|
|
30616
|
+
const robotCreds = await robotFallback({ force: true });
|
|
30617
|
+
if (!robotCreds) {
|
|
30618
|
+
return {
|
|
30619
|
+
loginStatus: "Not logged in",
|
|
30620
|
+
hint: `${ENFORCE_ROBOT_AUTH_VAR}=true but the UiPath Robot ` + `session is unavailable. Start and sign in to the Assistant, ` + `or unset ${ENFORCE_ROBOT_AUTH_VAR} to fall back to file or ` + `env-var authentication.`
|
|
30621
|
+
};
|
|
30622
|
+
}
|
|
30623
|
+
const expiration2 = getTokenExpiration(robotCreds.accessToken);
|
|
30624
|
+
return {
|
|
30625
|
+
loginStatus: "Logged in",
|
|
30626
|
+
accessToken: robotCreds.accessToken,
|
|
30627
|
+
baseUrl: robotCreds.baseUrl,
|
|
30628
|
+
organizationName: robotCreds.organizationName,
|
|
30629
|
+
organizationId: robotCreds.organizationId,
|
|
30630
|
+
tenantName: robotCreds.tenantName,
|
|
30631
|
+
tenantId: robotCreds.tenantId,
|
|
30632
|
+
expiration: expiration2,
|
|
30633
|
+
source: "robot" /* Robot */
|
|
30634
|
+
};
|
|
30635
|
+
}
|
|
30636
|
+
if (isEnvAuthEnabled()) {
|
|
30637
|
+
return readAuthFromEnv();
|
|
30638
|
+
}
|
|
30639
|
+
const { envFilePath = DEFAULT_ENV_FILENAME, ensureTokenValidityMinutes } = options;
|
|
29911
30640
|
const { absolutePath } = await resolveEnvFilePath(envFilePath);
|
|
29912
30641
|
if (absolutePath === undefined) {
|
|
29913
30642
|
const robotCreds = await robotFallback();
|
|
@@ -30071,7 +30800,7 @@ async function resolveConfig(options) {
|
|
|
30071
30800
|
}
|
|
30072
30801
|
const tenant = options?.tenantName ?? status.tenantName;
|
|
30073
30802
|
if (!tenant) {
|
|
30074
|
-
throw new Error("Tenant not available.
|
|
30803
|
+
throw new Error("Tenant not available. Run 'uip login' to select a tenant, or use 'uip login tenant set <tenant>' to switch tenants.");
|
|
30075
30804
|
}
|
|
30076
30805
|
const basePath = `${status.baseUrl}/${status.organizationId}/${tenant}/resourcecatalog_`;
|
|
30077
30806
|
const bearerToken = options?.s2sToken ?? status.accessToken;
|
|
@@ -30092,8 +30821,112 @@ async function createApiClient(ApiClass, options) {
|
|
|
30092
30821
|
tenantName
|
|
30093
30822
|
};
|
|
30094
30823
|
}
|
|
30824
|
+
// src/commands/search.ts
|
|
30825
|
+
var LOGIN_INSTRUCTIONS = "Ensure you are logged in with 'uip login' and have access to the Resource Catalog service.";
|
|
30826
|
+
var SEARCH_EXAMPLES = [
|
|
30827
|
+
{
|
|
30828
|
+
Description: "Search RCS Process entities by entitySubType (matches the Orchestrator UI Add-Tool picker)",
|
|
30829
|
+
Command: "uip admin rcs search --entity-type Process --entity-sub-type ProcessOrchestration --limit 8",
|
|
30830
|
+
Output: {
|
|
30831
|
+
Code: "RcsSearch",
|
|
30832
|
+
Data: {
|
|
30833
|
+
items: [
|
|
30834
|
+
{
|
|
30835
|
+
entityKey: "entity-guid",
|
|
30836
|
+
name: "Sample Orchestrator",
|
|
30837
|
+
entityType: "Process",
|
|
30838
|
+
entitySubType: "ProcessOrchestration"
|
|
30839
|
+
}
|
|
30840
|
+
],
|
|
30841
|
+
count: 1
|
|
30842
|
+
}
|
|
30843
|
+
}
|
|
30844
|
+
},
|
|
30845
|
+
{
|
|
30846
|
+
Description: "Search across one folder by key",
|
|
30847
|
+
Command: "uip admin rcs search --entity-type Process --folder-key 11111111-1111-1111-1111-111111111111",
|
|
30848
|
+
Output: {
|
|
30849
|
+
Code: "RcsSearch",
|
|
30850
|
+
Data: { items: [], count: 0 }
|
|
30851
|
+
}
|
|
30852
|
+
}
|
|
30853
|
+
];
|
|
30854
|
+
var registerSearchCommands = (rcs) => {
|
|
30855
|
+
rcs.command("search").description([
|
|
30856
|
+
"Search Resource Catalog entities (RCS GET /Entities/Search).",
|
|
30857
|
+
"",
|
|
30858
|
+
"Filters: --entity-type, --entity-sub-type (each repeatable),",
|
|
30859
|
+
"--name (substring on entity name), --folder-key/--folder-path",
|
|
30860
|
+
"(sent as X-UIPATH-FolderKey/X-UIPATH-FolderPath headers).",
|
|
30861
|
+
"",
|
|
30862
|
+
"Returns the standard paging envelope {items, total, count, next}."
|
|
30863
|
+
].join(`
|
|
30864
|
+
`)).addOption(createHiddenDeprecatedTenantOption("--tenant <name>")).option("--entity-type <value>", "RCS entityTypes filter entry. Repeat to pass multiple values (e.g. --entity-type Process).", (value, previous = []) => [...previous, value]).option("--entity-sub-type <value>", "RCS entitySubType filter entry. Repeat to pass multiple values (e.g. --entity-sub-type ProcessOrchestration).", (value, previous = []) => [...previous, value]).option("--name <text>", "Substring filter on entity name (RCS `name` query param).").option("--folder-key <guid>", "Folder GUID to scope the call (sets X-UIPATH-FolderKey).").option("--folder-path <path>", "Folder path to scope the call (sets X-UIPATH-FolderPath).").option("--limit <n>", `Page size. Maps to RCS take. Defaults to ${DEFAULT_PAGE_SIZE}.`, (v) => Number.parseInt(v, 10)).option("--offset <n>", "Row offset. Maps to RCS skip. Defaults to 0.", (v) => Number.parseInt(v, 10)).addOption(new Option("--skip <n>").hideHelp().argParser((v) => Number.parseInt(v, 10))).option("--login-validity <minutes>", "Override the interactive-login token lifetime for this call. Rarely needed.", (v) => Number.parseInt(v, 10)).examples(SEARCH_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
30865
|
+
const offset = resolveDeprecatedOptionAlias({
|
|
30866
|
+
preferredValue: options.offset,
|
|
30867
|
+
deprecatedValue: options.skip,
|
|
30868
|
+
preferredFlag: "--offset",
|
|
30869
|
+
deprecatedFlag: "--skip"
|
|
30870
|
+
});
|
|
30871
|
+
if (offset.error) {
|
|
30872
|
+
OutputFormatter.error({
|
|
30873
|
+
Result: RESULTS.Failure,
|
|
30874
|
+
Message: offset.error.message,
|
|
30875
|
+
Instructions: offset.error.instructions
|
|
30876
|
+
});
|
|
30877
|
+
processContext.exit(1);
|
|
30878
|
+
return;
|
|
30879
|
+
}
|
|
30880
|
+
if (offset.usedDeprecated) {
|
|
30881
|
+
warnDeprecatedOptionAlias("--skip", "--offset");
|
|
30882
|
+
}
|
|
30883
|
+
const resolvedOffset = offset.value ?? 0;
|
|
30884
|
+
const resolvedLimit = options.limit ?? DEFAULT_PAGE_SIZE;
|
|
30885
|
+
const [error, result] = await catchError((async () => {
|
|
30886
|
+
const { api, organizationId } = await createApiClient(EntitiesApi, {
|
|
30887
|
+
loginValidity: options.loginValidity,
|
|
30888
|
+
tenantName: options.tenant
|
|
30889
|
+
});
|
|
30890
|
+
return await api.entitiesSearch({
|
|
30891
|
+
xUiPathInternalAccountId: organizationId,
|
|
30892
|
+
name: options.name,
|
|
30893
|
+
skip: resolvedOffset,
|
|
30894
|
+
take: resolvedLimit,
|
|
30895
|
+
entityTypes: options.entityType,
|
|
30896
|
+
entitySubType: options.entitySubType,
|
|
30897
|
+
xUIPATHFolderKey: options.folderKey,
|
|
30898
|
+
xUIPATHFolderPath: options.folderPath
|
|
30899
|
+
});
|
|
30900
|
+
})());
|
|
30901
|
+
if (error) {
|
|
30902
|
+
OutputFormatter.error({
|
|
30903
|
+
Result: RESULTS.Failure,
|
|
30904
|
+
Message: await extractErrorMessage(error),
|
|
30905
|
+
Instructions: LOGIN_INSTRUCTIONS
|
|
30906
|
+
});
|
|
30907
|
+
processContext.exit(1);
|
|
30908
|
+
return;
|
|
30909
|
+
}
|
|
30910
|
+
const items = result?.value ?? [];
|
|
30911
|
+
const total = result?.count;
|
|
30912
|
+
const count = items.length;
|
|
30913
|
+
const nextSkip = resolvedOffset + count;
|
|
30914
|
+
const next = typeof total === "number" && nextSkip < total ? { skip: nextSkip, take: resolvedLimit } : undefined;
|
|
30915
|
+
OutputFormatter.success({
|
|
30916
|
+
Result: RESULTS.Success,
|
|
30917
|
+
Code: "RcsSearch",
|
|
30918
|
+
Data: {
|
|
30919
|
+
items,
|
|
30920
|
+
total,
|
|
30921
|
+
count,
|
|
30922
|
+
...next ? { next } : {}
|
|
30923
|
+
}
|
|
30924
|
+
});
|
|
30925
|
+
});
|
|
30926
|
+
};
|
|
30927
|
+
|
|
30095
30928
|
// src/commands/tag.ts
|
|
30096
|
-
var
|
|
30929
|
+
var LOGIN_INSTRUCTIONS2 = "Ensure you are logged in with 'uip login' and have access to the Resource Catalog service. If you see 'Invalid scope(s)', re-run 'uip login' to pick up the RCS.Tags scope.";
|
|
30097
30930
|
var LIST_EXAMPLES = [
|
|
30098
30931
|
{
|
|
30099
30932
|
Description: "List all Label tags for the current tenant",
|
|
@@ -30135,11 +30968,29 @@ var registerTagCommands = (rcs) => {
|
|
|
30135
30968
|
"List tags for a tenant in the current organization.",
|
|
30136
30969
|
"",
|
|
30137
30970
|
"By default returns TagType.Label tags for the tenant in your login context.",
|
|
30138
|
-
"
|
|
30971
|
+
"Use 'uip login tenant set <tenant>' to target a different tenant in the same organization",
|
|
30139
30972
|
"(your account must have RCS access to that tenant). Use --type KeyValue",
|
|
30140
30973
|
"for key/value tags, or --starts-with to filter by name prefix."
|
|
30141
30974
|
].join(`
|
|
30142
|
-
`)).
|
|
30975
|
+
`)).addOption(createHiddenDeprecatedTenantOption("--tenant <name>")).option("--type <type>", "Tag type to list: 'Label' (default) or 'KeyValue'. Case-sensitive.", "Label").option("--starts-with <prefix>", "Return only tags whose normalized name starts with this prefix (case-insensitive).").option("--limit <n>", "Page size — how many tags to return in one call. Defaults to 100.", (v) => Number.parseInt(v, 10), 100).option("--offset <n>", "Row offset into the result set. Defaults to 0.", (v) => Number.parseInt(v, 10)).addOption(new Option("--skip <n>").hideHelp().argParser((v) => Number.parseInt(v, 10))).option("--login-validity <minutes>", "Override the interactive-login token lifetime for this call. Rarely needed.", (v) => Number.parseInt(v, 10)).examples(LIST_EXAMPLES).trackedAction(processContext, async (options) => {
|
|
30976
|
+
const offset = resolveDeprecatedOptionAlias({
|
|
30977
|
+
preferredValue: options.offset,
|
|
30978
|
+
deprecatedValue: options.skip,
|
|
30979
|
+
preferredFlag: "--offset",
|
|
30980
|
+
deprecatedFlag: "--skip"
|
|
30981
|
+
});
|
|
30982
|
+
if (offset.error) {
|
|
30983
|
+
OutputFormatter.error({
|
|
30984
|
+
Result: RESULTS.Failure,
|
|
30985
|
+
Message: offset.error.message,
|
|
30986
|
+
Instructions: offset.error.instructions
|
|
30987
|
+
});
|
|
30988
|
+
processContext.exit(1);
|
|
30989
|
+
return;
|
|
30990
|
+
}
|
|
30991
|
+
if (offset.usedDeprecated) {
|
|
30992
|
+
warnDeprecatedOptionAlias("--skip", "--offset");
|
|
30993
|
+
}
|
|
30143
30994
|
const [error, result] = await catchError((async () => {
|
|
30144
30995
|
if (options.type !== TagType.Label && options.type !== TagType.KeyValue) {
|
|
30145
30996
|
throw new Error(`Invalid --type '${options.type}'. Use 'Label' or 'KeyValue'.`);
|
|
@@ -30153,14 +31004,14 @@ var registerTagCommands = (rcs) => {
|
|
|
30153
31004
|
type: options.type,
|
|
30154
31005
|
startsWith: options.startsWith,
|
|
30155
31006
|
take: options.limit,
|
|
30156
|
-
skip:
|
|
31007
|
+
skip: offset.value ?? 0
|
|
30157
31008
|
});
|
|
30158
31009
|
})());
|
|
30159
31010
|
if (error) {
|
|
30160
31011
|
OutputFormatter.error({
|
|
30161
31012
|
Result: RESULTS.Failure,
|
|
30162
31013
|
Message: await extractErrorMessage(error),
|
|
30163
|
-
Instructions:
|
|
31014
|
+
Instructions: LOGIN_INSTRUCTIONS2
|
|
30164
31015
|
});
|
|
30165
31016
|
processContext.exit(1);
|
|
30166
31017
|
return;
|
|
@@ -30179,9 +31030,11 @@ var registerRcsCommand = (program2) => {
|
|
|
30179
31030
|
"Manage UiPath Resource Catalog Service resources.",
|
|
30180
31031
|
"",
|
|
30181
31032
|
"Subcommand groups:",
|
|
31033
|
+
" search — search tenant- or folder-scoped RCS entities.",
|
|
30182
31034
|
" tag — list tenant-scoped tags."
|
|
30183
31035
|
].join(`
|
|
30184
31036
|
`));
|
|
31037
|
+
registerSearchCommands(rcs);
|
|
30185
31038
|
registerTagCommands(rcs);
|
|
30186
31039
|
};
|
|
30187
31040
|
|