@uipath/eval-tool 1.203.0-preview.203

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,686 @@
1
+ import {
2
+ getSdkUserAgentToken,
3
+ addSdkUserAgentHeader,
4
+ installSdkUserAgentHeader,
5
+ getAuthContext
6
+ } from "./tool-s9nrxyrx.js";
7
+
8
+ // ../orchestrator-sdk/generated/src/runtime.ts
9
+ var BASE_PATH = "https://alpha.uipath.com/Ada/byoa/orchestrator_".replace(/\/+$/, "");
10
+
11
+ class Configuration {
12
+ configuration;
13
+ constructor(configuration = {}) {
14
+ this.configuration = configuration;
15
+ }
16
+ set config(configuration) {
17
+ this.configuration = configuration;
18
+ }
19
+ get basePath() {
20
+ return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
21
+ }
22
+ get fetchApi() {
23
+ return this.configuration.fetchApi;
24
+ }
25
+ get middleware() {
26
+ return this.configuration.middleware || [];
27
+ }
28
+ get queryParamsStringify() {
29
+ return this.configuration.queryParamsStringify || querystring;
30
+ }
31
+ get username() {
32
+ return this.configuration.username;
33
+ }
34
+ get password() {
35
+ return this.configuration.password;
36
+ }
37
+ get apiKey() {
38
+ const apiKey = this.configuration.apiKey;
39
+ if (apiKey) {
40
+ return typeof apiKey === "function" ? apiKey : () => apiKey;
41
+ }
42
+ return;
43
+ }
44
+ get accessToken() {
45
+ const accessToken = this.configuration.accessToken;
46
+ if (accessToken) {
47
+ return typeof accessToken === "function" ? accessToken : async () => accessToken;
48
+ }
49
+ return;
50
+ }
51
+ get headers() {
52
+ return this.configuration.headers;
53
+ }
54
+ get credentials() {
55
+ return this.configuration.credentials;
56
+ }
57
+ }
58
+ var DefaultConfig = new Configuration;
59
+
60
+ class BaseAPI {
61
+ configuration;
62
+ static jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i");
63
+ middleware;
64
+ constructor(configuration = DefaultConfig) {
65
+ this.configuration = configuration;
66
+ this.middleware = configuration.middleware;
67
+ }
68
+ withMiddleware(...middlewares) {
69
+ const next = this.clone();
70
+ next.middleware = next.middleware.concat(...middlewares);
71
+ return next;
72
+ }
73
+ withPreMiddleware(...preMiddlewares) {
74
+ const middlewares = preMiddlewares.map((pre) => ({ pre }));
75
+ return this.withMiddleware(...middlewares);
76
+ }
77
+ withPostMiddleware(...postMiddlewares) {
78
+ const middlewares = postMiddlewares.map((post) => ({ post }));
79
+ return this.withMiddleware(...middlewares);
80
+ }
81
+ isJsonMime(mime) {
82
+ if (!mime) {
83
+ return false;
84
+ }
85
+ return BaseAPI.jsonRegex.test(mime);
86
+ }
87
+ async request(context, initOverrides) {
88
+ const { url, init } = await this.createFetchParams(context, initOverrides);
89
+ const response = await this.fetchApi(url, init);
90
+ if (response && (response.status >= 200 && response.status < 300)) {
91
+ return response;
92
+ }
93
+ throw new ResponseError(response, "Response returned an error code");
94
+ }
95
+ async createFetchParams(context, initOverrides) {
96
+ let url = this.configuration.basePath + context.path;
97
+ if (context.query !== undefined && Object.keys(context.query).length !== 0) {
98
+ url += "?" + this.configuration.queryParamsStringify(context.query);
99
+ }
100
+ const headers = Object.assign({}, this.configuration.headers, context.headers);
101
+ Object.keys(headers).forEach((key) => headers[key] === undefined ? delete headers[key] : {});
102
+ const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
103
+ const initParams = {
104
+ method: context.method,
105
+ headers,
106
+ body: context.body,
107
+ credentials: this.configuration.credentials
108
+ };
109
+ const overriddenInit = {
110
+ ...initParams,
111
+ ...await initOverrideFn({
112
+ init: initParams,
113
+ context
114
+ })
115
+ };
116
+ let body;
117
+ if (isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob(overriddenInit.body)) {
118
+ body = overriddenInit.body;
119
+ } else if (this.isJsonMime(headers["Content-Type"])) {
120
+ body = JSON.stringify(overriddenInit.body);
121
+ } else {
122
+ body = overriddenInit.body;
123
+ }
124
+ const init = {
125
+ ...overriddenInit,
126
+ body
127
+ };
128
+ return { url, init };
129
+ }
130
+ fetchApi = async (url, init) => {
131
+ let fetchParams = { url, init };
132
+ for (const middleware of this.middleware) {
133
+ if (middleware.pre) {
134
+ fetchParams = await middleware.pre({
135
+ fetch: this.fetchApi,
136
+ ...fetchParams
137
+ }) || fetchParams;
138
+ }
139
+ }
140
+ let response = undefined;
141
+ try {
142
+ response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
143
+ } catch (e) {
144
+ for (const middleware of this.middleware) {
145
+ if (middleware.onError) {
146
+ response = await middleware.onError({
147
+ fetch: this.fetchApi,
148
+ url: fetchParams.url,
149
+ init: fetchParams.init,
150
+ error: e,
151
+ response: response ? response.clone() : undefined
152
+ }) || response;
153
+ }
154
+ }
155
+ if (response === undefined) {
156
+ if (e instanceof Error) {
157
+ throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
158
+ } else {
159
+ throw e;
160
+ }
161
+ }
162
+ }
163
+ for (const middleware of this.middleware) {
164
+ if (middleware.post) {
165
+ response = await middleware.post({
166
+ fetch: this.fetchApi,
167
+ url: fetchParams.url,
168
+ init: fetchParams.init,
169
+ response: response.clone()
170
+ }) || response;
171
+ }
172
+ }
173
+ return response;
174
+ };
175
+ clone() {
176
+ const constructor = this.constructor;
177
+ const next = new constructor(this.configuration);
178
+ next.middleware = this.middleware.slice();
179
+ return next;
180
+ }
181
+ }
182
+ function isBlob(value) {
183
+ return typeof Blob !== "undefined" && value instanceof Blob;
184
+ }
185
+ function isFormData(value) {
186
+ return typeof FormData !== "undefined" && value instanceof FormData;
187
+ }
188
+
189
+ class ResponseError extends Error {
190
+ response;
191
+ name = "ResponseError";
192
+ constructor(response, msg) {
193
+ super(msg);
194
+ this.response = response;
195
+ }
196
+ }
197
+
198
+ class FetchError extends Error {
199
+ cause;
200
+ name = "FetchError";
201
+ constructor(cause, msg) {
202
+ super(msg);
203
+ this.cause = cause;
204
+ }
205
+ }
206
+
207
+ class RequiredError extends Error {
208
+ field;
209
+ name = "RequiredError";
210
+ constructor(field, msg) {
211
+ super(msg);
212
+ this.field = field;
213
+ }
214
+ }
215
+ function querystring(params, prefix = "") {
216
+ return Object.keys(params).map((key) => querystringSingleKey(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
217
+ }
218
+ function querystringSingleKey(key, value, keyPrefix = "") {
219
+ const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
220
+ if (value instanceof Array) {
221
+ const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
222
+ return `${encodeURIComponent(fullKey)}=${multiValue}`;
223
+ }
224
+ if (value instanceof Set) {
225
+ const valueAsArray = Array.from(value);
226
+ return querystringSingleKey(key, valueAsArray, keyPrefix);
227
+ }
228
+ if (value instanceof Date) {
229
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
230
+ }
231
+ if (value instanceof Object) {
232
+ return querystring(value, fullKey);
233
+ }
234
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
235
+ }
236
+ class JSONApiResponse {
237
+ raw;
238
+ transformer;
239
+ constructor(raw, transformer = (jsonValue) => jsonValue) {
240
+ this.raw = raw;
241
+ this.transformer = transformer;
242
+ }
243
+ async value() {
244
+ return this.transformer(await this.raw.json());
245
+ }
246
+ }
247
+
248
+ class VoidApiResponse {
249
+ raw;
250
+ constructor(raw) {
251
+ this.raw = raw;
252
+ }
253
+ async value() {
254
+ return;
255
+ }
256
+ }
257
+ // ../orchestrator-sdk/package.json
258
+ var package_default = {
259
+ name: "@uipath/orchestrator-sdk",
260
+ author: "UiPath",
261
+ license: "SEE LICENSE IN LICENSE.txt",
262
+ version: "1.204.0",
263
+ repository: {
264
+ type: "git",
265
+ url: "https://github.com/UiPath/cli.git",
266
+ directory: "packages/orchestrator-sdk"
267
+ },
268
+ publishConfig: {
269
+ registry: "https://npm.pkg.github.com/@uipath"
270
+ },
271
+ keywords: [
272
+ "uipath",
273
+ "orchestrator",
274
+ "sdk"
275
+ ],
276
+ type: "module",
277
+ main: "./dist/index.js",
278
+ types: "./dist/src/index.d.ts",
279
+ exports: {
280
+ ".": {
281
+ browser: {
282
+ types: "./dist/src/index.browser.d.ts",
283
+ default: "./dist/index.browser.js"
284
+ },
285
+ default: {
286
+ types: "./dist/src/index.d.ts",
287
+ default: "./dist/index.js"
288
+ }
289
+ }
290
+ },
291
+ files: [
292
+ "dist"
293
+ ],
294
+ private: true,
295
+ scripts: {
296
+ build: "bun build ./src/index.ts --outdir dist --format esm --target node --sourcemap=linked && bun build ./src/index.browser.ts --outdir dist --format esm --target browser --external @uipath/auth --external @uipath/common --sourcemap=linked && tsc -p tsconfig.build.json --noCheck",
297
+ generate: "bun run src/scripts/generate-sdk.ts",
298
+ lint: "biome check .",
299
+ test: "vitest run",
300
+ "test:coverage": "vitest run --coverage"
301
+ },
302
+ devDependencies: {
303
+ "@uipath/auth": "workspace:*",
304
+ "@uipath/common": "workspace:*",
305
+ "@openapitools/openapi-generator-cli": "^2.31.1",
306
+ "@types/node": "^25.5.2",
307
+ typescript: "^7.0.2"
308
+ }
309
+ };
310
+
311
+ // ../orchestrator-sdk/src/user-agent.ts
312
+ var SDK_USER_AGENT = getSdkUserAgentToken(package_default);
313
+ installSdkUserAgentHeader(BaseAPI, SDK_USER_AGENT);
314
+ // ../orchestrator-sdk/generated/src/models/BulkEnablePersonalWorkspacesDto.ts
315
+ function BulkEnablePersonalWorkspacesDtoToJSON(json) {
316
+ return BulkEnablePersonalWorkspacesDtoToJSONTyped(json, false);
317
+ }
318
+ function BulkEnablePersonalWorkspacesDtoToJSONTyped(value, ignoreDiscriminator = false) {
319
+ if (value == null) {
320
+ return value;
321
+ }
322
+ return {
323
+ LicenseTypes: value["licenseTypes"],
324
+ RestrictToPersonalWorkspace: value["restrictToPersonalWorkspace"]
325
+ };
326
+ }
327
+ // ../orchestrator-sdk/generated/src/models/ExtendedPersonalWorkspaceDto.ts
328
+ function ExtendedPersonalWorkspaceDtoFromJSON(json) {
329
+ return ExtendedPersonalWorkspaceDtoFromJSONTyped(json, false);
330
+ }
331
+ function ExtendedPersonalWorkspaceDtoFromJSONTyped(json, ignoreDiscriminator) {
332
+ if (json == null) {
333
+ return json;
334
+ }
335
+ return {
336
+ folderType: json["FolderType"] == null ? undefined : json["FolderType"],
337
+ key: json["Key"] == null ? undefined : json["Key"],
338
+ name: json["Name"] == null ? undefined : json["Name"],
339
+ isActive: json["IsActive"] == null ? undefined : json["IsActive"],
340
+ ownerId: json["OwnerId"] == null ? undefined : json["OwnerId"],
341
+ ownerKey: json["OwnerKey"] == null ? undefined : json["OwnerKey"],
342
+ ownerName: json["OwnerName"] == null ? undefined : json["OwnerName"],
343
+ lastLogin: json["LastLogin"] == null ? undefined : new Date(json["LastLogin"]),
344
+ exploringUserIds: json["ExploringUserIds"] == null ? undefined : json["ExploringUserIds"],
345
+ id: json["Id"] == null ? undefined : json["Id"]
346
+ };
347
+ }
348
+ // ../orchestrator-sdk/generated/src/models/PersonalWorkspaceDto.ts
349
+ function PersonalWorkspaceDtoFromJSON(json) {
350
+ return PersonalWorkspaceDtoFromJSONTyped(json, false);
351
+ }
352
+ function PersonalWorkspaceDtoFromJSONTyped(json, ignoreDiscriminator) {
353
+ if (json == null) {
354
+ return json;
355
+ }
356
+ return {
357
+ key: json["Key"] == null ? undefined : json["Key"],
358
+ name: json["Name"] == null ? undefined : json["Name"],
359
+ isActive: json["IsActive"] == null ? undefined : json["IsActive"],
360
+ ownerId: json["OwnerId"] == null ? undefined : json["OwnerId"],
361
+ ownerKey: json["OwnerKey"] == null ? undefined : json["OwnerKey"],
362
+ ownerName: json["OwnerName"] == null ? undefined : json["OwnerName"],
363
+ lastLogin: json["LastLogin"] == null ? undefined : new Date(json["LastLogin"]),
364
+ exploringUserIds: json["ExploringUserIds"] == null ? undefined : json["ExploringUserIds"],
365
+ id: json["Id"] == null ? undefined : json["Id"]
366
+ };
367
+ }
368
+
369
+ // ../orchestrator-sdk/generated/src/models/ODataValueOfIEnumerableOfPersonalWorkspaceDto.ts
370
+ function ODataValueOfIEnumerableOfPersonalWorkspaceDtoFromJSON(json) {
371
+ return ODataValueOfIEnumerableOfPersonalWorkspaceDtoFromJSONTyped(json, false);
372
+ }
373
+ function ODataValueOfIEnumerableOfPersonalWorkspaceDtoFromJSONTyped(json, ignoreDiscriminator) {
374
+ if (json == null) {
375
+ return json;
376
+ }
377
+ return {
378
+ value: json["value"] == null ? undefined : json["value"].map(PersonalWorkspaceDtoFromJSON)
379
+ };
380
+ }
381
+ // ../orchestrator-sdk/generated/src/models/ODataValueOfListOfPersonalWorkspaceDto.ts
382
+ function ODataValueOfListOfPersonalWorkspaceDtoFromJSON(json) {
383
+ return ODataValueOfListOfPersonalWorkspaceDtoFromJSONTyped(json, false);
384
+ }
385
+ function ODataValueOfListOfPersonalWorkspaceDtoFromJSONTyped(json, ignoreDiscriminator) {
386
+ if (json == null) {
387
+ return json;
388
+ }
389
+ return {
390
+ value: json["value"] == null ? undefined : json["value"].map(PersonalWorkspaceDtoFromJSON)
391
+ };
392
+ }
393
+ // ../orchestrator-sdk/generated/src/models/PersonalWorkspaceCreateOrphanedRequest.ts
394
+ function PersonalWorkspaceCreateOrphanedRequestToJSON(json) {
395
+ return PersonalWorkspaceCreateOrphanedRequestToJSONTyped(json, false);
396
+ }
397
+ function PersonalWorkspaceCreateOrphanedRequestToJSONTyped(value, ignoreDiscriminator = false) {
398
+ if (value == null) {
399
+ return value;
400
+ }
401
+ return {
402
+ UserNames: value["userNames"]
403
+ };
404
+ }
405
+ // ../orchestrator-sdk/generated/src/models/PersonalWorkspacesConvertToFolderRequest.ts
406
+ function PersonalWorkspacesConvertToFolderRequestToJSON(json) {
407
+ return PersonalWorkspacesConvertToFolderRequestToJSONTyped(json, false);
408
+ }
409
+ function PersonalWorkspacesConvertToFolderRequestToJSONTyped(value, ignoreDiscriminator = false) {
410
+ if (value == null) {
411
+ return value;
412
+ }
413
+ return {
414
+ folderName: value["folderName"]
415
+ };
416
+ }
417
+ // ../orchestrator-sdk/generated/src/apis/PersonalWorkspacesApi.ts
418
+ class PersonalWorkspacesApi extends BaseAPI {
419
+ async personalWorkspacesBulkEnablePersonalWorkspacesRaw(requestParameters, initOverrides) {
420
+ const queryParameters = {};
421
+ const headerParameters = {};
422
+ headerParameters["Content-Type"] = "application/json;odata.metadata=minimal;odata.streaming=true";
423
+ if (this.configuration && this.configuration.accessToken) {
424
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
425
+ }
426
+ let urlPath = `/odata/PersonalWorkspaces/UiPath.Server.Configuration.OData.BulkEnablePersonalWorkspaces`;
427
+ const response = await this.request({
428
+ path: urlPath,
429
+ method: "POST",
430
+ headers: headerParameters,
431
+ query: queryParameters,
432
+ body: BulkEnablePersonalWorkspacesDtoToJSON(requestParameters["body"])
433
+ }, initOverrides);
434
+ return new VoidApiResponse(response);
435
+ }
436
+ async personalWorkspacesBulkEnablePersonalWorkspaces(requestParameters = {}, initOverrides) {
437
+ await this.personalWorkspacesBulkEnablePersonalWorkspacesRaw(requestParameters, initOverrides);
438
+ }
439
+ async personalWorkspacesBulkStopExploringRaw(initOverrides) {
440
+ const queryParameters = {};
441
+ const headerParameters = {};
442
+ if (this.configuration && this.configuration.accessToken) {
443
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
444
+ }
445
+ let urlPath = `/odata/PersonalWorkspaces/UiPath.Server.Configuration.OData.BulkStopExploring`;
446
+ const response = await this.request({
447
+ path: urlPath,
448
+ method: "POST",
449
+ headers: headerParameters,
450
+ query: queryParameters
451
+ }, initOverrides);
452
+ return new VoidApiResponse(response);
453
+ }
454
+ async personalWorkspacesBulkStopExploring(initOverrides) {
455
+ await this.personalWorkspacesBulkStopExploringRaw(initOverrides);
456
+ }
457
+ async personalWorkspacesConvertToFolderByIdRaw(requestParameters, initOverrides) {
458
+ if (requestParameters["key"] == null) {
459
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling personalWorkspacesConvertToFolderById().');
460
+ }
461
+ const queryParameters = {};
462
+ const headerParameters = {};
463
+ headerParameters["Content-Type"] = "application/json;odata.metadata=minimal;odata.streaming=true";
464
+ if (this.configuration && this.configuration.accessToken) {
465
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
466
+ }
467
+ let urlPath = `/odata/PersonalWorkspaces({key})/UiPath.Server.Configuration.OData.ConvertToFolder`;
468
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
469
+ const response = await this.request({
470
+ path: urlPath,
471
+ method: "POST",
472
+ headers: headerParameters,
473
+ query: queryParameters,
474
+ body: PersonalWorkspacesConvertToFolderRequestToJSON(requestParameters["body"])
475
+ }, initOverrides);
476
+ return new VoidApiResponse(response);
477
+ }
478
+ async personalWorkspacesConvertToFolderById(requestParameters, initOverrides) {
479
+ await this.personalWorkspacesConvertToFolderByIdRaw(requestParameters, initOverrides);
480
+ }
481
+ async personalWorkspacesCreateOrphanedRaw(requestParameters, initOverrides) {
482
+ const queryParameters = {};
483
+ if (requestParameters["$select"] != null) {
484
+ queryParameters["$select"] = requestParameters["$select"];
485
+ }
486
+ if (requestParameters["$expand"] != null) {
487
+ queryParameters["$expand"] = requestParameters["$expand"];
488
+ }
489
+ if (requestParameters["$filter"] != null) {
490
+ queryParameters["$filter"] = requestParameters["$filter"];
491
+ }
492
+ if (requestParameters["$orderby"] != null) {
493
+ queryParameters["$orderby"] = requestParameters["$orderby"];
494
+ }
495
+ if (requestParameters["$count"] != null) {
496
+ queryParameters["$count"] = requestParameters["$count"];
497
+ }
498
+ const headerParameters = {};
499
+ headerParameters["Content-Type"] = "application/json;odata.metadata=minimal;odata.streaming=true";
500
+ if (this.configuration && this.configuration.accessToken) {
501
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
502
+ }
503
+ let urlPath = `/odata/PersonalWorkspaces/UiPath.Server.Configuration.OData.CreateOrphaned`;
504
+ const response = await this.request({
505
+ path: urlPath,
506
+ method: "POST",
507
+ headers: headerParameters,
508
+ query: queryParameters,
509
+ body: PersonalWorkspaceCreateOrphanedRequestToJSON(requestParameters["body"])
510
+ }, initOverrides);
511
+ return new JSONApiResponse(response, (jsonValue) => ODataValueOfListOfPersonalWorkspaceDtoFromJSON(jsonValue));
512
+ }
513
+ async personalWorkspacesCreateOrphaned(requestParameters = {}, initOverrides) {
514
+ const response = await this.personalWorkspacesCreateOrphanedRaw(requestParameters, initOverrides);
515
+ return await response.value();
516
+ }
517
+ async personalWorkspacesGetRaw(requestParameters, initOverrides) {
518
+ const queryParameters = {};
519
+ if (requestParameters["$select"] != null) {
520
+ queryParameters["$select"] = requestParameters["$select"];
521
+ }
522
+ if (requestParameters["$expand"] != null) {
523
+ queryParameters["$expand"] = requestParameters["$expand"];
524
+ }
525
+ if (requestParameters["$filter"] != null) {
526
+ queryParameters["$filter"] = requestParameters["$filter"];
527
+ }
528
+ if (requestParameters["$orderby"] != null) {
529
+ queryParameters["$orderby"] = requestParameters["$orderby"];
530
+ }
531
+ if (requestParameters["$top"] != null) {
532
+ queryParameters["$top"] = requestParameters["$top"];
533
+ }
534
+ if (requestParameters["$skip"] != null) {
535
+ queryParameters["$skip"] = requestParameters["$skip"];
536
+ }
537
+ if (requestParameters["$count"] != null) {
538
+ queryParameters["$count"] = requestParameters["$count"];
539
+ }
540
+ const headerParameters = {};
541
+ if (this.configuration && this.configuration.accessToken) {
542
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
543
+ }
544
+ let urlPath = `/odata/PersonalWorkspaces`;
545
+ const response = await this.request({
546
+ path: urlPath,
547
+ method: "GET",
548
+ headers: headerParameters,
549
+ query: queryParameters
550
+ }, initOverrides);
551
+ return new JSONApiResponse(response, (jsonValue) => ODataValueOfIEnumerableOfPersonalWorkspaceDtoFromJSON(jsonValue));
552
+ }
553
+ async personalWorkspacesGet(requestParameters = {}, initOverrides) {
554
+ const response = await this.personalWorkspacesGetRaw(requestParameters, initOverrides);
555
+ return await response.value();
556
+ }
557
+ async personalWorkspacesGetPersonalWorkspaceRaw(requestParameters, initOverrides) {
558
+ const queryParameters = {};
559
+ if (requestParameters["$select"] != null) {
560
+ queryParameters["$select"] = requestParameters["$select"];
561
+ }
562
+ if (requestParameters["$expand"] != null) {
563
+ queryParameters["$expand"] = requestParameters["$expand"];
564
+ }
565
+ const headerParameters = {};
566
+ if (this.configuration && this.configuration.accessToken) {
567
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
568
+ }
569
+ let urlPath = `/odata/PersonalWorkspaces/UiPath.Server.Configuration.OData.GetPersonalWorkspace`;
570
+ const response = await this.request({
571
+ path: urlPath,
572
+ method: "GET",
573
+ headers: headerParameters,
574
+ query: queryParameters
575
+ }, initOverrides);
576
+ return new JSONApiResponse(response, (jsonValue) => PersonalWorkspaceDtoFromJSON(jsonValue));
577
+ }
578
+ async personalWorkspacesGetPersonalWorkspace(requestParameters = {}, initOverrides) {
579
+ const response = await this.personalWorkspacesGetPersonalWorkspaceRaw(requestParameters, initOverrides);
580
+ return await response.value();
581
+ }
582
+ async personalWorkspacesStartExploringByIdRaw(requestParameters, initOverrides) {
583
+ if (requestParameters["key"] == null) {
584
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling personalWorkspacesStartExploringById().');
585
+ }
586
+ const queryParameters = {};
587
+ const headerParameters = {};
588
+ if (this.configuration && this.configuration.accessToken) {
589
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
590
+ }
591
+ let urlPath = `/odata/PersonalWorkspaces({key})/UiPath.Server.Configuration.OData.StartExploring`;
592
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
593
+ const response = await this.request({
594
+ path: urlPath,
595
+ method: "POST",
596
+ headers: headerParameters,
597
+ query: queryParameters
598
+ }, initOverrides);
599
+ return new VoidApiResponse(response);
600
+ }
601
+ async personalWorkspacesStartExploringById(requestParameters, initOverrides) {
602
+ await this.personalWorkspacesStartExploringByIdRaw(requestParameters, initOverrides);
603
+ }
604
+ async personalWorkspacesStopExploringByIdRaw(requestParameters, initOverrides) {
605
+ if (requestParameters["key"] == null) {
606
+ throw new RequiredError("key", 'Required parameter "key" was null or undefined when calling personalWorkspacesStopExploringById().');
607
+ }
608
+ const queryParameters = {};
609
+ const headerParameters = {};
610
+ if (this.configuration && this.configuration.accessToken) {
611
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
612
+ }
613
+ let urlPath = `/odata/PersonalWorkspaces({key})/UiPath.Server.Configuration.OData.StopExploring`;
614
+ urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters["key"])));
615
+ const response = await this.request({
616
+ path: urlPath,
617
+ method: "POST",
618
+ headers: headerParameters,
619
+ query: queryParameters
620
+ }, initOverrides);
621
+ return new VoidApiResponse(response);
622
+ }
623
+ async personalWorkspacesStopExploringById(requestParameters, initOverrides) {
624
+ await this.personalWorkspacesStopExploringByIdRaw(requestParameters, initOverrides);
625
+ }
626
+ async personalWorkspacesTryEnableRaw(requestParameters, initOverrides) {
627
+ const queryParameters = {};
628
+ if (requestParameters["$select"] != null) {
629
+ queryParameters["$select"] = requestParameters["$select"];
630
+ }
631
+ if (requestParameters["$expand"] != null) {
632
+ queryParameters["$expand"] = requestParameters["$expand"];
633
+ }
634
+ const headerParameters = {};
635
+ if (this.configuration && this.configuration.accessToken) {
636
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
637
+ }
638
+ let urlPath = `/odata/PersonalWorkspaces/UiPath.Server.Configuration.OData.TryEnable`;
639
+ const response = await this.request({
640
+ path: urlPath,
641
+ method: "POST",
642
+ headers: headerParameters,
643
+ query: queryParameters
644
+ }, initOverrides);
645
+ return new JSONApiResponse(response, (jsonValue) => ExtendedPersonalWorkspaceDtoFromJSON(jsonValue));
646
+ }
647
+ async personalWorkspacesTryEnable(requestParameters = {}, initOverrides) {
648
+ const response = await this.personalWorkspacesTryEnableRaw(requestParameters, initOverrides);
649
+ return await response.value();
650
+ }
651
+ }
652
+ // ../orchestrator-sdk/src/client-factory.ts
653
+ async function createOrchestratorConfig(options) {
654
+ const ctx = await getAuthContext({
655
+ tenant: options?.tenant,
656
+ ensureTokenValidityMinutes: options?.loginValidity,
657
+ envFilePath: options?.envFilePath
658
+ });
659
+ const orchestratorBasePath = ctx.organizationId && ctx.tenantName ? `${ctx.baseUrl}/${ctx.organizationId}/${ctx.tenantName}/orchestrator_` : ctx.baseUrl;
660
+ const headers = addSdkUserAgentHeader({
661
+ Authorization: `Bearer ${ctx.accessToken}`
662
+ }, SDK_USER_AGENT);
663
+ if (options?.folderId) {
664
+ headers["X-UIPATH-OrganizationUnitId"] = options.folderId;
665
+ } else if (options?.folderKey && options?.folderPath) {
666
+ throw new Error("Provide either folderKey or folderPath, not both.");
667
+ } else if (options?.folderKey) {
668
+ headers["X-UIPATH-FolderKey"] = options.folderKey;
669
+ } else if (options?.folderPath) {
670
+ headers["X-UIPATH-FolderPath"] = options.folderPath;
671
+ }
672
+ return new Configuration({
673
+ basePath: orchestratorBasePath,
674
+ headers
675
+ });
676
+ }
677
+ async function createApiClient(ApiClass, options) {
678
+ const config = await createOrchestratorConfig(options);
679
+ return new ApiClass(config);
680
+ }
681
+ export {
682
+ PersonalWorkspacesApi,
683
+ createApiClient
684
+ };
685
+
686
+ //# debugId=64883A0134306FD164756E2164756E21