@uipath/admin-tool 1.203.0-preview.203 → 1.204.0-preview.206

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.
@@ -0,0 +1,1977 @@
1
+ import {
2
+ getLoginStatusAsync
3
+ } from "./tool-016jy57n.js";
4
+ import {
5
+ DEFAULT_PAGE_SIZE,
6
+ Option,
7
+ OutputFormatter,
8
+ RESULTS,
9
+ addSdkUserAgentHeader,
10
+ catchError,
11
+ createHiddenDeprecatedTenantOption,
12
+ extractErrorMessage,
13
+ getSdkUserAgentToken,
14
+ installSdkUserAgentHeader,
15
+ processContext,
16
+ resolveDeprecatedOptionAlias,
17
+ warnDeprecatedOptionAlias
18
+ } from "./tool-v13kh7v7.js";
19
+ import"./tool-1yh8g550.js";
20
+ // ../resourcecatalog-tool/package.json
21
+ var package_default = {
22
+ name: "@uipath/resourcecatalog-tool",
23
+ author: "UiPath",
24
+ license: "SEE LICENSE IN LICENSE.txt",
25
+ version: "1.204.0-preview.206",
26
+ description: "CLI plugin for the UiPath Resource Catalog Service.",
27
+ private: false,
28
+ repository: {
29
+ type: "git",
30
+ url: "https://github.com/UiPath/cli.git",
31
+ directory: "packages/admin/resourcecatalog-tool"
32
+ },
33
+ publishConfig: {
34
+ registry: "https://npm.pkg.github.com/@uipath"
35
+ },
36
+ keywords: [
37
+ "cli-tool"
38
+ ],
39
+ type: "module",
40
+ main: "./dist/tool.js",
41
+ exports: {
42
+ ".": "./dist/tool.js"
43
+ },
44
+ bin: {
45
+ "resourcecatalog-tool": "./dist/index.js"
46
+ },
47
+ files: [
48
+ "dist"
49
+ ],
50
+ scripts: {
51
+ build: "bun ../../../tools/build-tool.ts",
52
+ typecheck: "tsc --noEmit",
53
+ package: "bun run build && bun pm pack",
54
+ lint: "biome check .",
55
+ "lint:fix": "biome check --write .",
56
+ test: "vitest run",
57
+ "test:coverage": "vitest run --coverage"
58
+ },
59
+ devDependencies: {
60
+ "@types/bun": "^1.3.11",
61
+ "@uipath/common": "workspace:*",
62
+ "@uipath/resourcecatalog-sdk": "workspace:*",
63
+ commander: "^14.0.3",
64
+ typescript: "^7.0.2"
65
+ }
66
+ };
67
+
68
+ // ../resourcecatalog-sdk/generated/src/runtime.ts
69
+ var BASE_PATH = "http://localhost".replace(/\/+$/, "");
70
+
71
+ class Configuration {
72
+ configuration;
73
+ constructor(configuration = {}) {
74
+ this.configuration = configuration;
75
+ }
76
+ set config(configuration) {
77
+ this.configuration = configuration;
78
+ }
79
+ get basePath() {
80
+ return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
81
+ }
82
+ get fetchApi() {
83
+ return this.configuration.fetchApi;
84
+ }
85
+ get middleware() {
86
+ return this.configuration.middleware || [];
87
+ }
88
+ get queryParamsStringify() {
89
+ return this.configuration.queryParamsStringify || querystring;
90
+ }
91
+ get username() {
92
+ return this.configuration.username;
93
+ }
94
+ get password() {
95
+ return this.configuration.password;
96
+ }
97
+ get apiKey() {
98
+ const apiKey = this.configuration.apiKey;
99
+ if (apiKey) {
100
+ return typeof apiKey === "function" ? apiKey : () => apiKey;
101
+ }
102
+ return;
103
+ }
104
+ get accessToken() {
105
+ const accessToken = this.configuration.accessToken;
106
+ if (accessToken) {
107
+ return typeof accessToken === "function" ? accessToken : async () => accessToken;
108
+ }
109
+ return;
110
+ }
111
+ get headers() {
112
+ return this.configuration.headers;
113
+ }
114
+ get credentials() {
115
+ return this.configuration.credentials;
116
+ }
117
+ }
118
+ var DefaultConfig = new Configuration;
119
+
120
+ class BaseAPI {
121
+ configuration;
122
+ static jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i");
123
+ middleware;
124
+ constructor(configuration = DefaultConfig) {
125
+ this.configuration = configuration;
126
+ this.middleware = configuration.middleware;
127
+ }
128
+ withMiddleware(...middlewares) {
129
+ const next = this.clone();
130
+ next.middleware = next.middleware.concat(...middlewares);
131
+ return next;
132
+ }
133
+ withPreMiddleware(...preMiddlewares) {
134
+ const middlewares = preMiddlewares.map((pre) => ({ pre }));
135
+ return this.withMiddleware(...middlewares);
136
+ }
137
+ withPostMiddleware(...postMiddlewares) {
138
+ const middlewares = postMiddlewares.map((post) => ({ post }));
139
+ return this.withMiddleware(...middlewares);
140
+ }
141
+ isJsonMime(mime) {
142
+ if (!mime) {
143
+ return false;
144
+ }
145
+ return BaseAPI.jsonRegex.test(mime);
146
+ }
147
+ async request(context, initOverrides) {
148
+ const { url, init } = await this.createFetchParams(context, initOverrides);
149
+ const response = await this.fetchApi(url, init);
150
+ if (response && (response.status >= 200 && response.status < 300)) {
151
+ return response;
152
+ }
153
+ throw new ResponseError(response, "Response returned an error code");
154
+ }
155
+ async createFetchParams(context, initOverrides) {
156
+ let url = this.configuration.basePath + context.path;
157
+ if (context.query !== undefined && Object.keys(context.query).length !== 0) {
158
+ url += "?" + this.configuration.queryParamsStringify(context.query);
159
+ }
160
+ const headers = Object.assign({}, this.configuration.headers, context.headers);
161
+ Object.keys(headers).forEach((key) => headers[key] === undefined ? delete headers[key] : {});
162
+ const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
163
+ const initParams = {
164
+ method: context.method,
165
+ headers,
166
+ body: context.body,
167
+ credentials: this.configuration.credentials
168
+ };
169
+ const overriddenInit = {
170
+ ...initParams,
171
+ ...await initOverrideFn({
172
+ init: initParams,
173
+ context
174
+ })
175
+ };
176
+ let body;
177
+ if (isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob(overriddenInit.body)) {
178
+ body = overriddenInit.body;
179
+ } else if (this.isJsonMime(headers["Content-Type"])) {
180
+ body = JSON.stringify(overriddenInit.body);
181
+ } else {
182
+ body = overriddenInit.body;
183
+ }
184
+ const init = {
185
+ ...overriddenInit,
186
+ body
187
+ };
188
+ return { url, init };
189
+ }
190
+ fetchApi = async (url, init) => {
191
+ let fetchParams = { url, init };
192
+ for (const middleware of this.middleware) {
193
+ if (middleware.pre) {
194
+ fetchParams = await middleware.pre({
195
+ fetch: this.fetchApi,
196
+ ...fetchParams
197
+ }) || fetchParams;
198
+ }
199
+ }
200
+ let response = undefined;
201
+ try {
202
+ response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
203
+ } catch (e) {
204
+ for (const middleware of this.middleware) {
205
+ if (middleware.onError) {
206
+ response = await middleware.onError({
207
+ fetch: this.fetchApi,
208
+ url: fetchParams.url,
209
+ init: fetchParams.init,
210
+ error: e,
211
+ response: response ? response.clone() : undefined
212
+ }) || response;
213
+ }
214
+ }
215
+ if (response === undefined) {
216
+ if (e instanceof Error) {
217
+ throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
218
+ } else {
219
+ throw e;
220
+ }
221
+ }
222
+ }
223
+ for (const middleware of this.middleware) {
224
+ if (middleware.post) {
225
+ response = await middleware.post({
226
+ fetch: this.fetchApi,
227
+ url: fetchParams.url,
228
+ init: fetchParams.init,
229
+ response: response.clone()
230
+ }) || response;
231
+ }
232
+ }
233
+ return response;
234
+ };
235
+ clone() {
236
+ const constructor = this.constructor;
237
+ const next = new constructor(this.configuration);
238
+ next.middleware = this.middleware.slice();
239
+ return next;
240
+ }
241
+ }
242
+ function isBlob(value) {
243
+ return typeof Blob !== "undefined" && value instanceof Blob;
244
+ }
245
+ function isFormData(value) {
246
+ return typeof FormData !== "undefined" && value instanceof FormData;
247
+ }
248
+
249
+ class ResponseError extends Error {
250
+ response;
251
+ name = "ResponseError";
252
+ constructor(response, msg) {
253
+ super(msg);
254
+ this.response = response;
255
+ }
256
+ }
257
+
258
+ class FetchError extends Error {
259
+ cause;
260
+ name = "FetchError";
261
+ constructor(cause, msg) {
262
+ super(msg);
263
+ this.cause = cause;
264
+ }
265
+ }
266
+
267
+ class RequiredError extends Error {
268
+ field;
269
+ name = "RequiredError";
270
+ constructor(field, msg) {
271
+ super(msg);
272
+ this.field = field;
273
+ }
274
+ }
275
+ function querystring(params, prefix = "") {
276
+ return Object.keys(params).map((key) => querystringSingleKey(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
277
+ }
278
+ function querystringSingleKey(key, value, keyPrefix = "") {
279
+ const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
280
+ if (value instanceof Array) {
281
+ const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
282
+ return `${encodeURIComponent(fullKey)}=${multiValue}`;
283
+ }
284
+ if (value instanceof Set) {
285
+ const valueAsArray = Array.from(value);
286
+ return querystringSingleKey(key, valueAsArray, keyPrefix);
287
+ }
288
+ if (value instanceof Date) {
289
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
290
+ }
291
+ if (value instanceof Object) {
292
+ return querystring(value, fullKey);
293
+ }
294
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
295
+ }
296
+ class JSONApiResponse {
297
+ raw;
298
+ transformer;
299
+ constructor(raw, transformer = (jsonValue) => jsonValue) {
300
+ this.raw = raw;
301
+ this.transformer = transformer;
302
+ }
303
+ async value() {
304
+ return this.transformer(await this.raw.json());
305
+ }
306
+ }
307
+
308
+ class VoidApiResponse {
309
+ raw;
310
+ constructor(raw) {
311
+ this.raw = raw;
312
+ }
313
+ async value() {
314
+ return;
315
+ }
316
+ }
317
+ // ../resourcecatalog-sdk/package.json
318
+ var package_default2 = {
319
+ name: "@uipath/resourcecatalog-sdk",
320
+ author: "UiPath",
321
+ license: "SEE LICENSE IN LICENSE.txt",
322
+ version: "1.204.0",
323
+ description: "SDK for the UiPath Resource Catalog Service API.",
324
+ repository: {
325
+ type: "git",
326
+ url: "https://github.com/UiPath/cli.git",
327
+ directory: "packages/admin/resourcecatalog-sdk"
328
+ },
329
+ publishConfig: {
330
+ registry: "https://npm.pkg.github.com/@uipath"
331
+ },
332
+ keywords: [
333
+ "uipath",
334
+ "resource-catalog",
335
+ "sdk"
336
+ ],
337
+ type: "module",
338
+ main: "./dist/index.js",
339
+ types: "./dist/src/index.d.ts",
340
+ exports: {
341
+ ".": {
342
+ types: "./dist/src/index.d.ts",
343
+ default: "./dist/index.js"
344
+ }
345
+ },
346
+ files: [
347
+ "dist"
348
+ ],
349
+ private: true,
350
+ scripts: {
351
+ build: "bun build ./src/index.ts --outdir dist --format esm --target node --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
352
+ typecheck: "tsc --noEmit",
353
+ generate: "bun run src/scripts/generate-sdk.ts",
354
+ lint: "biome check ."
355
+ },
356
+ devDependencies: {
357
+ "@openapitools/openapi-generator-cli": "^2.31.1",
358
+ "@types/node": "^25.5.2",
359
+ "@uipath/auth": "workspace:*",
360
+ "@uipath/common": "workspace:*",
361
+ "@uipath/filesystem": "workspace:*",
362
+ typescript: "^7.0.2"
363
+ }
364
+ };
365
+
366
+ // ../resourcecatalog-sdk/src/user-agent.ts
367
+ var SDK_USER_AGENT = getSdkUserAgentToken(package_default2);
368
+ installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
369
+
370
+ // ../resourcecatalog-sdk/generated/src/models/EntitySearchState.ts
371
+ function EntitySearchStateFromJSON(json) {
372
+ return EntitySearchStateFromJSONTyped(json, false);
373
+ }
374
+ function EntitySearchStateFromJSONTyped(json, ignoreDiscriminator) {
375
+ return json;
376
+ }
377
+
378
+ // ../resourcecatalog-sdk/generated/src/models/TagType.ts
379
+ var TagType = {
380
+ Label: "Label",
381
+ KeyValue: "KeyValue"
382
+ };
383
+ function TagTypeFromJSON(json) {
384
+ return TagTypeFromJSONTyped(json, false);
385
+ }
386
+ function TagTypeFromJSONTyped(json, ignoreDiscriminator) {
387
+ return json;
388
+ }
389
+ function TagTypeToJSON(value) {
390
+ return value;
391
+ }
392
+
393
+ // ../resourcecatalog-sdk/generated/src/models/TagModel.ts
394
+ function TagModelFromJSON(json) {
395
+ return TagModelFromJSONTyped(json, false);
396
+ }
397
+ function TagModelFromJSONTyped(json, ignoreDiscriminator) {
398
+ if (json == null) {
399
+ return json;
400
+ }
401
+ return {
402
+ key: json["key"] == null ? undefined : json["key"],
403
+ displayName: json["displayName"] == null ? undefined : json["displayName"],
404
+ name: json["name"] == null ? undefined : json["name"],
405
+ displayValue: json["displayValue"] == null ? undefined : json["displayValue"],
406
+ value: json["value"] == null ? undefined : json["value"],
407
+ type: json["type"] == null ? undefined : TagTypeFromJSON(json["type"]),
408
+ accountKey: json["accountKey"] == null ? undefined : json["accountKey"],
409
+ tenantKey: json["tenantKey"] == null ? undefined : json["tenantKey"],
410
+ userKey: json["userKey"] == null ? undefined : json["userKey"]
411
+ };
412
+ }
413
+
414
+ // ../resourcecatalog-sdk/generated/src/models/EntityScope.ts
415
+ function EntityScopeFromJSON(json) {
416
+ return EntityScopeFromJSONTyped(json, false);
417
+ }
418
+ function EntityScopeFromJSONTyped(json, ignoreDiscriminator) {
419
+ return json;
420
+ }
421
+
422
+ // ../resourcecatalog-sdk/generated/src/models/FolderType.ts
423
+ function FolderTypeFromJSON(json) {
424
+ return FolderTypeFromJSONTyped(json, false);
425
+ }
426
+ function FolderTypeFromJSONTyped(json, ignoreDiscriminator) {
427
+ return json;
428
+ }
429
+
430
+ // ../resourcecatalog-sdk/generated/src/models/FolderModel.ts
431
+ function FolderModelFromJSON(json) {
432
+ return FolderModelFromJSONTyped(json, false);
433
+ }
434
+ function FolderModelFromJSONTyped(json, ignoreDiscriminator) {
435
+ if (json == null) {
436
+ return json;
437
+ }
438
+ return {
439
+ id: json["id"] == null ? undefined : json["id"],
440
+ key: json["key"] == null ? undefined : json["key"],
441
+ displayName: json["displayName"] == null ? undefined : json["displayName"],
442
+ code: json["code"] == null ? undefined : json["code"],
443
+ fullyQualifiedName: json["fullyQualifiedName"] == null ? undefined : json["fullyQualifiedName"],
444
+ timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]),
445
+ tenantKey: json["tenantKey"] == null ? undefined : json["tenantKey"],
446
+ accountKey: json["accountKey"] == null ? undefined : json["accountKey"],
447
+ userKey: json["userKey"] == null ? undefined : json["userKey"],
448
+ type: json["type"] == null ? undefined : FolderTypeFromJSON(json["type"]),
449
+ path: json["path"] == null ? undefined : json["path"],
450
+ permissions: json["permissions"] == null ? undefined : json["permissions"]
451
+ };
452
+ }
453
+
454
+ // ../resourcecatalog-sdk/generated/src/models/EntityModel.ts
455
+ function EntityModelFromJSON(json) {
456
+ return EntityModelFromJSONTyped(json, false);
457
+ }
458
+ function EntityModelFromJSONTyped(json, ignoreDiscriminator) {
459
+ if (json == null) {
460
+ return json;
461
+ }
462
+ return {
463
+ entityKey: json["entityKey"] == null ? undefined : json["entityKey"],
464
+ name: json["name"] == null ? undefined : json["name"],
465
+ description: json["description"] == null ? undefined : json["description"],
466
+ entityType: json["entityType"] == null ? undefined : json["entityType"],
467
+ tags: json["tags"] == null ? undefined : json["tags"].map(TagModelFromJSON),
468
+ folders: json["folders"] == null ? undefined : json["folders"].map(FolderModelFromJSON),
469
+ linkedFoldersCount: json["linkedFoldersCount"] == null ? undefined : json["linkedFoldersCount"],
470
+ source: json["source"] == null ? undefined : json["source"],
471
+ scope: json["scope"] == null ? undefined : EntityScopeFromJSON(json["scope"]),
472
+ searchState: json["searchState"] == null ? undefined : EntitySearchStateFromJSON(json["searchState"]),
473
+ timestamp: json["timestamp"] == null ? undefined : new Date(json["timestamp"]),
474
+ folderKey: json["folderKey"] == null ? undefined : json["folderKey"],
475
+ folderKeys: json["folderKeys"] == null ? undefined : json["folderKeys"],
476
+ tenantKey: json["tenantKey"] == null ? undefined : json["tenantKey"],
477
+ accountKey: json["accountKey"] == null ? undefined : json["accountKey"],
478
+ userKey: json["userKey"] == null ? undefined : json["userKey"],
479
+ dependencies: json["dependencies"] == null ? undefined : json["dependencies"],
480
+ customData: json["customData"] == null ? undefined : json["customData"],
481
+ entitySubType: json["entitySubType"] == null ? undefined : json["entitySubType"]
482
+ };
483
+ }
484
+
485
+ // ../resourcecatalog-sdk/generated/src/models/EntityModelPaginationResult.ts
486
+ function EntityModelPaginationResultFromJSON(json) {
487
+ return EntityModelPaginationResultFromJSONTyped(json, false);
488
+ }
489
+ function EntityModelPaginationResultFromJSONTyped(json, ignoreDiscriminator) {
490
+ if (json == null) {
491
+ return json;
492
+ }
493
+ return {
494
+ count: json["count"] == null ? undefined : json["count"],
495
+ value: json["value"] == null ? undefined : json["value"].map(EntityModelFromJSON)
496
+ };
497
+ }
498
+
499
+ // ../resourcecatalog-sdk/generated/src/models/FolderDto.ts
500
+ function FolderDtoFromJSON(json) {
501
+ return FolderDtoFromJSONTyped(json, false);
502
+ }
503
+ function FolderDtoFromJSONTyped(json, ignoreDiscriminator) {
504
+ if (json == null) {
505
+ return json;
506
+ }
507
+ return {
508
+ key: json["key"] == null ? undefined : json["key"],
509
+ fullyQualifiedName: json["fullyQualifiedName"] == null ? undefined : json["fullyQualifiedName"],
510
+ isPersonal: json["isPersonal"] == null ? undefined : json["isPersonal"],
511
+ folderType: json["folderType"] == null ? undefined : FolderTypeFromJSON(json["folderType"])
512
+ };
513
+ }
514
+
515
+ // ../resourcecatalog-sdk/generated/src/models/FolderEntityModel.ts
516
+ function FolderEntityModelFromJSON(json) {
517
+ return FolderEntityModelFromJSONTyped(json, false);
518
+ }
519
+ function FolderEntityModelFromJSONTyped(json, ignoreDiscriminator) {
520
+ if (json == null) {
521
+ return json;
522
+ }
523
+ return {
524
+ folderKey: json["folderKey"] == null ? undefined : json["folderKey"],
525
+ folderName: json["folderName"] == null ? undefined : json["folderName"],
526
+ folderCode: json["folderCode"] == null ? undefined : json["folderCode"],
527
+ fullyQualifiedName: json["fullyQualifiedName"] == null ? undefined : json["fullyQualifiedName"],
528
+ folderType: json["folderType"] == null ? undefined : FolderTypeFromJSON(json["folderType"]),
529
+ folderPath: json["folderPath"] == null ? undefined : json["folderPath"],
530
+ entityKey: json["entityKey"] == null ? undefined : json["entityKey"],
531
+ entityName: json["entityName"] == null ? undefined : json["entityName"],
532
+ entityDescription: json["entityDescription"] == null ? undefined : json["entityDescription"],
533
+ entityType: json["entityType"] == null ? undefined : json["entityType"],
534
+ entitySubType: json["entitySubType"] == null ? undefined : json["entitySubType"],
535
+ entitySource: json["entitySource"] == null ? undefined : json["entitySource"]
536
+ };
537
+ }
538
+
539
+ // ../resourcecatalog-sdk/generated/src/models/FolderEntityModelCursorPaginationResult.ts
540
+ function FolderEntityModelCursorPaginationResultFromJSON(json) {
541
+ return FolderEntityModelCursorPaginationResultFromJSONTyped(json, false);
542
+ }
543
+ function FolderEntityModelCursorPaginationResultFromJSONTyped(json, ignoreDiscriminator) {
544
+ if (json == null) {
545
+ return json;
546
+ }
547
+ return {
548
+ items: json["items"] == null ? undefined : json["items"].map(FolderEntityModelFromJSON),
549
+ totalCount: json["totalCount"] == null ? undefined : json["totalCount"],
550
+ nextPage: json["nextPage"] == null ? undefined : json["nextPage"],
551
+ previousPage: json["previousPage"] == null ? undefined : json["previousPage"]
552
+ };
553
+ }
554
+
555
+ // ../resourcecatalog-sdk/generated/src/models/TagReferencesModel.ts
556
+ function TagReferencesModelFromJSON(json) {
557
+ return TagReferencesModelFromJSONTyped(json, false);
558
+ }
559
+ function TagReferencesModelFromJSONTyped(json, ignoreDiscriminator) {
560
+ if (json == null) {
561
+ return json;
562
+ }
563
+ return {
564
+ entityType: json["entityType"] == null ? undefined : json["entityType"],
565
+ count: json["count"] == null ? undefined : json["count"]
566
+ };
567
+ }
568
+ function TagReferencesModelToJSON(json) {
569
+ return TagReferencesModelToJSONTyped(json, false);
570
+ }
571
+ function TagReferencesModelToJSONTyped(value, ignoreDiscriminator = false) {
572
+ if (value == null) {
573
+ return value;
574
+ }
575
+ return {
576
+ entityType: value["entityType"],
577
+ count: value["count"]
578
+ };
579
+ }
580
+
581
+ // ../resourcecatalog-sdk/generated/src/models/TagDataType.ts
582
+ function TagDataTypeFromJSON(json) {
583
+ return TagDataTypeFromJSONTyped(json, false);
584
+ }
585
+ function TagDataTypeFromJSONTyped(json, ignoreDiscriminator) {
586
+ return json;
587
+ }
588
+ function TagDataTypeToJSON(value) {
589
+ return value;
590
+ }
591
+
592
+ // ../resourcecatalog-sdk/generated/src/models/LabelModel.ts
593
+ function LabelModelFromJSON(json) {
594
+ return LabelModelFromJSONTyped(json, false);
595
+ }
596
+ function LabelModelFromJSONTyped(json, ignoreDiscriminator) {
597
+ if (json == null) {
598
+ return json;
599
+ }
600
+ return {
601
+ key: json["key"] == null ? undefined : json["key"],
602
+ name: json["name"] == null ? undefined : json["name"],
603
+ description: json["description"] == null ? undefined : json["description"],
604
+ referencesCount: json["referencesCount"] == null ? undefined : json["referencesCount"],
605
+ entityReferencesCount: json["entityReferencesCount"] == null ? undefined : json["entityReferencesCount"].map(TagReferencesModelFromJSON),
606
+ dataType: json["dataType"] == null ? undefined : TagDataTypeFromJSON(json["dataType"]),
607
+ regex: json["regex"] == null ? undefined : json["regex"],
608
+ type: json["type"] == null ? undefined : TagTypeFromJSON(json["type"]),
609
+ accountKey: json["accountKey"] == null ? undefined : json["accountKey"],
610
+ tenantKey: json["tenantKey"] == null ? undefined : json["tenantKey"],
611
+ userKey: json["userKey"] == null ? undefined : json["userKey"],
612
+ values: json["values"] == null ? undefined : json["values"]
613
+ };
614
+ }
615
+ function LabelModelToJSON(json) {
616
+ return LabelModelToJSONTyped(json, false);
617
+ }
618
+ function LabelModelToJSONTyped(value, ignoreDiscriminator = false) {
619
+ if (value == null) {
620
+ return value;
621
+ }
622
+ return {
623
+ key: value["key"],
624
+ name: value["name"],
625
+ description: value["description"],
626
+ referencesCount: value["referencesCount"],
627
+ entityReferencesCount: value["entityReferencesCount"] == null ? undefined : value["entityReferencesCount"].map(TagReferencesModelToJSON),
628
+ dataType: TagDataTypeToJSON(value["dataType"]),
629
+ regex: value["regex"],
630
+ type: TagTypeToJSON(value["type"]),
631
+ accountKey: value["accountKey"],
632
+ tenantKey: value["tenantKey"],
633
+ userKey: value["userKey"],
634
+ values: value["values"]
635
+ };
636
+ }
637
+
638
+ // ../resourcecatalog-sdk/generated/src/models/LabelModelPaginationResult.ts
639
+ function LabelModelPaginationResultFromJSON(json) {
640
+ return LabelModelPaginationResultFromJSONTyped(json, false);
641
+ }
642
+ function LabelModelPaginationResultFromJSONTyped(json, ignoreDiscriminator) {
643
+ if (json == null) {
644
+ return json;
645
+ }
646
+ return {
647
+ count: json["count"] == null ? undefined : json["count"],
648
+ value: json["value"] == null ? undefined : json["value"].map(LabelModelFromJSON)
649
+ };
650
+ }
651
+
652
+ // ../resourcecatalog-sdk/generated/src/models/TagValueModel.ts
653
+ function TagValueModelFromJSON(json) {
654
+ return TagValueModelFromJSONTyped(json, false);
655
+ }
656
+ function TagValueModelFromJSONTyped(json, ignoreDiscriminator) {
657
+ if (json == null) {
658
+ return json;
659
+ }
660
+ return {
661
+ key: json["key"] == null ? undefined : json["key"],
662
+ displayValue: json["displayValue"] == null ? undefined : json["displayValue"],
663
+ normalizedValue: json["normalizedValue"] == null ? undefined : json["normalizedValue"],
664
+ entityReferencesCount: json["entityReferencesCount"] == null ? undefined : json["entityReferencesCount"].map(TagReferencesModelFromJSON)
665
+ };
666
+ }
667
+
668
+ // ../resourcecatalog-sdk/generated/src/models/TagValueModelPaginationResult.ts
669
+ function TagValueModelPaginationResultFromJSON(json) {
670
+ return TagValueModelPaginationResultFromJSONTyped(json, false);
671
+ }
672
+ function TagValueModelPaginationResultFromJSONTyped(json, ignoreDiscriminator) {
673
+ if (json == null) {
674
+ return json;
675
+ }
676
+ return {
677
+ count: json["count"] == null ? undefined : json["count"],
678
+ value: json["value"] == null ? undefined : json["value"].map(TagValueModelFromJSON)
679
+ };
680
+ }
681
+
682
+ // ../resourcecatalog-sdk/generated/src/models/ValueModel.ts
683
+ function ValueModelToJSON(json) {
684
+ return ValueModelToJSONTyped(json, false);
685
+ }
686
+ function ValueModelToJSONTyped(value, ignoreDiscriminator = false) {
687
+ if (value == null) {
688
+ return value;
689
+ }
690
+ return {
691
+ labelKey: value["labelKey"],
692
+ values: value["values"],
693
+ accountKey: value["accountKey"],
694
+ tenantKey: value["tenantKey"],
695
+ userKey: value["userKey"]
696
+ };
697
+ }
698
+
699
+ // ../resourcecatalog-sdk/generated/src/apis/EntitiesApi.ts
700
+ class EntitiesApi extends BaseAPI {
701
+ async entitiesGetRaw(requestParameters, initOverrides) {
702
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
703
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGet().');
704
+ }
705
+ const queryParameters = {};
706
+ if (requestParameters["skip"] != null) {
707
+ queryParameters["skip"] = requestParameters["skip"];
708
+ }
709
+ if (requestParameters["take"] != null) {
710
+ queryParameters["take"] = requestParameters["take"];
711
+ }
712
+ if (requestParameters["entityTypes"] != null) {
713
+ queryParameters["entityTypes"] = requestParameters["entityTypes"];
714
+ }
715
+ if (requestParameters["entitySubType"] != null) {
716
+ queryParameters["entitySubType"] = requestParameters["entitySubType"];
717
+ }
718
+ if (requestParameters["apiVersion"] != null) {
719
+ queryParameters["api-version"] = requestParameters["apiVersion"];
720
+ }
721
+ const headerParameters = {};
722
+ if (requestParameters["xVersion"] != null) {
723
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
724
+ }
725
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
726
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
727
+ }
728
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
729
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
730
+ }
731
+ if (requestParameters["xUIPATHOrganizationUnitId"] != null) {
732
+ headerParameters["X-UIPATH-OrganizationUnitId"] = String(requestParameters["xUIPATHOrganizationUnitId"]);
733
+ }
734
+ if (requestParameters["xUIPATHFolderPath"] != null) {
735
+ headerParameters["X-UIPATH-FolderPath"] = String(requestParameters["xUIPATHFolderPath"]);
736
+ }
737
+ if (requestParameters["xUIPATHFolderPathEncoded"] != null) {
738
+ headerParameters["X-UIPATH-FolderPath-Encoded"] = String(requestParameters["xUIPATHFolderPathEncoded"]);
739
+ }
740
+ if (requestParameters["xUIPATHFolderKey"] != null) {
741
+ headerParameters["X-UIPATH-FolderKey"] = String(requestParameters["xUIPATHFolderKey"]);
742
+ }
743
+ if (this.configuration && this.configuration.accessToken) {
744
+ const token = this.configuration.accessToken;
745
+ const tokenString = await token("Bearer", []);
746
+ if (tokenString) {
747
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
748
+ }
749
+ }
750
+ let urlPath = `/Entities`;
751
+ const response = await this.request({
752
+ path: urlPath,
753
+ method: "GET",
754
+ headers: headerParameters,
755
+ query: queryParameters
756
+ }, initOverrides);
757
+ return new JSONApiResponse(response, (jsonValue) => EntityModelPaginationResultFromJSON(jsonValue));
758
+ }
759
+ async entitiesGet(requestParameters, initOverrides) {
760
+ const response = await this.entitiesGetRaw(requestParameters, initOverrides);
761
+ return await response.value();
762
+ }
763
+ async entitiesGetByEntityTypeRaw(requestParameters, initOverrides) {
764
+ if (requestParameters["entityType"] == null) {
765
+ throw new RequiredError("entityType", 'Required parameter "entityType" was null or undefined when calling entitiesGetByEntityType().');
766
+ }
767
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
768
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGetByEntityType().');
769
+ }
770
+ const queryParameters = {};
771
+ if (requestParameters["name"] != null) {
772
+ queryParameters["name"] = requestParameters["name"];
773
+ }
774
+ if (requestParameters["skip"] != null) {
775
+ queryParameters["skip"] = requestParameters["skip"];
776
+ }
777
+ if (requestParameters["take"] != null) {
778
+ queryParameters["take"] = requestParameters["take"];
779
+ }
780
+ if (requestParameters["entitySubType"] != null) {
781
+ queryParameters["entitySubType"] = requestParameters["entitySubType"];
782
+ }
783
+ if (requestParameters["apiVersion"] != null) {
784
+ queryParameters["api-version"] = requestParameters["apiVersion"];
785
+ }
786
+ const headerParameters = {};
787
+ if (requestParameters["xVersion"] != null) {
788
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
789
+ }
790
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
791
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
792
+ }
793
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
794
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
795
+ }
796
+ if (requestParameters["xUIPATHOrganizationUnitId"] != null) {
797
+ headerParameters["X-UIPATH-OrganizationUnitId"] = String(requestParameters["xUIPATHOrganizationUnitId"]);
798
+ }
799
+ if (requestParameters["xUIPATHFolderPath"] != null) {
800
+ headerParameters["X-UIPATH-FolderPath"] = String(requestParameters["xUIPATHFolderPath"]);
801
+ }
802
+ if (requestParameters["xUIPATHFolderPathEncoded"] != null) {
803
+ headerParameters["X-UIPATH-FolderPath-Encoded"] = String(requestParameters["xUIPATHFolderPathEncoded"]);
804
+ }
805
+ if (requestParameters["xUIPATHFolderKey"] != null) {
806
+ headerParameters["X-UIPATH-FolderKey"] = String(requestParameters["xUIPATHFolderKey"]);
807
+ }
808
+ if (this.configuration && this.configuration.accessToken) {
809
+ const token = this.configuration.accessToken;
810
+ const tokenString = await token("Bearer", []);
811
+ if (tokenString) {
812
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
813
+ }
814
+ }
815
+ let urlPath = `/Entities/{entityType}`;
816
+ urlPath = urlPath.replace(`{${"entityType"}}`, encodeURIComponent(String(requestParameters["entityType"])));
817
+ const response = await this.request({
818
+ path: urlPath,
819
+ method: "GET",
820
+ headers: headerParameters,
821
+ query: queryParameters
822
+ }, initOverrides);
823
+ return new JSONApiResponse(response, (jsonValue) => EntityModelPaginationResultFromJSON(jsonValue));
824
+ }
825
+ async entitiesGetByEntityType(requestParameters, initOverrides) {
826
+ const response = await this.entitiesGetByEntityTypeRaw(requestParameters, initOverrides);
827
+ return await response.value();
828
+ }
829
+ async entitiesGetDependenciesRaw(requestParameters, initOverrides) {
830
+ if (requestParameters["entityKey"] == null) {
831
+ throw new RequiredError("entityKey", 'Required parameter "entityKey" was null or undefined when calling entitiesGetDependencies().');
832
+ }
833
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
834
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGetDependencies().');
835
+ }
836
+ const queryParameters = {};
837
+ if (requestParameters["apiVersion"] != null) {
838
+ queryParameters["api-version"] = requestParameters["apiVersion"];
839
+ }
840
+ const headerParameters = {};
841
+ if (requestParameters["xVersion"] != null) {
842
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
843
+ }
844
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
845
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
846
+ }
847
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
848
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
849
+ }
850
+ if (this.configuration && this.configuration.accessToken) {
851
+ const token = this.configuration.accessToken;
852
+ const tokenString = await token("Bearer", []);
853
+ if (tokenString) {
854
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
855
+ }
856
+ }
857
+ let urlPath = `/Entities/{entityKey}/Dependencies`;
858
+ urlPath = urlPath.replace(`{${"entityKey"}}`, encodeURIComponent(String(requestParameters["entityKey"])));
859
+ const response = await this.request({
860
+ path: urlPath,
861
+ method: "GET",
862
+ headers: headerParameters,
863
+ query: queryParameters
864
+ }, initOverrides);
865
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(EntityModelFromJSON));
866
+ }
867
+ async entitiesGetDependencies(requestParameters, initOverrides) {
868
+ const response = await this.entitiesGetDependenciesRaw(requestParameters, initOverrides);
869
+ return await response.value();
870
+ }
871
+ async entitiesGetEntitiesByKeysRaw(requestParameters, initOverrides) {
872
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
873
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGetEntitiesByKeys().');
874
+ }
875
+ const queryParameters = {};
876
+ if (requestParameters["apiVersion"] != null) {
877
+ queryParameters["api-version"] = requestParameters["apiVersion"];
878
+ }
879
+ const headerParameters = {};
880
+ headerParameters["Content-Type"] = "application/json";
881
+ if (requestParameters["xVersion"] != null) {
882
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
883
+ }
884
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
885
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
886
+ }
887
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
888
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
889
+ }
890
+ if (this.configuration && this.configuration.accessToken) {
891
+ const token = this.configuration.accessToken;
892
+ const tokenString = await token("Bearer", []);
893
+ if (tokenString) {
894
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
895
+ }
896
+ }
897
+ let urlPath = `/Entities/GetEntitiesByKeys`;
898
+ const response = await this.request({
899
+ path: urlPath,
900
+ method: "POST",
901
+ headers: headerParameters,
902
+ query: queryParameters,
903
+ body: requestParameters["requestBody"]
904
+ }, initOverrides);
905
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(EntityModelFromJSON));
906
+ }
907
+ async entitiesGetEntitiesByKeys(requestParameters, initOverrides) {
908
+ const response = await this.entitiesGetEntitiesByKeysRaw(requestParameters, initOverrides);
909
+ return await response.value();
910
+ }
911
+ async entitiesGetFoldersRaw(requestParameters, initOverrides) {
912
+ if (requestParameters["entityType"] == null) {
913
+ throw new RequiredError("entityType", 'Required parameter "entityType" was null or undefined when calling entitiesGetFolders().');
914
+ }
915
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
916
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGetFolders().');
917
+ }
918
+ const queryParameters = {};
919
+ if (requestParameters["permissions"] != null) {
920
+ queryParameters["permissions"] = requestParameters["permissions"];
921
+ }
922
+ if (requestParameters["folderTypes"] != null) {
923
+ queryParameters["folderTypes"] = requestParameters["folderTypes"];
924
+ }
925
+ if (requestParameters["apiVersion"] != null) {
926
+ queryParameters["api-version"] = requestParameters["apiVersion"];
927
+ }
928
+ const headerParameters = {};
929
+ if (requestParameters["xVersion"] != null) {
930
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
931
+ }
932
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
933
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
934
+ }
935
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
936
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
937
+ }
938
+ if (this.configuration && this.configuration.accessToken) {
939
+ const token = this.configuration.accessToken;
940
+ const tokenString = await token("Bearer", []);
941
+ if (tokenString) {
942
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
943
+ }
944
+ }
945
+ let urlPath = `/Entities/{entityType}/Folders`;
946
+ urlPath = urlPath.replace(`{${"entityType"}}`, encodeURIComponent(String(requestParameters["entityType"])));
947
+ const response = await this.request({
948
+ path: urlPath,
949
+ method: "GET",
950
+ headers: headerParameters,
951
+ query: queryParameters
952
+ }, initOverrides);
953
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(FolderDtoFromJSON));
954
+ }
955
+ async entitiesGetFolders(requestParameters, initOverrides) {
956
+ const response = await this.entitiesGetFoldersRaw(requestParameters, initOverrides);
957
+ return await response.value();
958
+ }
959
+ async entitiesGetPermissionsRaw(requestParameters, initOverrides) {
960
+ if (requestParameters["entityType"] == null) {
961
+ throw new RequiredError("entityType", 'Required parameter "entityType" was null or undefined when calling entitiesGetPermissions().');
962
+ }
963
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
964
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesGetPermissions().');
965
+ }
966
+ const queryParameters = {};
967
+ if (requestParameters["apiVersion"] != null) {
968
+ queryParameters["api-version"] = requestParameters["apiVersion"];
969
+ }
970
+ const headerParameters = {};
971
+ if (requestParameters["xVersion"] != null) {
972
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
973
+ }
974
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
975
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
976
+ }
977
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
978
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
979
+ }
980
+ if (requestParameters["xUIPATHOrganizationUnitId"] != null) {
981
+ headerParameters["X-UIPATH-OrganizationUnitId"] = String(requestParameters["xUIPATHOrganizationUnitId"]);
982
+ }
983
+ if (requestParameters["xUIPATHFolderPath"] != null) {
984
+ headerParameters["X-UIPATH-FolderPath"] = String(requestParameters["xUIPATHFolderPath"]);
985
+ }
986
+ if (requestParameters["xUIPATHFolderPathEncoded"] != null) {
987
+ headerParameters["X-UIPATH-FolderPath-Encoded"] = String(requestParameters["xUIPATHFolderPathEncoded"]);
988
+ }
989
+ if (requestParameters["xUIPATHFolderKey"] != null) {
990
+ headerParameters["X-UIPATH-FolderKey"] = String(requestParameters["xUIPATHFolderKey"]);
991
+ }
992
+ if (this.configuration && this.configuration.accessToken) {
993
+ const token = this.configuration.accessToken;
994
+ const tokenString = await token("Bearer", []);
995
+ if (tokenString) {
996
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
997
+ }
998
+ }
999
+ let urlPath = `/Entities/{entityType}/Permissions`;
1000
+ urlPath = urlPath.replace(`{${"entityType"}}`, encodeURIComponent(String(requestParameters["entityType"])));
1001
+ const response = await this.request({
1002
+ path: urlPath,
1003
+ method: "GET",
1004
+ headers: headerParameters,
1005
+ query: queryParameters
1006
+ }, initOverrides);
1007
+ return new JSONApiResponse(response);
1008
+ }
1009
+ async entitiesGetPermissions(requestParameters, initOverrides) {
1010
+ const response = await this.entitiesGetPermissionsRaw(requestParameters, initOverrides);
1011
+ return await response.value();
1012
+ }
1013
+ async entitiesSearchRaw(requestParameters, initOverrides) {
1014
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1015
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesSearch().');
1016
+ }
1017
+ const queryParameters = {};
1018
+ if (requestParameters["name"] != null) {
1019
+ queryParameters["name"] = requestParameters["name"];
1020
+ }
1021
+ if (requestParameters["skip"] != null) {
1022
+ queryParameters["skip"] = requestParameters["skip"];
1023
+ }
1024
+ if (requestParameters["take"] != null) {
1025
+ queryParameters["take"] = requestParameters["take"];
1026
+ }
1027
+ if (requestParameters["entityTypes"] != null) {
1028
+ queryParameters["entityTypes"] = requestParameters["entityTypes"];
1029
+ }
1030
+ if (requestParameters["entitySubType"] != null) {
1031
+ queryParameters["entitySubType"] = requestParameters["entitySubType"];
1032
+ }
1033
+ if (requestParameters["apiVersion"] != null) {
1034
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1035
+ }
1036
+ const headerParameters = {};
1037
+ if (requestParameters["xVersion"] != null) {
1038
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1039
+ }
1040
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1041
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1042
+ }
1043
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1044
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1045
+ }
1046
+ if (requestParameters["xUIPATHOrganizationUnitId"] != null) {
1047
+ headerParameters["X-UIPATH-OrganizationUnitId"] = String(requestParameters["xUIPATHOrganizationUnitId"]);
1048
+ }
1049
+ if (requestParameters["xUIPATHFolderPath"] != null) {
1050
+ headerParameters["X-UIPATH-FolderPath"] = String(requestParameters["xUIPATHFolderPath"]);
1051
+ }
1052
+ if (requestParameters["xUIPATHFolderPathEncoded"] != null) {
1053
+ headerParameters["X-UIPATH-FolderPath-Encoded"] = String(requestParameters["xUIPATHFolderPathEncoded"]);
1054
+ }
1055
+ if (requestParameters["xUIPATHFolderKey"] != null) {
1056
+ headerParameters["X-UIPATH-FolderKey"] = String(requestParameters["xUIPATHFolderKey"]);
1057
+ }
1058
+ if (this.configuration && this.configuration.accessToken) {
1059
+ const token = this.configuration.accessToken;
1060
+ const tokenString = await token("Bearer", []);
1061
+ if (tokenString) {
1062
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1063
+ }
1064
+ }
1065
+ let urlPath = `/Entities/Search`;
1066
+ const response = await this.request({
1067
+ path: urlPath,
1068
+ method: "GET",
1069
+ headers: headerParameters,
1070
+ query: queryParameters
1071
+ }, initOverrides);
1072
+ return new JSONApiResponse(response, (jsonValue) => EntityModelPaginationResultFromJSON(jsonValue));
1073
+ }
1074
+ async entitiesSearch(requestParameters, initOverrides) {
1075
+ const response = await this.entitiesSearchRaw(requestParameters, initOverrides);
1076
+ return await response.value();
1077
+ }
1078
+ async entitiesSearchFolderEntitiesRaw(requestParameters, initOverrides) {
1079
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1080
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling entitiesSearchFolderEntities().');
1081
+ }
1082
+ const queryParameters = {};
1083
+ if (requestParameters["name"] != null) {
1084
+ queryParameters["name"] = requestParameters["name"];
1085
+ }
1086
+ if (requestParameters["pageCursor"] != null) {
1087
+ queryParameters["pageCursor"] = requestParameters["pageCursor"];
1088
+ }
1089
+ if (requestParameters["pageSize"] != null) {
1090
+ queryParameters["pageSize"] = requestParameters["pageSize"];
1091
+ }
1092
+ if (requestParameters["entityTypes"] != null) {
1093
+ queryParameters["entityTypes"] = requestParameters["entityTypes"];
1094
+ }
1095
+ if (requestParameters["entitySubTypes"] != null) {
1096
+ queryParameters["entitySubTypes"] = requestParameters["entitySubTypes"];
1097
+ }
1098
+ if (requestParameters["folderTypes"] != null) {
1099
+ queryParameters["folderTypes"] = requestParameters["folderTypes"];
1100
+ }
1101
+ if (requestParameters["apiVersion"] != null) {
1102
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1103
+ }
1104
+ const headerParameters = {};
1105
+ if (requestParameters["xVersion"] != null) {
1106
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1107
+ }
1108
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1109
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1110
+ }
1111
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1112
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1113
+ }
1114
+ if (this.configuration && this.configuration.accessToken) {
1115
+ const token = this.configuration.accessToken;
1116
+ const tokenString = await token("Bearer", []);
1117
+ if (tokenString) {
1118
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1119
+ }
1120
+ }
1121
+ let urlPath = `/Entities/SearchFolderEntities`;
1122
+ const response = await this.request({
1123
+ path: urlPath,
1124
+ method: "GET",
1125
+ headers: headerParameters,
1126
+ query: queryParameters
1127
+ }, initOverrides);
1128
+ return new JSONApiResponse(response, (jsonValue) => FolderEntityModelCursorPaginationResultFromJSON(jsonValue));
1129
+ }
1130
+ async entitiesSearchFolderEntities(requestParameters, initOverrides) {
1131
+ const response = await this.entitiesSearchFolderEntitiesRaw(requestParameters, initOverrides);
1132
+ return await response.value();
1133
+ }
1134
+ }
1135
+
1136
+ // ../resourcecatalog-sdk/generated/src/apis/TagsApi.ts
1137
+ class TagsApi extends BaseAPI {
1138
+ async tagsBulkDeleteRaw(requestParameters, initOverrides) {
1139
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1140
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsBulkDelete().');
1141
+ }
1142
+ const queryParameters = {};
1143
+ if (requestParameters["keys"] != null) {
1144
+ queryParameters["keys"] = requestParameters["keys"];
1145
+ }
1146
+ if (requestParameters["type"] != null) {
1147
+ queryParameters["type"] = requestParameters["type"];
1148
+ }
1149
+ if (requestParameters["apiVersion"] != null) {
1150
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1151
+ }
1152
+ const headerParameters = {};
1153
+ if (requestParameters["xVersion"] != null) {
1154
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1155
+ }
1156
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1157
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1158
+ }
1159
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1160
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1161
+ }
1162
+ if (this.configuration && this.configuration.accessToken) {
1163
+ const token = this.configuration.accessToken;
1164
+ const tokenString = await token("Bearer", []);
1165
+ if (tokenString) {
1166
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1167
+ }
1168
+ }
1169
+ let urlPath = `/Tags`;
1170
+ const response = await this.request({
1171
+ path: urlPath,
1172
+ method: "DELETE",
1173
+ headers: headerParameters,
1174
+ query: queryParameters
1175
+ }, initOverrides);
1176
+ return new VoidApiResponse(response);
1177
+ }
1178
+ async tagsBulkDelete(requestParameters, initOverrides) {
1179
+ await this.tagsBulkDeleteRaw(requestParameters, initOverrides);
1180
+ }
1181
+ async tagsDeleteRaw(requestParameters, initOverrides) {
1182
+ if (requestParameters["key"] == null) {
1183
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling tagsDelete().');
1184
+ }
1185
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1186
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsDelete().');
1187
+ }
1188
+ const queryParameters = {};
1189
+ if (requestParameters["apiVersion"] != null) {
1190
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1191
+ }
1192
+ const headerParameters = {};
1193
+ if (requestParameters["xVersion"] != null) {
1194
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1195
+ }
1196
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1197
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1198
+ }
1199
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1200
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1201
+ }
1202
+ if (this.configuration && this.configuration.accessToken) {
1203
+ const token = this.configuration.accessToken;
1204
+ const tokenString = await token("Bearer", []);
1205
+ if (tokenString) {
1206
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1207
+ }
1208
+ }
1209
+ let urlPath = `/Tags/{key}`;
1210
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
1211
+ const response = await this.request({
1212
+ path: urlPath,
1213
+ method: "DELETE",
1214
+ headers: headerParameters,
1215
+ query: queryParameters
1216
+ }, initOverrides);
1217
+ return new VoidApiResponse(response);
1218
+ }
1219
+ async tagsDelete(requestParameters, initOverrides) {
1220
+ await this.tagsDeleteRaw(requestParameters, initOverrides);
1221
+ }
1222
+ async tagsDeleteValuesRaw(requestParameters, initOverrides) {
1223
+ if (requestParameters["key"] == null) {
1224
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling tagsDeleteValues().');
1225
+ }
1226
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1227
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsDeleteValues().');
1228
+ }
1229
+ const queryParameters = {};
1230
+ if (requestParameters["valueKeys"] != null) {
1231
+ queryParameters["valueKeys"] = requestParameters["valueKeys"];
1232
+ }
1233
+ if (requestParameters["apiVersion"] != null) {
1234
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1235
+ }
1236
+ const headerParameters = {};
1237
+ if (requestParameters["xVersion"] != null) {
1238
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1239
+ }
1240
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1241
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1242
+ }
1243
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1244
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1245
+ }
1246
+ if (this.configuration && this.configuration.accessToken) {
1247
+ const token = this.configuration.accessToken;
1248
+ const tokenString = await token("Bearer", []);
1249
+ if (tokenString) {
1250
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1251
+ }
1252
+ }
1253
+ let urlPath = `/Tags/{key}/Values`;
1254
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
1255
+ const response = await this.request({
1256
+ path: urlPath,
1257
+ method: "DELETE",
1258
+ headers: headerParameters,
1259
+ query: queryParameters
1260
+ }, initOverrides);
1261
+ return new VoidApiResponse(response);
1262
+ }
1263
+ async tagsDeleteValues(requestParameters, initOverrides) {
1264
+ await this.tagsDeleteValuesRaw(requestParameters, initOverrides);
1265
+ }
1266
+ async tagsDeleteValuesByValueKeyRaw(requestParameters, initOverrides) {
1267
+ if (requestParameters["key"] == null) {
1268
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling tagsDeleteValuesByValueKey().');
1269
+ }
1270
+ if (requestParameters["valueKey"] == null) {
1271
+ throw new RequiredError("valueKey", 'Required parameter "valueKey" was null or undefined when calling tagsDeleteValuesByValueKey().');
1272
+ }
1273
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1274
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsDeleteValuesByValueKey().');
1275
+ }
1276
+ const queryParameters = {};
1277
+ if (requestParameters["apiVersion"] != null) {
1278
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1279
+ }
1280
+ const headerParameters = {};
1281
+ if (requestParameters["xVersion"] != null) {
1282
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1283
+ }
1284
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1285
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1286
+ }
1287
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1288
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1289
+ }
1290
+ if (this.configuration && this.configuration.accessToken) {
1291
+ const token = this.configuration.accessToken;
1292
+ const tokenString = await token("Bearer", []);
1293
+ if (tokenString) {
1294
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1295
+ }
1296
+ }
1297
+ let urlPath = `/Tags/{key}/Values/{valueKey}`;
1298
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
1299
+ urlPath = urlPath.replace(`{${"valueKey"}}`, encodeURIComponent(String(requestParameters["valueKey"])));
1300
+ const response = await this.request({
1301
+ path: urlPath,
1302
+ method: "DELETE",
1303
+ headers: headerParameters,
1304
+ query: queryParameters
1305
+ }, initOverrides);
1306
+ return new VoidApiResponse(response);
1307
+ }
1308
+ async tagsDeleteValuesByValueKey(requestParameters, initOverrides) {
1309
+ await this.tagsDeleteValuesByValueKeyRaw(requestParameters, initOverrides);
1310
+ }
1311
+ async tagsGetByIdentifierRaw(requestParameters, initOverrides) {
1312
+ if (requestParameters["key"] == null) {
1313
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling tagsGetByIdentifier().');
1314
+ }
1315
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1316
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsGetByIdentifier().');
1317
+ }
1318
+ const queryParameters = {};
1319
+ if (requestParameters["apiVersion"] != null) {
1320
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1321
+ }
1322
+ const headerParameters = {};
1323
+ if (requestParameters["xVersion"] != null) {
1324
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1325
+ }
1326
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1327
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1328
+ }
1329
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1330
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1331
+ }
1332
+ if (this.configuration && this.configuration.accessToken) {
1333
+ const token = this.configuration.accessToken;
1334
+ const tokenString = await token("Bearer", []);
1335
+ if (tokenString) {
1336
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1337
+ }
1338
+ }
1339
+ let urlPath = `/Tags/{key}`;
1340
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
1341
+ const response = await this.request({
1342
+ path: urlPath,
1343
+ method: "GET",
1344
+ headers: headerParameters,
1345
+ query: queryParameters
1346
+ }, initOverrides);
1347
+ return new JSONApiResponse(response, (jsonValue) => LabelModelFromJSON(jsonValue));
1348
+ }
1349
+ async tagsGetByIdentifier(requestParameters, initOverrides) {
1350
+ const response = await this.tagsGetByIdentifierRaw(requestParameters, initOverrides);
1351
+ return await response.value();
1352
+ }
1353
+ async tagsGetLabelReferencesCountRaw(requestParameters, initOverrides) {
1354
+ if (requestParameters["key"] == null) {
1355
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling tagsGetLabelReferencesCount().');
1356
+ }
1357
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1358
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsGetLabelReferencesCount().');
1359
+ }
1360
+ const queryParameters = {};
1361
+ if (requestParameters["apiVersion"] != null) {
1362
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1363
+ }
1364
+ const headerParameters = {};
1365
+ if (requestParameters["xVersion"] != null) {
1366
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1367
+ }
1368
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1369
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1370
+ }
1371
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1372
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1373
+ }
1374
+ if (this.configuration && this.configuration.accessToken) {
1375
+ const token = this.configuration.accessToken;
1376
+ const tokenString = await token("Bearer", []);
1377
+ if (tokenString) {
1378
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1379
+ }
1380
+ }
1381
+ let urlPath = `/Tags/{key}/Stats`;
1382
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
1383
+ const response = await this.request({
1384
+ path: urlPath,
1385
+ method: "GET",
1386
+ headers: headerParameters,
1387
+ query: queryParameters
1388
+ }, initOverrides);
1389
+ return new VoidApiResponse(response);
1390
+ }
1391
+ async tagsGetLabelReferencesCount(requestParameters, initOverrides) {
1392
+ await this.tagsGetLabelReferencesCountRaw(requestParameters, initOverrides);
1393
+ }
1394
+ async tagsGetLabelsReferencesCountRaw(requestParameters, initOverrides) {
1395
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1396
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsGetLabelsReferencesCount().');
1397
+ }
1398
+ const queryParameters = {};
1399
+ if (requestParameters["keys"] != null) {
1400
+ queryParameters["keys"] = requestParameters["keys"];
1401
+ }
1402
+ if (requestParameters["type"] != null) {
1403
+ queryParameters["type"] = requestParameters["type"];
1404
+ }
1405
+ if (requestParameters["apiVersion"] != null) {
1406
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1407
+ }
1408
+ const headerParameters = {};
1409
+ if (requestParameters["xVersion"] != null) {
1410
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1411
+ }
1412
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1413
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1414
+ }
1415
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1416
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1417
+ }
1418
+ if (this.configuration && this.configuration.accessToken) {
1419
+ const token = this.configuration.accessToken;
1420
+ const tokenString = await token("Bearer", []);
1421
+ if (tokenString) {
1422
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1423
+ }
1424
+ }
1425
+ let urlPath = `/Tags/Stats`;
1426
+ const response = await this.request({
1427
+ path: urlPath,
1428
+ method: "GET",
1429
+ headers: headerParameters,
1430
+ query: queryParameters
1431
+ }, initOverrides);
1432
+ return new VoidApiResponse(response);
1433
+ }
1434
+ async tagsGetLabelsReferencesCount(requestParameters, initOverrides) {
1435
+ await this.tagsGetLabelsReferencesCountRaw(requestParameters, initOverrides);
1436
+ }
1437
+ async tagsGetListRaw(requestParameters, initOverrides) {
1438
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1439
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsGetList().');
1440
+ }
1441
+ const queryParameters = {};
1442
+ if (requestParameters["skip"] != null) {
1443
+ queryParameters["skip"] = requestParameters["skip"];
1444
+ }
1445
+ if (requestParameters["take"] != null) {
1446
+ queryParameters["take"] = requestParameters["take"];
1447
+ }
1448
+ if (requestParameters["startsWith"] != null) {
1449
+ queryParameters["startsWith"] = requestParameters["startsWith"];
1450
+ }
1451
+ if (requestParameters["type"] != null) {
1452
+ queryParameters["type"] = requestParameters["type"];
1453
+ }
1454
+ if (requestParameters["apiVersion"] != null) {
1455
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1456
+ }
1457
+ const headerParameters = {};
1458
+ if (requestParameters["xVersion"] != null) {
1459
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1460
+ }
1461
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1462
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1463
+ }
1464
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1465
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1466
+ }
1467
+ if (this.configuration && this.configuration.accessToken) {
1468
+ const token = this.configuration.accessToken;
1469
+ const tokenString = await token("Bearer", []);
1470
+ if (tokenString) {
1471
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1472
+ }
1473
+ }
1474
+ let urlPath = `/Tags`;
1475
+ const response = await this.request({
1476
+ path: urlPath,
1477
+ method: "GET",
1478
+ headers: headerParameters,
1479
+ query: queryParameters
1480
+ }, initOverrides);
1481
+ return new JSONApiResponse(response, (jsonValue) => LabelModelPaginationResultFromJSON(jsonValue));
1482
+ }
1483
+ async tagsGetList(requestParameters, initOverrides) {
1484
+ const response = await this.tagsGetListRaw(requestParameters, initOverrides);
1485
+ return await response.value();
1486
+ }
1487
+ async tagsGetValueReferencesCountRaw(requestParameters, initOverrides) {
1488
+ if (requestParameters["key"] == null) {
1489
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling tagsGetValueReferencesCount().');
1490
+ }
1491
+ if (requestParameters["valueKey"] == null) {
1492
+ throw new RequiredError("valueKey", 'Required parameter "valueKey" was null or undefined when calling tagsGetValueReferencesCount().');
1493
+ }
1494
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1495
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsGetValueReferencesCount().');
1496
+ }
1497
+ const queryParameters = {};
1498
+ if (requestParameters["apiVersion"] != null) {
1499
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1500
+ }
1501
+ const headerParameters = {};
1502
+ if (requestParameters["xVersion"] != null) {
1503
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1504
+ }
1505
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1506
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1507
+ }
1508
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1509
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1510
+ }
1511
+ if (this.configuration && this.configuration.accessToken) {
1512
+ const token = this.configuration.accessToken;
1513
+ const tokenString = await token("Bearer", []);
1514
+ if (tokenString) {
1515
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1516
+ }
1517
+ }
1518
+ let urlPath = `/Tags/{key}/Values/{valueKey}/Stats`;
1519
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
1520
+ urlPath = urlPath.replace(`{${"valueKey"}}`, encodeURIComponent(String(requestParameters["valueKey"])));
1521
+ const response = await this.request({
1522
+ path: urlPath,
1523
+ method: "GET",
1524
+ headers: headerParameters,
1525
+ query: queryParameters
1526
+ }, initOverrides);
1527
+ return new VoidApiResponse(response);
1528
+ }
1529
+ async tagsGetValueReferencesCount(requestParameters, initOverrides) {
1530
+ await this.tagsGetValueReferencesCountRaw(requestParameters, initOverrides);
1531
+ }
1532
+ async tagsGetValuesListRaw(requestParameters, initOverrides) {
1533
+ if (requestParameters["key"] == null) {
1534
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling tagsGetValuesList().');
1535
+ }
1536
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1537
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsGetValuesList().');
1538
+ }
1539
+ const queryParameters = {};
1540
+ if (requestParameters["skip"] != null) {
1541
+ queryParameters["skip"] = requestParameters["skip"];
1542
+ }
1543
+ if (requestParameters["take"] != null) {
1544
+ queryParameters["take"] = requestParameters["take"];
1545
+ }
1546
+ if (requestParameters["startsWith"] != null) {
1547
+ queryParameters["startsWith"] = requestParameters["startsWith"];
1548
+ }
1549
+ if (requestParameters["apiVersion"] != null) {
1550
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1551
+ }
1552
+ const headerParameters = {};
1553
+ if (requestParameters["xVersion"] != null) {
1554
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1555
+ }
1556
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1557
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1558
+ }
1559
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1560
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1561
+ }
1562
+ if (this.configuration && this.configuration.accessToken) {
1563
+ const token = this.configuration.accessToken;
1564
+ const tokenString = await token("Bearer", []);
1565
+ if (tokenString) {
1566
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1567
+ }
1568
+ }
1569
+ let urlPath = `/Tags/{key}/Values`;
1570
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
1571
+ const response = await this.request({
1572
+ path: urlPath,
1573
+ method: "GET",
1574
+ headers: headerParameters,
1575
+ query: queryParameters
1576
+ }, initOverrides);
1577
+ return new JSONApiResponse(response, (jsonValue) => TagValueModelPaginationResultFromJSON(jsonValue));
1578
+ }
1579
+ async tagsGetValuesList(requestParameters, initOverrides) {
1580
+ const response = await this.tagsGetValuesListRaw(requestParameters, initOverrides);
1581
+ return await response.value();
1582
+ }
1583
+ async tagsPostRaw(requestParameters, initOverrides) {
1584
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1585
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsPost().');
1586
+ }
1587
+ const queryParameters = {};
1588
+ if (requestParameters["apiVersion"] != null) {
1589
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1590
+ }
1591
+ const headerParameters = {};
1592
+ headerParameters["Content-Type"] = "application/json";
1593
+ if (requestParameters["xVersion"] != null) {
1594
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1595
+ }
1596
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1597
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1598
+ }
1599
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1600
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1601
+ }
1602
+ if (this.configuration && this.configuration.accessToken) {
1603
+ const token = this.configuration.accessToken;
1604
+ const tokenString = await token("Bearer", []);
1605
+ if (tokenString) {
1606
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1607
+ }
1608
+ }
1609
+ let urlPath = `/Tags`;
1610
+ const response = await this.request({
1611
+ path: urlPath,
1612
+ method: "POST",
1613
+ headers: headerParameters,
1614
+ query: queryParameters,
1615
+ body: LabelModelToJSON(requestParameters["labelModel"])
1616
+ }, initOverrides);
1617
+ return new JSONApiResponse(response, (jsonValue) => LabelModelFromJSON(jsonValue));
1618
+ }
1619
+ async tagsPost(requestParameters, initOverrides) {
1620
+ const response = await this.tagsPostRaw(requestParameters, initOverrides);
1621
+ return await response.value();
1622
+ }
1623
+ async tagsPostValuesRaw(requestParameters, initOverrides) {
1624
+ if (requestParameters["key"] == null) {
1625
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling tagsPostValues().');
1626
+ }
1627
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1628
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsPostValues().');
1629
+ }
1630
+ const queryParameters = {};
1631
+ if (requestParameters["apiVersion"] != null) {
1632
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1633
+ }
1634
+ const headerParameters = {};
1635
+ headerParameters["Content-Type"] = "application/json";
1636
+ if (requestParameters["xVersion"] != null) {
1637
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1638
+ }
1639
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1640
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1641
+ }
1642
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1643
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1644
+ }
1645
+ if (this.configuration && this.configuration.accessToken) {
1646
+ const token = this.configuration.accessToken;
1647
+ const tokenString = await token("Bearer", []);
1648
+ if (tokenString) {
1649
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1650
+ }
1651
+ }
1652
+ let urlPath = `/Tags/{key}/Values`;
1653
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
1654
+ const response = await this.request({
1655
+ path: urlPath,
1656
+ method: "POST",
1657
+ headers: headerParameters,
1658
+ query: queryParameters,
1659
+ body: ValueModelToJSON(requestParameters["valueModel"])
1660
+ }, initOverrides);
1661
+ return new VoidApiResponse(response);
1662
+ }
1663
+ async tagsPostValues(requestParameters, initOverrides) {
1664
+ await this.tagsPostValuesRaw(requestParameters, initOverrides);
1665
+ }
1666
+ async tagsPutRaw(requestParameters, initOverrides) {
1667
+ if (requestParameters["key"] == null) {
1668
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling tagsPut().');
1669
+ }
1670
+ if (requestParameters["xUiPathInternalAccountId"] == null) {
1671
+ throw new RequiredError("xUiPathInternalAccountId", 'Required parameter "xUiPathInternalAccountId" was null or undefined when calling tagsPut().');
1672
+ }
1673
+ const queryParameters = {};
1674
+ if (requestParameters["apiVersion"] != null) {
1675
+ queryParameters["api-version"] = requestParameters["apiVersion"];
1676
+ }
1677
+ const headerParameters = {};
1678
+ headerParameters["Content-Type"] = "application/json";
1679
+ if (requestParameters["xVersion"] != null) {
1680
+ headerParameters["X-Version"] = String(requestParameters["xVersion"]);
1681
+ }
1682
+ if (requestParameters["xUiPathInternalAccountId"] != null) {
1683
+ headerParameters["X-UiPath-Internal-AccountId"] = String(requestParameters["xUiPathInternalAccountId"]);
1684
+ }
1685
+ if (requestParameters["xUiPathInternalTenantId"] != null) {
1686
+ headerParameters["X-UiPath-Internal-TenantId"] = String(requestParameters["xUiPathInternalTenantId"]);
1687
+ }
1688
+ if (this.configuration && this.configuration.accessToken) {
1689
+ const token = this.configuration.accessToken;
1690
+ const tokenString = await token("Bearer", []);
1691
+ if (tokenString) {
1692
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1693
+ }
1694
+ }
1695
+ let urlPath = `/Tags/{key}`;
1696
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
1697
+ const response = await this.request({
1698
+ path: urlPath,
1699
+ method: "PUT",
1700
+ headers: headerParameters,
1701
+ query: queryParameters,
1702
+ body: LabelModelToJSON(requestParameters["labelModel"])
1703
+ }, initOverrides);
1704
+ return new VoidApiResponse(response);
1705
+ }
1706
+ async tagsPut(requestParameters, initOverrides) {
1707
+ await this.tagsPutRaw(requestParameters, initOverrides);
1708
+ }
1709
+ }
1710
+ // ../resourcecatalog-sdk/src/client-factory.ts
1711
+ async function resolveConfig(options) {
1712
+ const status = await getLoginStatusAsync({
1713
+ ensureTokenValidityMinutes: options?.loginValidity
1714
+ });
1715
+ if (status.loginStatus !== "Logged in" || !status.baseUrl || !status.accessToken) {
1716
+ throw new Error(status.hint ? `Not logged in. ${status.hint}` : "Not logged in. Run 'uip login' first.");
1717
+ }
1718
+ if (!status.organizationId) {
1719
+ throw new Error("Organization ID not available. Ensure you are logged in with an organization context.");
1720
+ }
1721
+ const tenant = options?.tenantName ?? status.tenantName;
1722
+ if (!tenant) {
1723
+ throw new Error("Tenant not available. Run 'uip login' to select a tenant, or use 'uip login tenant set <tenant>' to switch tenants.");
1724
+ }
1725
+ const basePath = `${status.baseUrl}/${status.organizationId}/${tenant}/resourcecatalog_`;
1726
+ const bearerToken = options?.s2sToken ?? status.accessToken;
1727
+ return {
1728
+ config: new Configuration({
1729
+ basePath,
1730
+ accessToken: async () => bearerToken,
1731
+ headers: addSdkUserAgentHeader(undefined, SDK_USER_AGENT)
1732
+ }),
1733
+ organizationId: status.organizationId,
1734
+ tenantName: tenant
1735
+ };
1736
+ }
1737
+ async function createApiClient(ApiClass, options) {
1738
+ const { config, organizationId, tenantName } = await resolveConfig(options);
1739
+ return {
1740
+ api: new ApiClass(config),
1741
+ organizationId,
1742
+ tenantName
1743
+ };
1744
+ }
1745
+ // ../resourcecatalog-tool/src/commands/search.ts
1746
+ var LOGIN_INSTRUCTIONS = "Ensure you are logged in with 'uip login' and have access to the Resource Catalog service.";
1747
+ var SEARCH_EXAMPLES = [
1748
+ {
1749
+ Description: "Search RCS Process entities by entitySubType (matches the Orchestrator UI Add-Tool picker)",
1750
+ Command: "uip admin rcs search --entity-type Process --entity-sub-type ProcessOrchestration --limit 8",
1751
+ Output: {
1752
+ Code: "RcsSearch",
1753
+ Data: {
1754
+ items: [
1755
+ {
1756
+ entityKey: "entity-guid",
1757
+ name: "Sample Orchestrator",
1758
+ entityType: "Process",
1759
+ entitySubType: "ProcessOrchestration"
1760
+ }
1761
+ ],
1762
+ count: 1
1763
+ }
1764
+ }
1765
+ },
1766
+ {
1767
+ Description: "Search across one folder by key",
1768
+ Command: "uip admin rcs search --entity-type Process --folder-key 11111111-1111-1111-1111-111111111111",
1769
+ Output: {
1770
+ Code: "RcsSearch",
1771
+ Data: { items: [], count: 0 }
1772
+ }
1773
+ }
1774
+ ];
1775
+ var registerSearchCommands = (rcs) => {
1776
+ rcs.command("search").description([
1777
+ "Search Resource Catalog entities (RCS GET /Entities/Search).",
1778
+ "",
1779
+ "Filters: --entity-type, --entity-sub-type (each repeatable),",
1780
+ "--name (substring on entity name), --folder-key/--folder-path",
1781
+ "(sent as X-UIPATH-FolderKey/X-UIPATH-FolderPath headers).",
1782
+ "",
1783
+ "Returns the standard paging envelope {items, total, count, next}."
1784
+ ].join(`
1785
+ `)).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) => {
1786
+ const offset = resolveDeprecatedOptionAlias({
1787
+ preferredValue: options.offset,
1788
+ deprecatedValue: options.skip,
1789
+ preferredFlag: "--offset",
1790
+ deprecatedFlag: "--skip"
1791
+ });
1792
+ if (offset.error) {
1793
+ OutputFormatter.error({
1794
+ Result: RESULTS.Failure,
1795
+ Message: offset.error.message,
1796
+ Instructions: offset.error.instructions
1797
+ });
1798
+ processContext.exit(1);
1799
+ return;
1800
+ }
1801
+ if (offset.usedDeprecated) {
1802
+ warnDeprecatedOptionAlias("--skip", "--offset");
1803
+ }
1804
+ const resolvedOffset = offset.value ?? 0;
1805
+ const resolvedLimit = options.limit ?? DEFAULT_PAGE_SIZE;
1806
+ const [error, result] = await catchError((async () => {
1807
+ const { api, organizationId } = await createApiClient(EntitiesApi, {
1808
+ loginValidity: options.loginValidity,
1809
+ tenantName: options.tenant
1810
+ });
1811
+ return await api.entitiesSearch({
1812
+ xUiPathInternalAccountId: organizationId,
1813
+ name: options.name,
1814
+ skip: resolvedOffset,
1815
+ take: resolvedLimit,
1816
+ entityTypes: options.entityType,
1817
+ entitySubType: options.entitySubType,
1818
+ xUIPATHFolderKey: options.folderKey,
1819
+ xUIPATHFolderPath: options.folderPath
1820
+ });
1821
+ })());
1822
+ if (error) {
1823
+ OutputFormatter.error({
1824
+ Result: RESULTS.Failure,
1825
+ Message: await extractErrorMessage(error),
1826
+ Instructions: LOGIN_INSTRUCTIONS
1827
+ });
1828
+ processContext.exit(1);
1829
+ return;
1830
+ }
1831
+ const items = result?.value ?? [];
1832
+ const total = result?.count;
1833
+ const count = items.length;
1834
+ const nextSkip = resolvedOffset + count;
1835
+ const next = typeof total === "number" && nextSkip < total ? { skip: nextSkip, take: resolvedLimit } : undefined;
1836
+ OutputFormatter.success({
1837
+ Result: RESULTS.Success,
1838
+ Code: "RcsSearch",
1839
+ Data: {
1840
+ items,
1841
+ total,
1842
+ count,
1843
+ ...next ? { next } : {}
1844
+ }
1845
+ });
1846
+ });
1847
+ };
1848
+
1849
+ // ../resourcecatalog-tool/src/commands/tag.ts
1850
+ 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.";
1851
+ var LIST_EXAMPLES = [
1852
+ {
1853
+ Description: "List all Label tags for the current tenant",
1854
+ Command: "uip admin rcs tag list",
1855
+ Output: {
1856
+ Code: "RcsTagList",
1857
+ Data: {
1858
+ count: 2,
1859
+ value: [
1860
+ {
1861
+ displayName: "Environment",
1862
+ normalizedName: "environment"
1863
+ },
1864
+ { displayName: "Owner", normalizedName: "owner" }
1865
+ ]
1866
+ }
1867
+ }
1868
+ },
1869
+ {
1870
+ Description: "List tags whose name starts with 'env'",
1871
+ Command: "uip admin rcs tag list --starts-with env --limit 20",
1872
+ Output: {
1873
+ Code: "RcsTagList",
1874
+ Data: {
1875
+ count: 1,
1876
+ value: [
1877
+ {
1878
+ displayName: "Environment",
1879
+ normalizedName: "environment"
1880
+ }
1881
+ ]
1882
+ }
1883
+ }
1884
+ }
1885
+ ];
1886
+ var registerTagCommands = (rcs) => {
1887
+ const tag = rcs.command("tag").description("List tenant-scoped tags from the Resource Catalog Service.");
1888
+ tag.command("list").description([
1889
+ "List tags for a tenant in the current organization.",
1890
+ "",
1891
+ "By default returns TagType.Label tags for the tenant in your login context.",
1892
+ "Use 'uip login tenant set <tenant>' to target a different tenant in the same organization",
1893
+ "(your account must have RCS access to that tenant). Use --type KeyValue",
1894
+ "for key/value tags, or --starts-with to filter by name prefix."
1895
+ ].join(`
1896
+ `)).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) => {
1897
+ const offset = resolveDeprecatedOptionAlias({
1898
+ preferredValue: options.offset,
1899
+ deprecatedValue: options.skip,
1900
+ preferredFlag: "--offset",
1901
+ deprecatedFlag: "--skip"
1902
+ });
1903
+ if (offset.error) {
1904
+ OutputFormatter.error({
1905
+ Result: RESULTS.Failure,
1906
+ Message: offset.error.message,
1907
+ Instructions: offset.error.instructions
1908
+ });
1909
+ processContext.exit(1);
1910
+ return;
1911
+ }
1912
+ if (offset.usedDeprecated) {
1913
+ warnDeprecatedOptionAlias("--skip", "--offset");
1914
+ }
1915
+ const [error, result] = await catchError((async () => {
1916
+ if (options.type !== TagType.Label && options.type !== TagType.KeyValue) {
1917
+ throw new Error(`Invalid --type '${options.type}'. Use 'Label' or 'KeyValue'.`);
1918
+ }
1919
+ const { api, organizationId } = await createApiClient(TagsApi, {
1920
+ loginValidity: options.loginValidity,
1921
+ tenantName: options.tenant
1922
+ });
1923
+ return await api.tagsGetList({
1924
+ xUiPathInternalAccountId: organizationId,
1925
+ type: options.type,
1926
+ startsWith: options.startsWith,
1927
+ take: options.limit,
1928
+ skip: offset.value ?? 0
1929
+ });
1930
+ })());
1931
+ if (error) {
1932
+ OutputFormatter.error({
1933
+ Result: RESULTS.Failure,
1934
+ Message: await extractErrorMessage(error),
1935
+ Instructions: LOGIN_INSTRUCTIONS2
1936
+ });
1937
+ processContext.exit(1);
1938
+ return;
1939
+ }
1940
+ OutputFormatter.success({
1941
+ Result: RESULTS.Success,
1942
+ Code: "RcsTagList",
1943
+ Data: result
1944
+ });
1945
+ });
1946
+ };
1947
+
1948
+ // ../resourcecatalog-tool/src/commands/rcs.ts
1949
+ var registerRcsCommand = (program) => {
1950
+ const rcs = program.command("rcs").description([
1951
+ "Manage UiPath Resource Catalog Service resources.",
1952
+ "",
1953
+ "Subcommand groups:",
1954
+ " search — search tenant- or folder-scoped RCS entities.",
1955
+ " tag — list tenant-scoped tags."
1956
+ ].join(`
1957
+ `));
1958
+ registerSearchCommands(rcs);
1959
+ registerTagCommands(rcs);
1960
+ };
1961
+
1962
+ // ../resourcecatalog-tool/src/tool.ts
1963
+ var metadata = {
1964
+ name: "resourcecatalog-tool",
1965
+ version: package_default.version,
1966
+ description: "Manage UiPath Resource Catalog Service resources.",
1967
+ commandPrefix: "admin"
1968
+ };
1969
+ var registerCommands = async (program) => {
1970
+ registerRcsCommand(program);
1971
+ };
1972
+ export {
1973
+ metadata,
1974
+ registerCommands
1975
+ };
1976
+
1977
+ //# debugId=36202C196C52076964756E2164756E21