@uipath/project-packager 1.202.1 → 1.203.0-preview.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.js +1993 -181
- package/dist/index.js +1947 -201
- package/dist/node.js +2352 -383
- package/dist/src/i18n/locales/en.d.ts +14 -7
- package/dist/src/index.d.ts +4 -3
- package/dist/src/node.d.ts +2 -2
- package/dist/src/services/governance-policy-service.d.ts +57 -4
- package/dist/src/services/pack-service.d.ts +18 -0
- package/dist/src/services/project-packager.d.ts +1 -1
- package/dist/tests/public-surface.spec.d.ts +1 -0
- package/package.json +7 -5
package/dist/browser.js
CHANGED
|
@@ -31,18 +31,25 @@ var de_default = {
|
|
|
31
31
|
info: {
|
|
32
32
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
33
33
|
saved: "Governance policy saved to {path}",
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
35
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
36
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
37
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
38
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
37
39
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
38
40
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
39
41
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
40
42
|
},
|
|
41
43
|
errors: {
|
|
42
|
-
connectionIncomplete: "Connection info incomplete,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
45
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
46
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
47
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
48
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
49
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
50
|
+
},
|
|
51
|
+
instructions: {
|
|
52
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
46
53
|
}
|
|
47
54
|
},
|
|
48
55
|
signing: {
|
|
@@ -116,18 +123,25 @@ var en = {
|
|
|
116
123
|
info: {
|
|
117
124
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
118
125
|
saved: "Governance policy saved to {path}",
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
126
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
127
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
128
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
129
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
130
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
122
131
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
123
132
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
124
133
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
125
134
|
},
|
|
126
135
|
errors: {
|
|
127
|
-
connectionIncomplete: "Connection info incomplete,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
136
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
137
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
138
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
139
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
140
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
141
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
142
|
+
},
|
|
143
|
+
instructions: {
|
|
144
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
131
145
|
}
|
|
132
146
|
},
|
|
133
147
|
signing: {
|
|
@@ -200,18 +214,25 @@ var es_default = {
|
|
|
200
214
|
info: {
|
|
201
215
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
202
216
|
saved: "Governance policy saved to {path}",
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
217
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
218
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
219
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
220
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
221
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
206
222
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
207
223
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
208
224
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
209
225
|
},
|
|
210
226
|
errors: {
|
|
211
|
-
connectionIncomplete: "Connection info incomplete,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
227
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
228
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
229
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
230
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
231
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
232
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
233
|
+
},
|
|
234
|
+
instructions: {
|
|
235
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
215
236
|
}
|
|
216
237
|
},
|
|
217
238
|
signing: {
|
|
@@ -284,18 +305,25 @@ var es_MX_default = {
|
|
|
284
305
|
info: {
|
|
285
306
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
286
307
|
saved: "Governance policy saved to {path}",
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
308
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
309
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
310
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
311
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
312
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
290
313
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
291
314
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
292
315
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
293
316
|
},
|
|
294
317
|
errors: {
|
|
295
|
-
connectionIncomplete: "Connection info incomplete,
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
318
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
319
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
320
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
321
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
322
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
323
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
324
|
+
},
|
|
325
|
+
instructions: {
|
|
326
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
299
327
|
}
|
|
300
328
|
},
|
|
301
329
|
signing: {
|
|
@@ -368,18 +396,25 @@ var fr_default = {
|
|
|
368
396
|
info: {
|
|
369
397
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
370
398
|
saved: "Governance policy saved to {path}",
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
399
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
400
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
401
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
402
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
403
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
374
404
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
375
405
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
376
406
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
377
407
|
},
|
|
378
408
|
errors: {
|
|
379
|
-
connectionIncomplete: "Connection info incomplete,
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
409
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
410
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
411
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
412
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
413
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
414
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
415
|
+
},
|
|
416
|
+
instructions: {
|
|
417
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
383
418
|
}
|
|
384
419
|
},
|
|
385
420
|
signing: {
|
|
@@ -452,18 +487,25 @@ var ja_default = {
|
|
|
452
487
|
info: {
|
|
453
488
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
454
489
|
saved: "Governance policy saved to {path}",
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
490
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
491
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
492
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
493
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
494
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
458
495
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
459
496
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
460
497
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
461
498
|
},
|
|
462
499
|
errors: {
|
|
463
|
-
connectionIncomplete: "Connection info incomplete,
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
500
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
501
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
502
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
503
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
504
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
505
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
506
|
+
},
|
|
507
|
+
instructions: {
|
|
508
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
467
509
|
}
|
|
468
510
|
},
|
|
469
511
|
signing: {
|
|
@@ -536,18 +578,25 @@ var ko_default = {
|
|
|
536
578
|
info: {
|
|
537
579
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
538
580
|
saved: "Governance policy saved to {path}",
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
581
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
582
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
583
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
584
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
585
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
542
586
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
543
587
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
544
588
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
545
589
|
},
|
|
546
590
|
errors: {
|
|
547
|
-
connectionIncomplete: "Connection info incomplete,
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
591
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
592
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
593
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
594
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
595
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
596
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
597
|
+
},
|
|
598
|
+
instructions: {
|
|
599
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
551
600
|
}
|
|
552
601
|
},
|
|
553
602
|
signing: {
|
|
@@ -620,18 +669,25 @@ var pt_default = {
|
|
|
620
669
|
info: {
|
|
621
670
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
622
671
|
saved: "Governance policy saved to {path}",
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
672
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
673
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
674
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
675
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
676
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
626
677
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
627
678
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
628
679
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
629
680
|
},
|
|
630
681
|
errors: {
|
|
631
|
-
connectionIncomplete: "Connection info incomplete,
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
682
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
683
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
684
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
685
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
686
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
687
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
688
|
+
},
|
|
689
|
+
instructions: {
|
|
690
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
635
691
|
}
|
|
636
692
|
},
|
|
637
693
|
signing: {
|
|
@@ -704,18 +760,25 @@ var pt_BR_default = {
|
|
|
704
760
|
info: {
|
|
705
761
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
706
762
|
saved: "Governance policy saved to {path}",
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
763
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
764
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
765
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
766
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
767
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
710
768
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
711
769
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
712
770
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
713
771
|
},
|
|
714
772
|
errors: {
|
|
715
|
-
connectionIncomplete: "Connection info incomplete,
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
773
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
774
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
775
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
776
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
777
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
778
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
779
|
+
},
|
|
780
|
+
instructions: {
|
|
781
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
719
782
|
}
|
|
720
783
|
},
|
|
721
784
|
signing: {
|
|
@@ -788,18 +851,25 @@ var ro_default = {
|
|
|
788
851
|
info: {
|
|
789
852
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
790
853
|
saved: "Governance policy saved to {path}",
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
854
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
855
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
856
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
857
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
858
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
794
859
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
795
860
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
796
861
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
797
862
|
},
|
|
798
863
|
errors: {
|
|
799
|
-
connectionIncomplete: "Connection info incomplete,
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
864
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
865
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
866
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
867
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
868
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
869
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
870
|
+
},
|
|
871
|
+
instructions: {
|
|
872
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
803
873
|
}
|
|
804
874
|
},
|
|
805
875
|
signing: {
|
|
@@ -872,18 +942,25 @@ var ru_default = {
|
|
|
872
942
|
info: {
|
|
873
943
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
874
944
|
saved: "Governance policy saved to {path}",
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
945
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
946
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
947
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
948
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
949
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
878
950
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
879
951
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
880
952
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
881
953
|
},
|
|
882
954
|
errors: {
|
|
883
|
-
connectionIncomplete: "Connection info incomplete,
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
955
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
956
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
957
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
958
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
959
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
960
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
961
|
+
},
|
|
962
|
+
instructions: {
|
|
963
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
887
964
|
}
|
|
888
965
|
},
|
|
889
966
|
signing: {
|
|
@@ -956,18 +1033,25 @@ var tr_default = {
|
|
|
956
1033
|
info: {
|
|
957
1034
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
958
1035
|
saved: "Governance policy saved to {path}",
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
1036
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
1037
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
1038
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
1039
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
1040
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
962
1041
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
963
1042
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
964
1043
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
965
1044
|
},
|
|
966
1045
|
errors: {
|
|
967
|
-
connectionIncomplete: "Connection info incomplete,
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1046
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
1047
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
1048
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
1049
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
1050
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
1051
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
1052
|
+
},
|
|
1053
|
+
instructions: {
|
|
1054
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
971
1055
|
}
|
|
972
1056
|
},
|
|
973
1057
|
signing: {
|
|
@@ -1040,18 +1124,25 @@ var zh_CN_default = {
|
|
|
1040
1124
|
info: {
|
|
1041
1125
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1042
1126
|
saved: "Governance policy saved to {path}",
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1127
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
1128
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
1129
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
1130
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
1131
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
1046
1132
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1047
1133
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1048
1134
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1049
1135
|
},
|
|
1050
1136
|
errors: {
|
|
1051
|
-
connectionIncomplete: "Connection info incomplete,
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1137
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
1138
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
1139
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
1140
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
1141
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
1142
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
1143
|
+
},
|
|
1144
|
+
instructions: {
|
|
1145
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
1055
1146
|
}
|
|
1056
1147
|
},
|
|
1057
1148
|
signing: {
|
|
@@ -1124,18 +1215,25 @@ var zh_TW_default = {
|
|
|
1124
1215
|
info: {
|
|
1125
1216
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1126
1217
|
saved: "Governance policy saved to {path}",
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1218
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
1219
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
1220
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
1221
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
1222
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
1130
1223
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1131
1224
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1132
1225
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1133
1226
|
},
|
|
1134
1227
|
errors: {
|
|
1135
|
-
connectionIncomplete: "Connection info incomplete,
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1228
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
1229
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
1230
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
1231
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
1232
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
1233
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
1234
|
+
},
|
|
1235
|
+
instructions: {
|
|
1236
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
1139
1237
|
}
|
|
1140
1238
|
},
|
|
1141
1239
|
signing: {
|
|
@@ -1208,18 +1306,25 @@ var zu_default = {
|
|
|
1208
1306
|
info: {
|
|
1209
1307
|
alreadyProvided: "Governance policy file already provided, skipping download.",
|
|
1210
1308
|
saved: "Governance policy saved to {path}",
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1309
|
+
resolving: "Asking AutomationOps for the {product} policy, license type {licenseType}.",
|
|
1310
|
+
ungoverned: "AutomationOps publishes no policy for this tenant. Analyzing with the rules shipped with the WorkflowCompiler.",
|
|
1311
|
+
suppliedFileHonoured: "AutomationOps publishes no policy for this tenant, so the supplied governance file is used: {path}",
|
|
1312
|
+
suppliedFileUnchecked: "Using the supplied governance file, but the tenant's own policy could not be checked: {path}",
|
|
1313
|
+
noTenantToAsk: "No signed-in tenant to ask about governance. Using the supplied governance file: {path}",
|
|
1214
1314
|
licenseStatus: "AcquireLicense returned {status}, using {fallback}.",
|
|
1215
1315
|
licenseResponse: "AcquireLicense: isLicensed={isLicensed}, robotType={robotType}",
|
|
1216
1316
|
licenseFailed: "AcquireLicense failed: {error}. Using {fallback}."
|
|
1217
1317
|
},
|
|
1218
1318
|
errors: {
|
|
1219
|
-
connectionIncomplete: "Connection info incomplete,
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1319
|
+
connectionIncomplete: "Connection info is incomplete, so the tenant could not be asked about governance.",
|
|
1320
|
+
unknownOutcome: "Could not tell whether this tenant is governed ({reason}): {detail} Asked {url}.",
|
|
1321
|
+
retryAfter: "The policy service asked for {seconds} seconds before another try.",
|
|
1322
|
+
tenantPolicyWins: "The AutomationOps policy published for {product} applies to this tenant, so the governance file at {path} cannot replace it.",
|
|
1323
|
+
failedToSave: "Failed to save governance policy: {error}",
|
|
1324
|
+
fallingBackToDefault: "{reason} Analyzing with the rules shipped with the WorkflowCompiler."
|
|
1325
|
+
},
|
|
1326
|
+
instructions: {
|
|
1327
|
+
tenantPolicyWins: "Drop --governance-file-path so the tenant's policy is used, or ask an administrator to change the policy published in AutomationOps."
|
|
1223
1328
|
}
|
|
1224
1329
|
},
|
|
1225
1330
|
signing: {
|
|
@@ -1281,6 +1386,7 @@ I18nManager.registerTranslations("zu", zu_default);
|
|
|
1281
1386
|
|
|
1282
1387
|
// ../../common/dist/index.browser.js
|
|
1283
1388
|
import { getFileSystem } from "@uipath/filesystem";
|
|
1389
|
+
import { getFileSystem as getFileSystem2 } from "@uipath/filesystem";
|
|
1284
1390
|
var __create = Object.create;
|
|
1285
1391
|
var __getProtoOf = Object.getPrototypeOf;
|
|
1286
1392
|
var __defProp = Object.defineProperty;
|
|
@@ -1348,7 +1454,7 @@ var __export = (target, all) => {
|
|
|
1348
1454
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
1349
1455
|
var exports_buffer = {};
|
|
1350
1456
|
__export(exports_buffer, {
|
|
1351
|
-
Blob: () =>
|
|
1457
|
+
Blob: () => Blob2,
|
|
1352
1458
|
Buffer: () => Buffer2,
|
|
1353
1459
|
File: () => File,
|
|
1354
1460
|
INSPECT_MAX_BYTES: () => INSPECT_MAX_BYTES,
|
|
@@ -2042,7 +2148,7 @@ var kStringMaxLength = 536870888;
|
|
|
2042
2148
|
var btoa;
|
|
2043
2149
|
var atob;
|
|
2044
2150
|
var File;
|
|
2045
|
-
var
|
|
2151
|
+
var Blob2;
|
|
2046
2152
|
var constants;
|
|
2047
2153
|
var ERR_BUFFER_OUT_OF_BOUNDS;
|
|
2048
2154
|
var ERR_INVALID_ARG_TYPE;
|
|
@@ -2071,7 +2177,7 @@ var init_buffer = __esm(() => {
|
|
|
2071
2177
|
btoa = globalThis.btoa;
|
|
2072
2178
|
atob = globalThis.atob;
|
|
2073
2179
|
File = globalThis.File;
|
|
2074
|
-
|
|
2180
|
+
Blob2 = globalThis.Blob;
|
|
2075
2181
|
constants = { MAX_LENGTH: kMaxLength, MAX_STRING_LENGTH: kStringMaxLength };
|
|
2076
2182
|
ERR_BUFFER_OUT_OF_BOUNDS = E("ERR_BUFFER_OUT_OF_BOUNDS", function(name) {
|
|
2077
2183
|
if (name)
|
|
@@ -4165,8 +4271,8 @@ var require_stream = __commonJS(function(exports, module) {
|
|
|
4165
4271
|
module2.exports.AbortSignal = AbortSignal;
|
|
4166
4272
|
});
|
|
4167
4273
|
var require_util = __commonJS2((exports2, module2) => {
|
|
4168
|
-
var bufferModule = (init_buffer(), __toCommonJS(exports_buffer)), { format: format2, inspect: inspect2 } = require_inspect(), { codes: { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE3 } } = require_errors(), { kResistStopPropagation, AggregateError: AggregateError2, SymbolDispose } = require_primordials(), AbortSignal = globalThis.AbortSignal || require_abort_controller().AbortSignal, AbortController2 = globalThis.AbortController || require_abort_controller().AbortController, AsyncFunction = Object.getPrototypeOf(async function() {}).constructor,
|
|
4169
|
-
return b instanceof
|
|
4274
|
+
var bufferModule = (init_buffer(), __toCommonJS(exports_buffer)), { format: format2, inspect: inspect2 } = require_inspect(), { codes: { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE3 } } = require_errors(), { kResistStopPropagation, AggregateError: AggregateError2, SymbolDispose } = require_primordials(), AbortSignal = globalThis.AbortSignal || require_abort_controller().AbortSignal, AbortController2 = globalThis.AbortController || require_abort_controller().AbortController, AsyncFunction = Object.getPrototypeOf(async function() {}).constructor, Blob22 = globalThis.Blob || bufferModule.Blob, isBlob = typeof Blob22 < "u" ? function(b) {
|
|
4275
|
+
return b instanceof Blob22;
|
|
4170
4276
|
} : function(b) {
|
|
4171
4277
|
return false;
|
|
4172
4278
|
}, validateAbortSignal2 = (signal, name) => {
|
|
@@ -6426,8 +6532,8 @@ var require_stream = __commonJS(function(exports, module) {
|
|
|
6426
6532
|
};
|
|
6427
6533
|
});
|
|
6428
6534
|
var require_duplexify = __commonJS2((exports2, module2) => {
|
|
6429
|
-
var process2 = require_process(), bufferModule = (init_buffer(), __toCommonJS(exports_buffer)), { isReadable, isWritable, isIterable, isNodeStream, isReadableNodeStream, isWritableNodeStream, isDuplexNodeStream, isReadableStream, isWritableStream } = require_utils(), eos = require_end_of_stream(), { AbortError: AbortError2, codes: { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE3, ERR_INVALID_RETURN_VALUE } } = require_errors(), { destroyer } = require_destroy(), Duplex = require_duplex(), Readable = require_readable(), Writable = require_writable(), { createDeferredPromise } = require_util(), from2 = require_from(),
|
|
6430
|
-
return b instanceof
|
|
6535
|
+
var process2 = require_process(), bufferModule = (init_buffer(), __toCommonJS(exports_buffer)), { isReadable, isWritable, isIterable, isNodeStream, isReadableNodeStream, isWritableNodeStream, isDuplexNodeStream, isReadableStream, isWritableStream } = require_utils(), eos = require_end_of_stream(), { AbortError: AbortError2, codes: { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE3, ERR_INVALID_RETURN_VALUE } } = require_errors(), { destroyer } = require_destroy(), Duplex = require_duplex(), Readable = require_readable(), Writable = require_writable(), { createDeferredPromise } = require_util(), from2 = require_from(), Blob22 = globalThis.Blob || bufferModule.Blob, isBlob = typeof Blob22 < "u" ? function(b) {
|
|
6536
|
+
return b instanceof Blob22;
|
|
6431
6537
|
} : function(b) {
|
|
6432
6538
|
return false;
|
|
6433
6539
|
}, AbortController2 = globalThis.AbortController || require_abort_controller().AbortController, { FunctionPrototypeCall } = require_primordials();
|
|
@@ -22456,7 +22562,7 @@ var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{1
|
|
|
22456
22562
|
var EMAIL_PATTERN = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
22457
22563
|
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
22458
22564
|
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
22459
|
-
var PADDED_BASE64_PATTERN = /[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
22565
|
+
var PADDED_BASE64_PATTERN = /(?<![A-Za-z0-9+/])[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
|
|
22460
22566
|
var BASE64_WITH_PLUS_PATTERN = /[A-Za-z0-9+/]{40,}/g;
|
|
22461
22567
|
var USER_HOME_PATTERN = /(?<![A-Za-z0-9._-])([/\\])(Users|home|Profiles)([/\\])([^/\\]+)/gi;
|
|
22462
22568
|
var UNC_PATH_PATTERN = /(^|[\s"'<>|=,;([{])(\\\\[^\s"'<>|]+)/g;
|
|
@@ -22503,7 +22609,7 @@ var QUOTED_LITERAL_PATTERN = new RegExp([
|
|
|
22503
22609
|
`(?<![A-Za-z0-9])"(?:[^\\
|
|
22504
22610
|
]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?"(?![A-Za-z0-9])`
|
|
22505
22611
|
].join("|"), "g");
|
|
22506
|
-
var JSON_BODY_PATTERN = /[{[][^{}[\]]*[:,][^{}[\]]*[\]}]/g;
|
|
22612
|
+
var JSON_BODY_PATTERN = /[{[][^{}[\]:,]*[:,][^{}[\]]*[\]}]/g;
|
|
22507
22613
|
var COLLAPSED_BODY = "{…}";
|
|
22508
22614
|
var COLLAPSED_BODY_MARKER = "\x01body\x01";
|
|
22509
22615
|
var MAX_BODY_NESTING = 8;
|
|
@@ -22518,10 +22624,13 @@ function collapseJsonBodies(text) {
|
|
|
22518
22624
|
}
|
|
22519
22625
|
return out.split(COLLAPSED_BODY_MARKER).join(COLLAPSED_BODY);
|
|
22520
22626
|
}
|
|
22521
|
-
var TRAILING_PROSE_PUNCT =
|
|
22627
|
+
var TRAILING_PROSE_PUNCT = `.,;:!?)]}>'"`;
|
|
22522
22628
|
function peelTrailingPunctuation(match) {
|
|
22523
|
-
|
|
22524
|
-
|
|
22629
|
+
let end = match.length;
|
|
22630
|
+
while (end > 0 && TRAILING_PROSE_PUNCT.includes(match[end - 1])) {
|
|
22631
|
+
end -= 1;
|
|
22632
|
+
}
|
|
22633
|
+
return [match.slice(0, end), match.slice(end)];
|
|
22525
22634
|
}
|
|
22526
22635
|
function redactUrl(raw) {
|
|
22527
22636
|
try {
|
|
@@ -22978,6 +23087,12 @@ var TLS_ERROR_CODES = new Set([
|
|
|
22978
23087
|
var TLS_INSTRUCTIONS = "The server's TLS certificate could not be verified. Most often a " + "corporate proxy/firewall re-signs HTTPS with a root CA that Node does " + "not trust — set NODE_EXTRA_CA_CERTS to that CA's PEM file (and HTTPS_PROXY " + "if you connect through a proxy). If the certificate is instead expired or " + "its hostname does not match, fix the endpoint URL or the system clock. " + "Then retry.";
|
|
22979
23088
|
var NETWORK_INSTRUCTIONS = "Could not reach the UiPath service. Check your network connection and " + "VPN, confirm any HTTP_PROXY/HTTPS_PROXY/NO_PROXY settings are correct, " + "then retry.";
|
|
22980
23089
|
var LOCAL_PERMISSION_ERROR_CODES = new Set(["EACCES", "EPERM", "EROFS"]);
|
|
23090
|
+
function carriedInstructions(error) {
|
|
23091
|
+
if (!error || typeof error !== "object")
|
|
23092
|
+
return;
|
|
23093
|
+
const e = error;
|
|
23094
|
+
return typeof e.instructions === "string" ? e.instructions : undefined;
|
|
23095
|
+
}
|
|
22981
23096
|
var logFilePathSlot = singleton("logFilePath");
|
|
22982
23097
|
function setGlobalLogFilePath(path) {
|
|
22983
23098
|
logFilePathSlot.set(path);
|
|
@@ -23966,11 +24081,1657 @@ import {
|
|
|
23966
24081
|
ZipService
|
|
23967
24082
|
} from "@uipath/solutionpackager-tool-core";
|
|
23968
24083
|
|
|
24084
|
+
// ../../gov/aops-policy-sdk/dist/policy-resolver.js
|
|
24085
|
+
var {createRequire} = (() => ({}));
|
|
24086
|
+
var BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
24087
|
+
|
|
24088
|
+
class Configuration {
|
|
24089
|
+
configuration;
|
|
24090
|
+
constructor(configuration = {}) {
|
|
24091
|
+
this.configuration = configuration;
|
|
24092
|
+
}
|
|
24093
|
+
set config(configuration) {
|
|
24094
|
+
this.configuration = configuration;
|
|
24095
|
+
}
|
|
24096
|
+
get basePath() {
|
|
24097
|
+
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
|
|
24098
|
+
}
|
|
24099
|
+
get fetchApi() {
|
|
24100
|
+
return this.configuration.fetchApi;
|
|
24101
|
+
}
|
|
24102
|
+
get middleware() {
|
|
24103
|
+
return this.configuration.middleware || [];
|
|
24104
|
+
}
|
|
24105
|
+
get queryParamsStringify() {
|
|
24106
|
+
return this.configuration.queryParamsStringify || querystring;
|
|
24107
|
+
}
|
|
24108
|
+
get username() {
|
|
24109
|
+
return this.configuration.username;
|
|
24110
|
+
}
|
|
24111
|
+
get password() {
|
|
24112
|
+
return this.configuration.password;
|
|
24113
|
+
}
|
|
24114
|
+
get apiKey() {
|
|
24115
|
+
const apiKey = this.configuration.apiKey;
|
|
24116
|
+
if (apiKey) {
|
|
24117
|
+
return typeof apiKey === "function" ? apiKey : () => apiKey;
|
|
24118
|
+
}
|
|
24119
|
+
return;
|
|
24120
|
+
}
|
|
24121
|
+
get accessToken() {
|
|
24122
|
+
const accessToken = this.configuration.accessToken;
|
|
24123
|
+
if (accessToken) {
|
|
24124
|
+
return typeof accessToken === "function" ? accessToken : async () => accessToken;
|
|
24125
|
+
}
|
|
24126
|
+
return;
|
|
24127
|
+
}
|
|
24128
|
+
get headers() {
|
|
24129
|
+
return this.configuration.headers;
|
|
24130
|
+
}
|
|
24131
|
+
get credentials() {
|
|
24132
|
+
return this.configuration.credentials;
|
|
24133
|
+
}
|
|
24134
|
+
}
|
|
24135
|
+
var DefaultConfig = new Configuration;
|
|
24136
|
+
|
|
24137
|
+
class BaseAPI {
|
|
24138
|
+
configuration;
|
|
24139
|
+
static jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i");
|
|
24140
|
+
middleware;
|
|
24141
|
+
constructor(configuration = DefaultConfig) {
|
|
24142
|
+
this.configuration = configuration;
|
|
24143
|
+
this.middleware = configuration.middleware;
|
|
24144
|
+
}
|
|
24145
|
+
withMiddleware(...middlewares) {
|
|
24146
|
+
const next = this.clone();
|
|
24147
|
+
next.middleware = next.middleware.concat(...middlewares);
|
|
24148
|
+
return next;
|
|
24149
|
+
}
|
|
24150
|
+
withPreMiddleware(...preMiddlewares) {
|
|
24151
|
+
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
|
24152
|
+
return this.withMiddleware(...middlewares);
|
|
24153
|
+
}
|
|
24154
|
+
withPostMiddleware(...postMiddlewares) {
|
|
24155
|
+
const middlewares = postMiddlewares.map((post) => ({ post }));
|
|
24156
|
+
return this.withMiddleware(...middlewares);
|
|
24157
|
+
}
|
|
24158
|
+
isJsonMime(mime) {
|
|
24159
|
+
if (!mime) {
|
|
24160
|
+
return false;
|
|
24161
|
+
}
|
|
24162
|
+
return BaseAPI.jsonRegex.test(mime);
|
|
24163
|
+
}
|
|
24164
|
+
async request(context, initOverrides) {
|
|
24165
|
+
const { url, init } = await this.createFetchParams(context, initOverrides);
|
|
24166
|
+
const response = await this.fetchApi(url, init);
|
|
24167
|
+
if (response && (response.status >= 200 && response.status < 300)) {
|
|
24168
|
+
return response;
|
|
24169
|
+
}
|
|
24170
|
+
throw new ResponseError(response, "Response returned an error code");
|
|
24171
|
+
}
|
|
24172
|
+
async createFetchParams(context, initOverrides) {
|
|
24173
|
+
let url = this.configuration.basePath + context.path;
|
|
24174
|
+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
24175
|
+
url += "?" + this.configuration.queryParamsStringify(context.query);
|
|
24176
|
+
}
|
|
24177
|
+
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
24178
|
+
Object.keys(headers).forEach((key) => headers[key] === undefined ? delete headers[key] : {});
|
|
24179
|
+
const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
|
|
24180
|
+
const initParams = {
|
|
24181
|
+
method: context.method,
|
|
24182
|
+
headers,
|
|
24183
|
+
body: context.body,
|
|
24184
|
+
credentials: this.configuration.credentials
|
|
24185
|
+
};
|
|
24186
|
+
const overriddenInit = {
|
|
24187
|
+
...initParams,
|
|
24188
|
+
...await initOverrideFn({
|
|
24189
|
+
init: initParams,
|
|
24190
|
+
context
|
|
24191
|
+
})
|
|
24192
|
+
};
|
|
24193
|
+
let body;
|
|
24194
|
+
if (isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob(overriddenInit.body)) {
|
|
24195
|
+
body = overriddenInit.body;
|
|
24196
|
+
} else if (this.isJsonMime(headers["Content-Type"])) {
|
|
24197
|
+
body = JSON.stringify(overriddenInit.body);
|
|
24198
|
+
} else {
|
|
24199
|
+
body = overriddenInit.body;
|
|
24200
|
+
}
|
|
24201
|
+
const init = {
|
|
24202
|
+
...overriddenInit,
|
|
24203
|
+
body
|
|
24204
|
+
};
|
|
24205
|
+
return { url, init };
|
|
24206
|
+
}
|
|
24207
|
+
fetchApi = async (url, init) => {
|
|
24208
|
+
let fetchParams = { url, init };
|
|
24209
|
+
for (const middleware of this.middleware) {
|
|
24210
|
+
if (middleware.pre) {
|
|
24211
|
+
fetchParams = await middleware.pre({
|
|
24212
|
+
fetch: this.fetchApi,
|
|
24213
|
+
...fetchParams
|
|
24214
|
+
}) || fetchParams;
|
|
24215
|
+
}
|
|
24216
|
+
}
|
|
24217
|
+
let response = undefined;
|
|
24218
|
+
try {
|
|
24219
|
+
response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
|
24220
|
+
} catch (e) {
|
|
24221
|
+
for (const middleware of this.middleware) {
|
|
24222
|
+
if (middleware.onError) {
|
|
24223
|
+
response = await middleware.onError({
|
|
24224
|
+
fetch: this.fetchApi,
|
|
24225
|
+
url: fetchParams.url,
|
|
24226
|
+
init: fetchParams.init,
|
|
24227
|
+
error: e,
|
|
24228
|
+
response: response ? response.clone() : undefined
|
|
24229
|
+
}) || response;
|
|
24230
|
+
}
|
|
24231
|
+
}
|
|
24232
|
+
if (response === undefined) {
|
|
24233
|
+
if (e instanceof Error) {
|
|
24234
|
+
throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
|
|
24235
|
+
} else {
|
|
24236
|
+
throw e;
|
|
24237
|
+
}
|
|
24238
|
+
}
|
|
24239
|
+
}
|
|
24240
|
+
for (const middleware of this.middleware) {
|
|
24241
|
+
if (middleware.post) {
|
|
24242
|
+
response = await middleware.post({
|
|
24243
|
+
fetch: this.fetchApi,
|
|
24244
|
+
url: fetchParams.url,
|
|
24245
|
+
init: fetchParams.init,
|
|
24246
|
+
response: response.clone()
|
|
24247
|
+
}) || response;
|
|
24248
|
+
}
|
|
24249
|
+
}
|
|
24250
|
+
return response;
|
|
24251
|
+
};
|
|
24252
|
+
clone() {
|
|
24253
|
+
const constructor = this.constructor;
|
|
24254
|
+
const next = new constructor(this.configuration);
|
|
24255
|
+
next.middleware = this.middleware.slice();
|
|
24256
|
+
return next;
|
|
24257
|
+
}
|
|
24258
|
+
}
|
|
24259
|
+
function isBlob(value) {
|
|
24260
|
+
return typeof Blob !== "undefined" && value instanceof Blob;
|
|
24261
|
+
}
|
|
24262
|
+
function isFormData(value) {
|
|
24263
|
+
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
24264
|
+
}
|
|
24265
|
+
|
|
24266
|
+
class ResponseError extends Error {
|
|
24267
|
+
response;
|
|
24268
|
+
name = "ResponseError";
|
|
24269
|
+
constructor(response, msg) {
|
|
24270
|
+
super(msg);
|
|
24271
|
+
this.response = response;
|
|
24272
|
+
}
|
|
24273
|
+
}
|
|
24274
|
+
|
|
24275
|
+
class FetchError extends Error {
|
|
24276
|
+
cause;
|
|
24277
|
+
name = "FetchError";
|
|
24278
|
+
constructor(cause, msg) {
|
|
24279
|
+
super(msg);
|
|
24280
|
+
this.cause = cause;
|
|
24281
|
+
}
|
|
24282
|
+
}
|
|
24283
|
+
|
|
24284
|
+
class RequiredError extends Error {
|
|
24285
|
+
field;
|
|
24286
|
+
name = "RequiredError";
|
|
24287
|
+
constructor(field, msg) {
|
|
24288
|
+
super(msg);
|
|
24289
|
+
this.field = field;
|
|
24290
|
+
}
|
|
24291
|
+
}
|
|
24292
|
+
function querystring(params, prefix = "") {
|
|
24293
|
+
return Object.keys(params).map((key) => querystringSingleKey(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
|
|
24294
|
+
}
|
|
24295
|
+
function querystringSingleKey(key, value, keyPrefix = "") {
|
|
24296
|
+
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
|
24297
|
+
if (value instanceof Array) {
|
|
24298
|
+
const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
|
|
24299
|
+
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
|
24300
|
+
}
|
|
24301
|
+
if (value instanceof Set) {
|
|
24302
|
+
const valueAsArray = Array.from(value);
|
|
24303
|
+
return querystringSingleKey(key, valueAsArray, keyPrefix);
|
|
24304
|
+
}
|
|
24305
|
+
if (value instanceof Date) {
|
|
24306
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
|
24307
|
+
}
|
|
24308
|
+
if (value instanceof Object) {
|
|
24309
|
+
return querystring(value, fullKey);
|
|
24310
|
+
}
|
|
24311
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
24312
|
+
}
|
|
24313
|
+
function canConsumeForm(consumes) {
|
|
24314
|
+
for (const consume of consumes) {
|
|
24315
|
+
if (consume.contentType === "multipart/form-data") {
|
|
24316
|
+
return true;
|
|
24317
|
+
}
|
|
24318
|
+
}
|
|
24319
|
+
return false;
|
|
24320
|
+
}
|
|
24321
|
+
|
|
24322
|
+
class JSONApiResponse {
|
|
24323
|
+
raw;
|
|
24324
|
+
transformer;
|
|
24325
|
+
constructor(raw, transformer = (jsonValue) => jsonValue) {
|
|
24326
|
+
this.raw = raw;
|
|
24327
|
+
this.transformer = transformer;
|
|
24328
|
+
}
|
|
24329
|
+
async value() {
|
|
24330
|
+
return this.transformer(await this.raw.json());
|
|
24331
|
+
}
|
|
24332
|
+
}
|
|
24333
|
+
|
|
24334
|
+
class VoidApiResponse {
|
|
24335
|
+
raw;
|
|
24336
|
+
constructor(raw) {
|
|
24337
|
+
this.raw = raw;
|
|
24338
|
+
}
|
|
24339
|
+
async value() {
|
|
24340
|
+
return;
|
|
24341
|
+
}
|
|
24342
|
+
}
|
|
24343
|
+
class TextApiResponse {
|
|
24344
|
+
raw;
|
|
24345
|
+
constructor(raw) {
|
|
24346
|
+
this.raw = raw;
|
|
24347
|
+
}
|
|
24348
|
+
async value() {
|
|
24349
|
+
return await this.raw.text();
|
|
24350
|
+
}
|
|
24351
|
+
}
|
|
24352
|
+
function ProductDtoFromJSON(json) {
|
|
24353
|
+
return ProductDtoFromJSONTyped(json, false);
|
|
24354
|
+
}
|
|
24355
|
+
function ProductDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
24356
|
+
if (json == null) {
|
|
24357
|
+
return json;
|
|
24358
|
+
}
|
|
24359
|
+
return {
|
|
24360
|
+
name: json["name"] == null ? undefined : json["name"],
|
|
24361
|
+
label: json["label"] == null ? undefined : json["label"],
|
|
24362
|
+
isRestricted: json["isRestricted"] == null ? undefined : json["isRestricted"],
|
|
24363
|
+
isCloud: json["isCloud"] == null ? undefined : json["isCloud"],
|
|
24364
|
+
isRemote: json["isRemote"] == null ? undefined : json["isRemote"]
|
|
24365
|
+
};
|
|
24366
|
+
}
|
|
24367
|
+
function ProductDtoToJSON(json) {
|
|
24368
|
+
return ProductDtoToJSONTyped(json, false);
|
|
24369
|
+
}
|
|
24370
|
+
function ProductDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24371
|
+
if (value == null) {
|
|
24372
|
+
return value;
|
|
24373
|
+
}
|
|
24374
|
+
return {
|
|
24375
|
+
name: value["name"],
|
|
24376
|
+
label: value["label"],
|
|
24377
|
+
isRestricted: value["isRestricted"],
|
|
24378
|
+
isCloud: value["isCloud"],
|
|
24379
|
+
isRemote: value["isRemote"]
|
|
24380
|
+
};
|
|
24381
|
+
}
|
|
24382
|
+
function GlobalPolicyDtoFromJSON(json) {
|
|
24383
|
+
return GlobalPolicyDtoFromJSONTyped(json, false);
|
|
24384
|
+
}
|
|
24385
|
+
function GlobalPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
24386
|
+
if (json == null) {
|
|
24387
|
+
return json;
|
|
24388
|
+
}
|
|
24389
|
+
return {
|
|
24390
|
+
licenseType: json["licenseType"] == null ? undefined : json["licenseType"],
|
|
24391
|
+
identifier: json["identifier"] == null ? undefined : json["identifier"],
|
|
24392
|
+
policyNumber: json["policyNumber"] == null ? undefined : json["policyNumber"],
|
|
24393
|
+
product: json["product"] == null ? undefined : ProductDtoFromJSON(json["product"]),
|
|
24394
|
+
data: json["data"] == null ? undefined : json["data"]
|
|
24395
|
+
};
|
|
24396
|
+
}
|
|
24397
|
+
function GlobalPolicyDtoToJSON(json) {
|
|
24398
|
+
return GlobalPolicyDtoToJSONTyped(json, false);
|
|
24399
|
+
}
|
|
24400
|
+
function GlobalPolicyDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24401
|
+
if (value == null) {
|
|
24402
|
+
return value;
|
|
24403
|
+
}
|
|
24404
|
+
return {
|
|
24405
|
+
licenseType: value["licenseType"],
|
|
24406
|
+
identifier: value["identifier"],
|
|
24407
|
+
policyNumber: value["policyNumber"],
|
|
24408
|
+
product: ProductDtoToJSON(value["product"]),
|
|
24409
|
+
data: value["data"]
|
|
24410
|
+
};
|
|
24411
|
+
}
|
|
24412
|
+
function CreateGlobalPolicyWithFormDataRequestToJSON(json) {
|
|
24413
|
+
return CreateGlobalPolicyWithFormDataRequestToJSONTyped(json, false);
|
|
24414
|
+
}
|
|
24415
|
+
function CreateGlobalPolicyWithFormDataRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24416
|
+
if (value == null) {
|
|
24417
|
+
return value;
|
|
24418
|
+
}
|
|
24419
|
+
return {
|
|
24420
|
+
globalPolicy: GlobalPolicyDtoToJSON(value["globalPolicy"])
|
|
24421
|
+
};
|
|
24422
|
+
}
|
|
24423
|
+
function CreatePolicyRequestToJSON(json) {
|
|
24424
|
+
return CreatePolicyRequestToJSONTyped(json, false);
|
|
24425
|
+
}
|
|
24426
|
+
function CreatePolicyRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24427
|
+
if (value == null) {
|
|
24428
|
+
return value;
|
|
24429
|
+
}
|
|
24430
|
+
return {
|
|
24431
|
+
name: value["name"],
|
|
24432
|
+
description: value["description"],
|
|
24433
|
+
priority: value["priority"],
|
|
24434
|
+
availability: value["availability"],
|
|
24435
|
+
productName: value["productName"],
|
|
24436
|
+
data: value["data"]
|
|
24437
|
+
};
|
|
24438
|
+
}
|
|
24439
|
+
function FormDataDtoFromJSON(json) {
|
|
24440
|
+
return FormDataDtoFromJSONTyped(json, false);
|
|
24441
|
+
}
|
|
24442
|
+
function FormDataDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
24443
|
+
if (json == null) {
|
|
24444
|
+
return json;
|
|
24445
|
+
}
|
|
24446
|
+
return {
|
|
24447
|
+
policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
|
|
24448
|
+
data: json["data"] == null ? undefined : json["data"]
|
|
24449
|
+
};
|
|
24450
|
+
}
|
|
24451
|
+
function FormDataDtoToJSON(json) {
|
|
24452
|
+
return FormDataDtoToJSONTyped(json, false);
|
|
24453
|
+
}
|
|
24454
|
+
function FormDataDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24455
|
+
if (value == null) {
|
|
24456
|
+
return value;
|
|
24457
|
+
}
|
|
24458
|
+
return {
|
|
24459
|
+
policyIdentifier: value["policyIdentifier"],
|
|
24460
|
+
data: value["data"]
|
|
24461
|
+
};
|
|
24462
|
+
}
|
|
24463
|
+
function PolicyDtoFromJSON(json) {
|
|
24464
|
+
return PolicyDtoFromJSONTyped(json, false);
|
|
24465
|
+
}
|
|
24466
|
+
function PolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
24467
|
+
if (json == null) {
|
|
24468
|
+
return json;
|
|
24469
|
+
}
|
|
24470
|
+
return {
|
|
24471
|
+
name: json["name"] == null ? undefined : json["name"],
|
|
24472
|
+
identifier: json["identifier"] == null ? undefined : json["identifier"],
|
|
24473
|
+
description: json["description"] == null ? undefined : json["description"],
|
|
24474
|
+
priority: json["priority"] == null ? undefined : json["priority"],
|
|
24475
|
+
availability: json["availability"] == null ? undefined : json["availability"],
|
|
24476
|
+
product: json["product"] == null ? undefined : ProductDtoFromJSON(json["product"]),
|
|
24477
|
+
data: json["data"] == null ? undefined : FormDataDtoFromJSON(json["data"])
|
|
24478
|
+
};
|
|
24479
|
+
}
|
|
24480
|
+
function PolicyDtoToJSON(json) {
|
|
24481
|
+
return PolicyDtoToJSONTyped(json, false);
|
|
24482
|
+
}
|
|
24483
|
+
function PolicyDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24484
|
+
if (value == null) {
|
|
24485
|
+
return value;
|
|
24486
|
+
}
|
|
24487
|
+
return {
|
|
24488
|
+
name: value["name"],
|
|
24489
|
+
identifier: value["identifier"],
|
|
24490
|
+
description: value["description"],
|
|
24491
|
+
priority: value["priority"],
|
|
24492
|
+
availability: value["availability"],
|
|
24493
|
+
product: ProductDtoToJSON(value["product"]),
|
|
24494
|
+
data: FormDataDtoToJSON(value["data"])
|
|
24495
|
+
};
|
|
24496
|
+
}
|
|
24497
|
+
function CreatePolicyWithFormDataRequestToJSON(json) {
|
|
24498
|
+
return CreatePolicyWithFormDataRequestToJSONTyped(json, false);
|
|
24499
|
+
}
|
|
24500
|
+
function CreatePolicyWithFormDataRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24501
|
+
if (value == null) {
|
|
24502
|
+
return value;
|
|
24503
|
+
}
|
|
24504
|
+
return {
|
|
24505
|
+
policy: PolicyDtoToJSON(value["policy"]),
|
|
24506
|
+
policyFormData: FormDataDtoToJSON(value["policyFormData"])
|
|
24507
|
+
};
|
|
24508
|
+
}
|
|
24509
|
+
function DeployedPolicyDtoToJSON(json) {
|
|
24510
|
+
return DeployedPolicyDtoToJSONTyped(json, false);
|
|
24511
|
+
}
|
|
24512
|
+
function DeployedPolicyDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24513
|
+
if (value == null) {
|
|
24514
|
+
return value;
|
|
24515
|
+
}
|
|
24516
|
+
return {
|
|
24517
|
+
licenseType: value["licenseType"],
|
|
24518
|
+
productName: value["productName"],
|
|
24519
|
+
tenantIdentifier: value["tenantIdentifier"],
|
|
24520
|
+
userIdentifier: value["userIdentifier"]
|
|
24521
|
+
};
|
|
24522
|
+
}
|
|
24523
|
+
function DeployedPolicyWithoutUserDtoToJSON(json) {
|
|
24524
|
+
return DeployedPolicyWithoutUserDtoToJSONTyped(json, false);
|
|
24525
|
+
}
|
|
24526
|
+
function DeployedPolicyWithoutUserDtoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24527
|
+
if (value == null) {
|
|
24528
|
+
return value;
|
|
24529
|
+
}
|
|
24530
|
+
return {
|
|
24531
|
+
licenseType: value["licenseType"],
|
|
24532
|
+
productName: value["productName"],
|
|
24533
|
+
tenantIdentifier: value["tenantIdentifier"]
|
|
24534
|
+
};
|
|
24535
|
+
}
|
|
24536
|
+
function DeploymentLevelFromJSON(json) {
|
|
24537
|
+
return DeploymentLevelFromJSONTyped(json, false);
|
|
24538
|
+
}
|
|
24539
|
+
function DeploymentLevelFromJSONTyped(json, ignoreDiscriminator) {
|
|
24540
|
+
return json;
|
|
24541
|
+
}
|
|
24542
|
+
function TenantPolicyDtoFromJSON(json) {
|
|
24543
|
+
return TenantPolicyDtoFromJSONTyped(json, false);
|
|
24544
|
+
}
|
|
24545
|
+
function TenantPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
24546
|
+
if (json == null) {
|
|
24547
|
+
return json;
|
|
24548
|
+
}
|
|
24549
|
+
return {
|
|
24550
|
+
tenantIdentifier: json["tenantIdentifier"] == null ? undefined : json["tenantIdentifier"],
|
|
24551
|
+
policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
|
|
24552
|
+
productIdentifier: json["productIdentifier"] == null ? undefined : json["productIdentifier"],
|
|
24553
|
+
licenseTypeIdentifier: json["licenseTypeIdentifier"] == null ? undefined : json["licenseTypeIdentifier"],
|
|
24554
|
+
tenantName: json["tenantName"] == null ? undefined : json["tenantName"]
|
|
24555
|
+
};
|
|
24556
|
+
}
|
|
24557
|
+
function GroupPolicyDtoFromJSON(json) {
|
|
24558
|
+
return GroupPolicyDtoFromJSONTyped(json, false);
|
|
24559
|
+
}
|
|
24560
|
+
function GroupPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
24561
|
+
if (json == null) {
|
|
24562
|
+
return json;
|
|
24563
|
+
}
|
|
24564
|
+
return {
|
|
24565
|
+
policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
|
|
24566
|
+
productIdentifier: json["productIdentifier"] == null ? undefined : json["productIdentifier"],
|
|
24567
|
+
groupId: json["groupId"] == null ? undefined : json["groupId"],
|
|
24568
|
+
groupName: json["groupName"] == null ? undefined : json["groupName"]
|
|
24569
|
+
};
|
|
24570
|
+
}
|
|
24571
|
+
function UserPolicyDtoFromJSON(json) {
|
|
24572
|
+
return UserPolicyDtoFromJSONTyped(json, false);
|
|
24573
|
+
}
|
|
24574
|
+
function UserPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
24575
|
+
if (json == null) {
|
|
24576
|
+
return json;
|
|
24577
|
+
}
|
|
24578
|
+
return {
|
|
24579
|
+
policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
|
|
24580
|
+
productIdentifier: json["productIdentifier"] == null ? undefined : json["productIdentifier"],
|
|
24581
|
+
userId: json["userId"] == null ? undefined : json["userId"],
|
|
24582
|
+
userName: json["userName"] == null ? undefined : json["userName"]
|
|
24583
|
+
};
|
|
24584
|
+
}
|
|
24585
|
+
function FederatedPolicyDtoFromJSON(json) {
|
|
24586
|
+
return FederatedPolicyDtoFromJSONTyped(json, false);
|
|
24587
|
+
}
|
|
24588
|
+
function FederatedPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
24589
|
+
if (json == null) {
|
|
24590
|
+
return json;
|
|
24591
|
+
}
|
|
24592
|
+
return {
|
|
24593
|
+
name: json["name"] == null ? undefined : json["name"],
|
|
24594
|
+
identifier: json["identifier"] == null ? undefined : json["identifier"],
|
|
24595
|
+
product: json["product"] == null ? undefined : ProductDtoFromJSON(json["product"]),
|
|
24596
|
+
description: json["description"] == null ? undefined : json["description"],
|
|
24597
|
+
priority: json["priority"] == null ? undefined : json["priority"],
|
|
24598
|
+
availability: json["availability"] == null ? undefined : json["availability"],
|
|
24599
|
+
tenantPolicies: json["tenantPolicies"] == null ? undefined : json["tenantPolicies"].map(TenantPolicyDtoFromJSON),
|
|
24600
|
+
userPolicies: json["userPolicies"] == null ? undefined : json["userPolicies"].map(UserPolicyDtoFromJSON),
|
|
24601
|
+
groupPolicies: json["groupPolicies"] == null ? undefined : json["groupPolicies"].map(GroupPolicyDtoFromJSON)
|
|
24602
|
+
};
|
|
24603
|
+
}
|
|
24604
|
+
function FederatedPolicyDtoPagedResultFromJSON(json) {
|
|
24605
|
+
return FederatedPolicyDtoPagedResultFromJSONTyped(json, false);
|
|
24606
|
+
}
|
|
24607
|
+
function FederatedPolicyDtoPagedResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
24608
|
+
if (json == null) {
|
|
24609
|
+
return json;
|
|
24610
|
+
}
|
|
24611
|
+
return {
|
|
24612
|
+
totalCount: json["totalCount"] == null ? undefined : json["totalCount"],
|
|
24613
|
+
result: json["result"] == null ? undefined : json["result"].map(FederatedPolicyDtoFromJSON)
|
|
24614
|
+
};
|
|
24615
|
+
}
|
|
24616
|
+
function ImportPolicyRequestFromJSON(json) {
|
|
24617
|
+
return ImportPolicyRequestFromJSONTyped(json, false);
|
|
24618
|
+
}
|
|
24619
|
+
function ImportPolicyRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
24620
|
+
if (json == null) {
|
|
24621
|
+
return json;
|
|
24622
|
+
}
|
|
24623
|
+
return {
|
|
24624
|
+
productName: json["product-name"] == null ? undefined : json["product-name"],
|
|
24625
|
+
policyName: json["policy-name"] == null ? undefined : json["policy-name"],
|
|
24626
|
+
version: json["version"] == null ? undefined : json["version"],
|
|
24627
|
+
data: json["data"] == null ? undefined : json["data"]
|
|
24628
|
+
};
|
|
24629
|
+
}
|
|
24630
|
+
function PolicyDtoPagedResultFromJSON(json) {
|
|
24631
|
+
return PolicyDtoPagedResultFromJSONTyped(json, false);
|
|
24632
|
+
}
|
|
24633
|
+
function PolicyDtoPagedResultFromJSONTyped(json, ignoreDiscriminator) {
|
|
24634
|
+
if (json == null) {
|
|
24635
|
+
return json;
|
|
24636
|
+
}
|
|
24637
|
+
return {
|
|
24638
|
+
totalCount: json["totalCount"] == null ? undefined : json["totalCount"],
|
|
24639
|
+
result: json["result"] == null ? undefined : json["result"].map(PolicyDtoFromJSON)
|
|
24640
|
+
};
|
|
24641
|
+
}
|
|
24642
|
+
function PolicyExportResponseFromJSON(json) {
|
|
24643
|
+
return PolicyExportResponseFromJSONTyped(json, false);
|
|
24644
|
+
}
|
|
24645
|
+
function PolicyExportResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
24646
|
+
if (json == null) {
|
|
24647
|
+
return json;
|
|
24648
|
+
}
|
|
24649
|
+
return {
|
|
24650
|
+
identifier: json["identifier"] == null ? undefined : json["identifier"],
|
|
24651
|
+
name: json["name"] == null ? undefined : json["name"],
|
|
24652
|
+
availability: json["availability"] == null ? undefined : json["availability"],
|
|
24653
|
+
data: json["data"] == null ? undefined : json["data"],
|
|
24654
|
+
priority: json["priority"] == null ? undefined : json["priority"],
|
|
24655
|
+
deploymentLevel: json["deploymentLevel"] == null ? undefined : DeploymentLevelFromJSON(json["deploymentLevel"])
|
|
24656
|
+
};
|
|
24657
|
+
}
|
|
24658
|
+
function PolicyInfoDtoFromJSON(json) {
|
|
24659
|
+
return PolicyInfoDtoFromJSONTyped(json, false);
|
|
24660
|
+
}
|
|
24661
|
+
function PolicyInfoDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
24662
|
+
if (json == null) {
|
|
24663
|
+
return json;
|
|
24664
|
+
}
|
|
24665
|
+
return {
|
|
24666
|
+
name: json["name"] == null ? undefined : json["name"],
|
|
24667
|
+
identifier: json["identifier"] == null ? undefined : json["identifier"],
|
|
24668
|
+
product: json["product"] == null ? undefined : json["product"]
|
|
24669
|
+
};
|
|
24670
|
+
}
|
|
24671
|
+
function PolicyUsageDataFromJSON(json) {
|
|
24672
|
+
return PolicyUsageDataFromJSONTyped(json, false);
|
|
24673
|
+
}
|
|
24674
|
+
function PolicyUsageDataFromJSONTyped(json, ignoreDiscriminator) {
|
|
24675
|
+
if (json == null) {
|
|
24676
|
+
return json;
|
|
24677
|
+
}
|
|
24678
|
+
return {
|
|
24679
|
+
tenants: json["tenants"] == null ? undefined : json["tenants"],
|
|
24680
|
+
users: json["users"] == null ? undefined : json["users"],
|
|
24681
|
+
groups: json["groups"] == null ? undefined : json["groups"]
|
|
24682
|
+
};
|
|
24683
|
+
}
|
|
24684
|
+
function UpdatePolicyRequestToJSON(json) {
|
|
24685
|
+
return UpdatePolicyRequestToJSONTyped(json, false);
|
|
24686
|
+
}
|
|
24687
|
+
function UpdatePolicyRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
24688
|
+
if (value == null) {
|
|
24689
|
+
return value;
|
|
24690
|
+
}
|
|
24691
|
+
return {
|
|
24692
|
+
name: value["name"],
|
|
24693
|
+
identifier: value["identifier"],
|
|
24694
|
+
description: value["description"],
|
|
24695
|
+
priority: value["priority"],
|
|
24696
|
+
availability: value["availability"],
|
|
24697
|
+
productName: value["productName"],
|
|
24698
|
+
data: value["data"]
|
|
24699
|
+
};
|
|
24700
|
+
}
|
|
24701
|
+
|
|
24702
|
+
class PolicyApi extends BaseAPI {
|
|
24703
|
+
async policyCreateDefaultPolicyForAllProductsRaw(initOverrides) {
|
|
24704
|
+
const queryParameters = {};
|
|
24705
|
+
const headerParameters = {};
|
|
24706
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24707
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24708
|
+
}
|
|
24709
|
+
let urlPath = `/api/Policy/default`;
|
|
24710
|
+
const response = await this.request({
|
|
24711
|
+
path: urlPath,
|
|
24712
|
+
method: "POST",
|
|
24713
|
+
headers: headerParameters,
|
|
24714
|
+
query: queryParameters
|
|
24715
|
+
}, initOverrides);
|
|
24716
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
24717
|
+
}
|
|
24718
|
+
async policyCreateDefaultPolicyForAllProducts(initOverrides) {
|
|
24719
|
+
const response = await this.policyCreateDefaultPolicyForAllProductsRaw(initOverrides);
|
|
24720
|
+
return await response.value();
|
|
24721
|
+
}
|
|
24722
|
+
async policyCreateFormDataRaw(requestParameters, initOverrides) {
|
|
24723
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
24724
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyCreateFormData().');
|
|
24725
|
+
}
|
|
24726
|
+
const queryParameters = {};
|
|
24727
|
+
const headerParameters = {};
|
|
24728
|
+
headerParameters["Content-Type"] = "application/json";
|
|
24729
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24730
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24731
|
+
}
|
|
24732
|
+
let urlPath = `/api/Policy/form-data/{policyIdentifier}`;
|
|
24733
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
24734
|
+
const response = await this.request({
|
|
24735
|
+
path: urlPath,
|
|
24736
|
+
method: "PUT",
|
|
24737
|
+
headers: headerParameters,
|
|
24738
|
+
query: queryParameters,
|
|
24739
|
+
body: requestParameters["body"]
|
|
24740
|
+
}, initOverrides);
|
|
24741
|
+
if (this.isJsonMime(response.headers.get("content-type"))) {
|
|
24742
|
+
return new JSONApiResponse(response);
|
|
24743
|
+
} else {
|
|
24744
|
+
return new TextApiResponse(response);
|
|
24745
|
+
}
|
|
24746
|
+
}
|
|
24747
|
+
async policyCreateFormData(requestParameters, initOverrides) {
|
|
24748
|
+
const response = await this.policyCreateFormDataRaw(requestParameters, initOverrides);
|
|
24749
|
+
return await response.value();
|
|
24750
|
+
}
|
|
24751
|
+
async policyCreateGlobalPolicyRaw(requestParameters, initOverrides) {
|
|
24752
|
+
const queryParameters = {};
|
|
24753
|
+
const headerParameters = {};
|
|
24754
|
+
headerParameters["Content-Type"] = "application/json";
|
|
24755
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24756
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24757
|
+
}
|
|
24758
|
+
let urlPath = `/api/Policy/global`;
|
|
24759
|
+
const response = await this.request({
|
|
24760
|
+
path: urlPath,
|
|
24761
|
+
method: "POST",
|
|
24762
|
+
headers: headerParameters,
|
|
24763
|
+
query: queryParameters,
|
|
24764
|
+
body: CreateGlobalPolicyWithFormDataRequestToJSON(requestParameters["createGlobalPolicyWithFormDataRequest"])
|
|
24765
|
+
}, initOverrides);
|
|
24766
|
+
return new JSONApiResponse(response, (jsonValue) => GlobalPolicyDtoFromJSON(jsonValue));
|
|
24767
|
+
}
|
|
24768
|
+
async policyCreateGlobalPolicy(requestParameters = {}, initOverrides) {
|
|
24769
|
+
const response = await this.policyCreateGlobalPolicyRaw(requestParameters, initOverrides);
|
|
24770
|
+
return await response.value();
|
|
24771
|
+
}
|
|
24772
|
+
async policyCreatePolicyRaw(requestParameters, initOverrides) {
|
|
24773
|
+
const queryParameters = {};
|
|
24774
|
+
if (requestParameters["telemetryFlowId"] != null) {
|
|
24775
|
+
queryParameters["telemetryFlowId"] = requestParameters["telemetryFlowId"];
|
|
24776
|
+
}
|
|
24777
|
+
const headerParameters = {};
|
|
24778
|
+
headerParameters["Content-Type"] = "application/json";
|
|
24779
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24780
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24781
|
+
}
|
|
24782
|
+
let urlPath = `/api/Policy`;
|
|
24783
|
+
const response = await this.request({
|
|
24784
|
+
path: urlPath,
|
|
24785
|
+
method: "POST",
|
|
24786
|
+
headers: headerParameters,
|
|
24787
|
+
query: queryParameters,
|
|
24788
|
+
body: CreatePolicyWithFormDataRequestToJSON(requestParameters["createPolicyWithFormDataRequest"])
|
|
24789
|
+
}, initOverrides);
|
|
24790
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
24791
|
+
}
|
|
24792
|
+
async policyCreatePolicy(requestParameters = {}, initOverrides) {
|
|
24793
|
+
const response = await this.policyCreatePolicyRaw(requestParameters, initOverrides);
|
|
24794
|
+
return await response.value();
|
|
24795
|
+
}
|
|
24796
|
+
async policyCreatePolicyV2Raw(requestParameters, initOverrides) {
|
|
24797
|
+
const queryParameters = {};
|
|
24798
|
+
if (requestParameters["telemetryFlowId"] != null) {
|
|
24799
|
+
queryParameters["telemetryFlowId"] = requestParameters["telemetryFlowId"];
|
|
24800
|
+
}
|
|
24801
|
+
const headerParameters = {};
|
|
24802
|
+
headerParameters["Content-Type"] = "application/json";
|
|
24803
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24804
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24805
|
+
}
|
|
24806
|
+
let urlPath = `/api/Policy/v2/create`;
|
|
24807
|
+
const response = await this.request({
|
|
24808
|
+
path: urlPath,
|
|
24809
|
+
method: "POST",
|
|
24810
|
+
headers: headerParameters,
|
|
24811
|
+
query: queryParameters,
|
|
24812
|
+
body: CreatePolicyRequestToJSON(requestParameters["createPolicyRequest"])
|
|
24813
|
+
}, initOverrides);
|
|
24814
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
24815
|
+
}
|
|
24816
|
+
async policyCreatePolicyV2(requestParameters = {}, initOverrides) {
|
|
24817
|
+
const response = await this.policyCreatePolicyV2Raw(requestParameters, initOverrides);
|
|
24818
|
+
return await response.value();
|
|
24819
|
+
}
|
|
24820
|
+
async policyDeletePolicyRaw(requestParameters, initOverrides) {
|
|
24821
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
24822
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyDeletePolicy().');
|
|
24823
|
+
}
|
|
24824
|
+
const queryParameters = {};
|
|
24825
|
+
const headerParameters = {};
|
|
24826
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24827
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24828
|
+
}
|
|
24829
|
+
let urlPath = `/api/Policy/{policyIdentifier}`;
|
|
24830
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
24831
|
+
const response = await this.request({
|
|
24832
|
+
path: urlPath,
|
|
24833
|
+
method: "DELETE",
|
|
24834
|
+
headers: headerParameters,
|
|
24835
|
+
query: queryParameters
|
|
24836
|
+
}, initOverrides);
|
|
24837
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
24838
|
+
}
|
|
24839
|
+
async policyDeletePolicy(requestParameters, initOverrides) {
|
|
24840
|
+
const response = await this.policyDeletePolicyRaw(requestParameters, initOverrides);
|
|
24841
|
+
return await response.value();
|
|
24842
|
+
}
|
|
24843
|
+
async policyDeletePolicyByProductNameAndPolicyNameRaw(requestParameters, initOverrides) {
|
|
24844
|
+
if (requestParameters["productName"] == null) {
|
|
24845
|
+
throw new RequiredError("productName", 'Required parameter "productName" was null or undefined when calling policyDeletePolicyByProductNameAndPolicyName().');
|
|
24846
|
+
}
|
|
24847
|
+
if (requestParameters["policyName"] == null) {
|
|
24848
|
+
throw new RequiredError("policyName", 'Required parameter "policyName" was null or undefined when calling policyDeletePolicyByProductNameAndPolicyName().');
|
|
24849
|
+
}
|
|
24850
|
+
const queryParameters = {};
|
|
24851
|
+
const headerParameters = {};
|
|
24852
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24853
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24854
|
+
}
|
|
24855
|
+
let urlPath = `/api/Policy/product/{productName}/policy/{policyName}`;
|
|
24856
|
+
urlPath = urlPath.replace(`{${"productName"}}`, encodeURIComponent(String(requestParameters["productName"])));
|
|
24857
|
+
urlPath = urlPath.replace(`{${"policyName"}}`, encodeURIComponent(String(requestParameters["policyName"])));
|
|
24858
|
+
const response = await this.request({
|
|
24859
|
+
path: urlPath,
|
|
24860
|
+
method: "DELETE",
|
|
24861
|
+
headers: headerParameters,
|
|
24862
|
+
query: queryParameters
|
|
24863
|
+
}, initOverrides);
|
|
24864
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
24865
|
+
}
|
|
24866
|
+
async policyDeletePolicyByProductNameAndPolicyName(requestParameters, initOverrides) {
|
|
24867
|
+
const response = await this.policyDeletePolicyByProductNameAndPolicyNameRaw(requestParameters, initOverrides);
|
|
24868
|
+
return await response.value();
|
|
24869
|
+
}
|
|
24870
|
+
async policyDownloadPolicyByIdentifierRaw(requestParameters, initOverrides) {
|
|
24871
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
24872
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyDownloadPolicyByIdentifier().');
|
|
24873
|
+
}
|
|
24874
|
+
const queryParameters = {};
|
|
24875
|
+
const headerParameters = {};
|
|
24876
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24877
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24878
|
+
}
|
|
24879
|
+
let urlPath = `/api/Policy/{policyIdentifier}/download`;
|
|
24880
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
24881
|
+
const response = await this.request({
|
|
24882
|
+
path: urlPath,
|
|
24883
|
+
method: "GET",
|
|
24884
|
+
headers: headerParameters,
|
|
24885
|
+
query: queryParameters
|
|
24886
|
+
}, initOverrides);
|
|
24887
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyUsageDataFromJSON(jsonValue));
|
|
24888
|
+
}
|
|
24889
|
+
async policyDownloadPolicyByIdentifier(requestParameters, initOverrides) {
|
|
24890
|
+
const response = await this.policyDownloadPolicyByIdentifierRaw(requestParameters, initOverrides);
|
|
24891
|
+
return await response.value();
|
|
24892
|
+
}
|
|
24893
|
+
async policyGetAllPoliciesRaw(initOverrides) {
|
|
24894
|
+
const queryParameters = {};
|
|
24895
|
+
const headerParameters = {};
|
|
24896
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24897
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24898
|
+
}
|
|
24899
|
+
let urlPath = `/api/Policy`;
|
|
24900
|
+
const response = await this.request({
|
|
24901
|
+
path: urlPath,
|
|
24902
|
+
method: "GET",
|
|
24903
|
+
headers: headerParameters,
|
|
24904
|
+
query: queryParameters
|
|
24905
|
+
}, initOverrides);
|
|
24906
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyDtoFromJSON));
|
|
24907
|
+
}
|
|
24908
|
+
async policyGetAllPolicies(initOverrides) {
|
|
24909
|
+
const response = await this.policyGetAllPoliciesRaw(initOverrides);
|
|
24910
|
+
return await response.value();
|
|
24911
|
+
}
|
|
24912
|
+
async policyGetAllPoliciesByProductIdRaw(requestParameters, initOverrides) {
|
|
24913
|
+
if (requestParameters["productIdentifier"] == null) {
|
|
24914
|
+
throw new RequiredError("productIdentifier", 'Required parameter "productIdentifier" was null or undefined when calling policyGetAllPoliciesByProductId().');
|
|
24915
|
+
}
|
|
24916
|
+
const queryParameters = {};
|
|
24917
|
+
const headerParameters = {};
|
|
24918
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24919
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24920
|
+
}
|
|
24921
|
+
let urlPath = `/api/Policy/{productIdentifier}`;
|
|
24922
|
+
urlPath = urlPath.replace(`{${"productIdentifier"}}`, encodeURIComponent(String(requestParameters["productIdentifier"])));
|
|
24923
|
+
const response = await this.request({
|
|
24924
|
+
path: urlPath,
|
|
24925
|
+
method: "GET",
|
|
24926
|
+
headers: headerParameters,
|
|
24927
|
+
query: queryParameters
|
|
24928
|
+
}, initOverrides);
|
|
24929
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyDtoFromJSON));
|
|
24930
|
+
}
|
|
24931
|
+
async policyGetAllPoliciesByProductId(requestParameters, initOverrides) {
|
|
24932
|
+
const response = await this.policyGetAllPoliciesByProductIdRaw(requestParameters, initOverrides);
|
|
24933
|
+
return await response.value();
|
|
24934
|
+
}
|
|
24935
|
+
async policyGetAllPoliciesByQueryOptionsRaw(requestParameters, initOverrides) {
|
|
24936
|
+
const queryParameters = {};
|
|
24937
|
+
if (requestParameters["productLabel"] != null) {
|
|
24938
|
+
queryParameters["productLabel"] = requestParameters["productLabel"];
|
|
24939
|
+
}
|
|
24940
|
+
if (requestParameters["productName"] != null) {
|
|
24941
|
+
queryParameters["productName"] = requestParameters["productName"];
|
|
24942
|
+
}
|
|
24943
|
+
if (requestParameters["productNames"] != null) {
|
|
24944
|
+
queryParameters["productNames"] = requestParameters["productNames"];
|
|
24945
|
+
}
|
|
24946
|
+
if (requestParameters["sortBy"] != null) {
|
|
24947
|
+
queryParameters["sortBy"] = requestParameters["sortBy"];
|
|
24948
|
+
}
|
|
24949
|
+
if (requestParameters["sortOrder"] != null) {
|
|
24950
|
+
queryParameters["sortOrder"] = requestParameters["sortOrder"];
|
|
24951
|
+
}
|
|
24952
|
+
if (requestParameters["pageIndex"] != null) {
|
|
24953
|
+
queryParameters["pageIndex"] = requestParameters["pageIndex"];
|
|
24954
|
+
}
|
|
24955
|
+
if (requestParameters["pageSize"] != null) {
|
|
24956
|
+
queryParameters["pageSize"] = requestParameters["pageSize"];
|
|
24957
|
+
}
|
|
24958
|
+
if (requestParameters["searchTerm"] != null) {
|
|
24959
|
+
queryParameters["searchTerm"] = requestParameters["searchTerm"];
|
|
24960
|
+
}
|
|
24961
|
+
const headerParameters = {};
|
|
24962
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24963
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24964
|
+
}
|
|
24965
|
+
let urlPath = `/api/Policy/paged`;
|
|
24966
|
+
const response = await this.request({
|
|
24967
|
+
path: urlPath,
|
|
24968
|
+
method: "GET",
|
|
24969
|
+
headers: headerParameters,
|
|
24970
|
+
query: queryParameters
|
|
24971
|
+
}, initOverrides);
|
|
24972
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoPagedResultFromJSON(jsonValue));
|
|
24973
|
+
}
|
|
24974
|
+
async policyGetAllPoliciesByQueryOptions(requestParameters = {}, initOverrides) {
|
|
24975
|
+
const response = await this.policyGetAllPoliciesByQueryOptionsRaw(requestParameters, initOverrides);
|
|
24976
|
+
return await response.value();
|
|
24977
|
+
}
|
|
24978
|
+
async policyGetAllRulesForProductRaw(requestParameters, initOverrides) {
|
|
24979
|
+
if (requestParameters["licenseType"] == null) {
|
|
24980
|
+
throw new RequiredError("licenseType", 'Required parameter "licenseType" was null or undefined when calling policyGetAllRulesForProduct().');
|
|
24981
|
+
}
|
|
24982
|
+
if (requestParameters["productName"] == null) {
|
|
24983
|
+
throw new RequiredError("productName", 'Required parameter "productName" was null or undefined when calling policyGetAllRulesForProduct().');
|
|
24984
|
+
}
|
|
24985
|
+
if (requestParameters["tenantIdentifier"] == null) {
|
|
24986
|
+
throw new RequiredError("tenantIdentifier", 'Required parameter "tenantIdentifier" was null or undefined when calling policyGetAllRulesForProduct().');
|
|
24987
|
+
}
|
|
24988
|
+
const queryParameters = {};
|
|
24989
|
+
const headerParameters = {};
|
|
24990
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
24991
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
24992
|
+
}
|
|
24993
|
+
let urlPath = `/api/Policy/all/license/{licenseType}/product/{productName}/tenant/{tenantIdentifier}`;
|
|
24994
|
+
urlPath = urlPath.replace(`{${"licenseType"}}`, encodeURIComponent(String(requestParameters["licenseType"])));
|
|
24995
|
+
urlPath = urlPath.replace(`{${"productName"}}`, encodeURIComponent(String(requestParameters["productName"])));
|
|
24996
|
+
urlPath = urlPath.replace(`{${"tenantIdentifier"}}`, encodeURIComponent(String(requestParameters["tenantIdentifier"])));
|
|
24997
|
+
const response = await this.request({
|
|
24998
|
+
path: urlPath,
|
|
24999
|
+
method: "GET",
|
|
25000
|
+
headers: headerParameters,
|
|
25001
|
+
query: queryParameters
|
|
25002
|
+
}, initOverrides);
|
|
25003
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyExportResponseFromJSON));
|
|
25004
|
+
}
|
|
25005
|
+
async policyGetAllRulesForProduct(requestParameters, initOverrides) {
|
|
25006
|
+
const response = await this.policyGetAllRulesForProductRaw(requestParameters, initOverrides);
|
|
25007
|
+
return await response.value();
|
|
25008
|
+
}
|
|
25009
|
+
async policyGetDeployedPolicyRaw(requestParameters, initOverrides) {
|
|
25010
|
+
const queryParameters = {};
|
|
25011
|
+
const headerParameters = {};
|
|
25012
|
+
headerParameters["Content-Type"] = "application/json";
|
|
25013
|
+
if (requestParameters["xUiPathClientVersion"] != null) {
|
|
25014
|
+
headerParameters["x-UiPath-ClientVersion"] = String(requestParameters["xUiPathClientVersion"]);
|
|
25015
|
+
}
|
|
25016
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25017
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25018
|
+
}
|
|
25019
|
+
let urlPath = `/api/Policy/deployed-policy`;
|
|
25020
|
+
const response = await this.request({
|
|
25021
|
+
path: urlPath,
|
|
25022
|
+
method: "POST",
|
|
25023
|
+
headers: headerParameters,
|
|
25024
|
+
query: queryParameters,
|
|
25025
|
+
body: DeployedPolicyDtoToJSON(requestParameters["deployedPolicyDto"])
|
|
25026
|
+
}, initOverrides);
|
|
25027
|
+
return new VoidApiResponse(response);
|
|
25028
|
+
}
|
|
25029
|
+
async policyGetDeployedPolicy(requestParameters = {}, initOverrides) {
|
|
25030
|
+
await this.policyGetDeployedPolicyRaw(requestParameters, initOverrides);
|
|
25031
|
+
}
|
|
25032
|
+
async policyGetDeployedTenantPoliciesRaw(requestParameters, initOverrides) {
|
|
25033
|
+
const queryParameters = {};
|
|
25034
|
+
const headerParameters = {};
|
|
25035
|
+
headerParameters["Content-Type"] = "application/json";
|
|
25036
|
+
if (requestParameters["xUiPathClientVersion"] != null) {
|
|
25037
|
+
headerParameters["x-UiPath-ClientVersion"] = String(requestParameters["xUiPathClientVersion"]);
|
|
25038
|
+
}
|
|
25039
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25040
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25041
|
+
}
|
|
25042
|
+
let urlPath = `/api/Policy/deployed-policy/tenant`;
|
|
25043
|
+
const response = await this.request({
|
|
25044
|
+
path: urlPath,
|
|
25045
|
+
method: "POST",
|
|
25046
|
+
headers: headerParameters,
|
|
25047
|
+
query: queryParameters,
|
|
25048
|
+
body: DeployedPolicyWithoutUserDtoToJSON(requestParameters["deployedPolicyWithoutUserDto"])
|
|
25049
|
+
}, initOverrides);
|
|
25050
|
+
return new VoidApiResponse(response);
|
|
25051
|
+
}
|
|
25052
|
+
async policyGetDeployedTenantPolicies(requestParameters = {}, initOverrides) {
|
|
25053
|
+
await this.policyGetDeployedTenantPoliciesRaw(requestParameters, initOverrides);
|
|
25054
|
+
}
|
|
25055
|
+
async policyGetFederatedPoliciesByQueryOptionsRaw(requestParameters, initOverrides) {
|
|
25056
|
+
const queryParameters = {};
|
|
25057
|
+
if (requestParameters["productLabel"] != null) {
|
|
25058
|
+
queryParameters["productLabel"] = requestParameters["productLabel"];
|
|
25059
|
+
}
|
|
25060
|
+
if (requestParameters["productName"] != null) {
|
|
25061
|
+
queryParameters["productName"] = requestParameters["productName"];
|
|
25062
|
+
}
|
|
25063
|
+
if (requestParameters["productNames"] != null) {
|
|
25064
|
+
queryParameters["productNames"] = requestParameters["productNames"];
|
|
25065
|
+
}
|
|
25066
|
+
if (requestParameters["sortBy"] != null) {
|
|
25067
|
+
queryParameters["sortBy"] = requestParameters["sortBy"];
|
|
25068
|
+
}
|
|
25069
|
+
if (requestParameters["sortOrder"] != null) {
|
|
25070
|
+
queryParameters["sortOrder"] = requestParameters["sortOrder"];
|
|
25071
|
+
}
|
|
25072
|
+
if (requestParameters["pageIndex"] != null) {
|
|
25073
|
+
queryParameters["pageIndex"] = requestParameters["pageIndex"];
|
|
25074
|
+
}
|
|
25075
|
+
if (requestParameters["pageSize"] != null) {
|
|
25076
|
+
queryParameters["pageSize"] = requestParameters["pageSize"];
|
|
25077
|
+
}
|
|
25078
|
+
if (requestParameters["searchTerm"] != null) {
|
|
25079
|
+
queryParameters["searchTerm"] = requestParameters["searchTerm"];
|
|
25080
|
+
}
|
|
25081
|
+
const headerParameters = {};
|
|
25082
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25083
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25084
|
+
}
|
|
25085
|
+
let urlPath = `/api/Policy/federated/paged`;
|
|
25086
|
+
const response = await this.request({
|
|
25087
|
+
path: urlPath,
|
|
25088
|
+
method: "GET",
|
|
25089
|
+
headers: headerParameters,
|
|
25090
|
+
query: queryParameters
|
|
25091
|
+
}, initOverrides);
|
|
25092
|
+
return new JSONApiResponse(response, (jsonValue) => FederatedPolicyDtoPagedResultFromJSON(jsonValue));
|
|
25093
|
+
}
|
|
25094
|
+
async policyGetFederatedPoliciesByQueryOptions(requestParameters = {}, initOverrides) {
|
|
25095
|
+
const response = await this.policyGetFederatedPoliciesByQueryOptionsRaw(requestParameters, initOverrides);
|
|
25096
|
+
return await response.value();
|
|
25097
|
+
}
|
|
25098
|
+
async policyGetFormDataByPolicyIdRaw(requestParameters, initOverrides) {
|
|
25099
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
25100
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetFormDataByPolicyId().');
|
|
25101
|
+
}
|
|
25102
|
+
const queryParameters = {};
|
|
25103
|
+
const headerParameters = {};
|
|
25104
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25105
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25106
|
+
}
|
|
25107
|
+
let urlPath = `/api/Policy/form-data/{policyIdentifier}`;
|
|
25108
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
25109
|
+
const response = await this.request({
|
|
25110
|
+
path: urlPath,
|
|
25111
|
+
method: "GET",
|
|
25112
|
+
headers: headerParameters,
|
|
25113
|
+
query: queryParameters
|
|
25114
|
+
}, initOverrides);
|
|
25115
|
+
if (this.isJsonMime(response.headers.get("content-type"))) {
|
|
25116
|
+
return new JSONApiResponse(response);
|
|
25117
|
+
} else {
|
|
25118
|
+
return new TextApiResponse(response);
|
|
25119
|
+
}
|
|
25120
|
+
}
|
|
25121
|
+
async policyGetFormDataByPolicyId(requestParameters, initOverrides) {
|
|
25122
|
+
const response = await this.policyGetFormDataByPolicyIdRaw(requestParameters, initOverrides);
|
|
25123
|
+
return await response.value();
|
|
25124
|
+
}
|
|
25125
|
+
async policyGetGlobalPolicyByLicenseTypeAndProductNameRaw(requestParameters, initOverrides) {
|
|
25126
|
+
if (requestParameters["licenseType"] == null) {
|
|
25127
|
+
throw new RequiredError("licenseType", 'Required parameter "licenseType" was null or undefined when calling policyGetGlobalPolicyByLicenseTypeAndProductName().');
|
|
25128
|
+
}
|
|
25129
|
+
if (requestParameters["productIdentifier"] == null) {
|
|
25130
|
+
throw new RequiredError("productIdentifier", 'Required parameter "productIdentifier" was null or undefined when calling policyGetGlobalPolicyByLicenseTypeAndProductName().');
|
|
25131
|
+
}
|
|
25132
|
+
const queryParameters = {};
|
|
25133
|
+
const headerParameters = {};
|
|
25134
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25135
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25136
|
+
}
|
|
25137
|
+
let urlPath = `/api/Policy/global/license/{licenseType}/product/{productIdentifier}`;
|
|
25138
|
+
urlPath = urlPath.replace(`{${"licenseType"}}`, encodeURIComponent(String(requestParameters["licenseType"])));
|
|
25139
|
+
urlPath = urlPath.replace(`{${"productIdentifier"}}`, encodeURIComponent(String(requestParameters["productIdentifier"])));
|
|
25140
|
+
const response = await this.request({
|
|
25141
|
+
path: urlPath,
|
|
25142
|
+
method: "GET",
|
|
25143
|
+
headers: headerParameters,
|
|
25144
|
+
query: queryParameters
|
|
25145
|
+
}, initOverrides);
|
|
25146
|
+
return new JSONApiResponse(response, (jsonValue) => GlobalPolicyDtoFromJSON(jsonValue));
|
|
25147
|
+
}
|
|
25148
|
+
async policyGetGlobalPolicyByLicenseTypeAndProductName(requestParameters, initOverrides) {
|
|
25149
|
+
const response = await this.policyGetGlobalPolicyByLicenseTypeAndProductNameRaw(requestParameters, initOverrides);
|
|
25150
|
+
return await response.value();
|
|
25151
|
+
}
|
|
25152
|
+
async policyGetGroupPoliciesForAllProductsRaw(requestParameters, initOverrides) {
|
|
25153
|
+
if (requestParameters["identifier"] == null) {
|
|
25154
|
+
throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetGroupPoliciesForAllProducts().');
|
|
25155
|
+
}
|
|
25156
|
+
const queryParameters = {};
|
|
25157
|
+
const headerParameters = {};
|
|
25158
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25159
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25160
|
+
}
|
|
25161
|
+
let urlPath = `/api/Policy/group/{identifier}`;
|
|
25162
|
+
urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
|
|
25163
|
+
const response = await this.request({
|
|
25164
|
+
path: urlPath,
|
|
25165
|
+
method: "GET",
|
|
25166
|
+
headers: headerParameters,
|
|
25167
|
+
query: queryParameters
|
|
25168
|
+
}, initOverrides);
|
|
25169
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(GroupPolicyDtoFromJSON));
|
|
25170
|
+
}
|
|
25171
|
+
async policyGetGroupPoliciesForAllProducts(requestParameters, initOverrides) {
|
|
25172
|
+
const response = await this.policyGetGroupPoliciesForAllProductsRaw(requestParameters, initOverrides);
|
|
25173
|
+
return await response.value();
|
|
25174
|
+
}
|
|
25175
|
+
async policyGetPoliciesByProductIdentifiersRaw(requestParameters, initOverrides) {
|
|
25176
|
+
const queryParameters = {};
|
|
25177
|
+
if (requestParameters["ids"] != null) {
|
|
25178
|
+
queryParameters["ids"] = requestParameters["ids"];
|
|
25179
|
+
}
|
|
25180
|
+
const headerParameters = {};
|
|
25181
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25182
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25183
|
+
}
|
|
25184
|
+
let urlPath = `/api/Policy/filter/products`;
|
|
25185
|
+
const response = await this.request({
|
|
25186
|
+
path: urlPath,
|
|
25187
|
+
method: "GET",
|
|
25188
|
+
headers: headerParameters,
|
|
25189
|
+
query: queryParameters
|
|
25190
|
+
}, initOverrides);
|
|
25191
|
+
return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyInfoDtoFromJSON));
|
|
25192
|
+
}
|
|
25193
|
+
async policyGetPoliciesByProductIdentifiers(requestParameters = {}, initOverrides) {
|
|
25194
|
+
const response = await this.policyGetPoliciesByProductIdentifiersRaw(requestParameters, initOverrides);
|
|
25195
|
+
return await response.value();
|
|
25196
|
+
}
|
|
25197
|
+
async policyGetPolicyByIdRaw(requestParameters, initOverrides) {
|
|
25198
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
25199
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetPolicyById().');
|
|
25200
|
+
}
|
|
25201
|
+
const queryParameters = {};
|
|
25202
|
+
const headerParameters = {};
|
|
25203
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25204
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25205
|
+
}
|
|
25206
|
+
let urlPath = `/api/Policy/id/{policyIdentifier}`;
|
|
25207
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
25208
|
+
const response = await this.request({
|
|
25209
|
+
path: urlPath,
|
|
25210
|
+
method: "GET",
|
|
25211
|
+
headers: headerParameters,
|
|
25212
|
+
query: queryParameters
|
|
25213
|
+
}, initOverrides);
|
|
25214
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
25215
|
+
}
|
|
25216
|
+
async policyGetPolicyById(requestParameters, initOverrides) {
|
|
25217
|
+
const response = await this.policyGetPolicyByIdRaw(requestParameters, initOverrides);
|
|
25218
|
+
return await response.value();
|
|
25219
|
+
}
|
|
25220
|
+
async policyGetPolicyByNameAndProductIdentifierRaw(requestParameters, initOverrides) {
|
|
25221
|
+
if (requestParameters["policyName"] == null) {
|
|
25222
|
+
throw new RequiredError("policyName", 'Required parameter "policyName" was null or undefined when calling policyGetPolicyByNameAndProductIdentifier().');
|
|
25223
|
+
}
|
|
25224
|
+
if (requestParameters["productIdentifier"] == null) {
|
|
25225
|
+
throw new RequiredError("productIdentifier", 'Required parameter "productIdentifier" was null or undefined when calling policyGetPolicyByNameAndProductIdentifier().');
|
|
25226
|
+
}
|
|
25227
|
+
const queryParameters = {};
|
|
25228
|
+
const headerParameters = {};
|
|
25229
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25230
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25231
|
+
}
|
|
25232
|
+
let urlPath = `/api/Policy/{policyName}/product/{productIdentifier}`;
|
|
25233
|
+
urlPath = urlPath.replace(`{${"policyName"}}`, encodeURIComponent(String(requestParameters["policyName"])));
|
|
25234
|
+
urlPath = urlPath.replace(`{${"productIdentifier"}}`, encodeURIComponent(String(requestParameters["productIdentifier"])));
|
|
25235
|
+
const response = await this.request({
|
|
25236
|
+
path: urlPath,
|
|
25237
|
+
method: "GET",
|
|
25238
|
+
headers: headerParameters,
|
|
25239
|
+
query: queryParameters
|
|
25240
|
+
}, initOverrides);
|
|
25241
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyUsageDataFromJSON(jsonValue));
|
|
25242
|
+
}
|
|
25243
|
+
async policyGetPolicyByNameAndProductIdentifier(requestParameters, initOverrides) {
|
|
25244
|
+
const response = await this.policyGetPolicyByNameAndProductIdentifierRaw(requestParameters, initOverrides);
|
|
25245
|
+
return await response.value();
|
|
25246
|
+
}
|
|
25247
|
+
async policyGetPolicyDataByIdentifierRaw(requestParameters, initOverrides) {
|
|
25248
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
25249
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetPolicyDataByIdentifier().');
|
|
25250
|
+
}
|
|
25251
|
+
const queryParameters = {};
|
|
25252
|
+
const headerParameters = {};
|
|
25253
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25254
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25255
|
+
}
|
|
25256
|
+
let urlPath = `/api/Policy/data/{policyIdentifier}`;
|
|
25257
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
25258
|
+
const response = await this.request({
|
|
25259
|
+
path: urlPath,
|
|
25260
|
+
method: "GET",
|
|
25261
|
+
headers: headerParameters,
|
|
25262
|
+
query: queryParameters
|
|
25263
|
+
}, initOverrides);
|
|
25264
|
+
return new JSONApiResponse(response, (jsonValue) => ImportPolicyRequestFromJSON(jsonValue));
|
|
25265
|
+
}
|
|
25266
|
+
async policyGetPolicyDataByIdentifier(requestParameters, initOverrides) {
|
|
25267
|
+
const response = await this.policyGetPolicyDataByIdentifierRaw(requestParameters, initOverrides);
|
|
25268
|
+
return await response.value();
|
|
25269
|
+
}
|
|
25270
|
+
async policyGetPolicyUsageDataRaw(requestParameters, initOverrides) {
|
|
25271
|
+
if (requestParameters["policyIdentifier"] == null) {
|
|
25272
|
+
throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetPolicyUsageData().');
|
|
25273
|
+
}
|
|
25274
|
+
const queryParameters = {};
|
|
25275
|
+
const headerParameters = {};
|
|
25276
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25277
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25278
|
+
}
|
|
25279
|
+
let urlPath = `/api/Policy/usage/{policyIdentifier}`;
|
|
25280
|
+
urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
|
|
25281
|
+
const response = await this.request({
|
|
25282
|
+
path: urlPath,
|
|
25283
|
+
method: "GET",
|
|
25284
|
+
headers: headerParameters,
|
|
25285
|
+
query: queryParameters
|
|
25286
|
+
}, initOverrides);
|
|
25287
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyUsageDataFromJSON(jsonValue));
|
|
25288
|
+
}
|
|
25289
|
+
async policyGetPolicyUsageData(requestParameters, initOverrides) {
|
|
25290
|
+
const response = await this.policyGetPolicyUsageDataRaw(requestParameters, initOverrides);
|
|
25291
|
+
return await response.value();
|
|
25292
|
+
}
|
|
25293
|
+
async policyGetRulesForProductRaw(requestParameters, initOverrides) {
|
|
25294
|
+
if (requestParameters["licenseType"] == null) {
|
|
25295
|
+
throw new RequiredError("licenseType", 'Required parameter "licenseType" was null or undefined when calling policyGetRulesForProduct().');
|
|
25296
|
+
}
|
|
25297
|
+
if (requestParameters["productName"] == null) {
|
|
25298
|
+
throw new RequiredError("productName", 'Required parameter "productName" was null or undefined when calling policyGetRulesForProduct().');
|
|
25299
|
+
}
|
|
25300
|
+
if (requestParameters["tenantIdentifier"] == null) {
|
|
25301
|
+
throw new RequiredError("tenantIdentifier", 'Required parameter "tenantIdentifier" was null or undefined when calling policyGetRulesForProduct().');
|
|
25302
|
+
}
|
|
25303
|
+
const queryParameters = {};
|
|
25304
|
+
const headerParameters = {};
|
|
25305
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25306
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25307
|
+
}
|
|
25308
|
+
let urlPath = `/api/Policy/license/{licenseType}/product/{productName}/tenant/{tenantIdentifier}`;
|
|
25309
|
+
urlPath = urlPath.replace(`{${"licenseType"}}`, encodeURIComponent(String(requestParameters["licenseType"])));
|
|
25310
|
+
urlPath = urlPath.replace(`{${"productName"}}`, encodeURIComponent(String(requestParameters["productName"])));
|
|
25311
|
+
urlPath = urlPath.replace(`{${"tenantIdentifier"}}`, encodeURIComponent(String(requestParameters["tenantIdentifier"])));
|
|
25312
|
+
const response = await this.request({
|
|
25313
|
+
path: urlPath,
|
|
25314
|
+
method: "GET",
|
|
25315
|
+
headers: headerParameters,
|
|
25316
|
+
query: queryParameters
|
|
25317
|
+
}, initOverrides);
|
|
25318
|
+
return new VoidApiResponse(response);
|
|
25319
|
+
}
|
|
25320
|
+
async policyGetRulesForProduct(requestParameters, initOverrides) {
|
|
25321
|
+
await this.policyGetRulesForProductRaw(requestParameters, initOverrides);
|
|
25322
|
+
}
|
|
25323
|
+
async policyGetUserInheritanceGroupPoliciesForAllProductsRaw(requestParameters, initOverrides) {
|
|
25324
|
+
if (requestParameters["identifier"] == null) {
|
|
25325
|
+
throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetUserInheritanceGroupPoliciesForAllProducts().');
|
|
25326
|
+
}
|
|
25327
|
+
const queryParameters = {};
|
|
25328
|
+
const headerParameters = {};
|
|
25329
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25330
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25331
|
+
}
|
|
25332
|
+
let urlPath = `/api/Policy/user/group/{identifier}`;
|
|
25333
|
+
urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
|
|
25334
|
+
const response = await this.request({
|
|
25335
|
+
path: urlPath,
|
|
25336
|
+
method: "GET",
|
|
25337
|
+
headers: headerParameters,
|
|
25338
|
+
query: queryParameters
|
|
25339
|
+
}, initOverrides);
|
|
25340
|
+
return new VoidApiResponse(response);
|
|
25341
|
+
}
|
|
25342
|
+
async policyGetUserInheritanceGroupPoliciesForAllProducts(requestParameters, initOverrides) {
|
|
25343
|
+
await this.policyGetUserInheritanceGroupPoliciesForAllProductsRaw(requestParameters, initOverrides);
|
|
25344
|
+
}
|
|
25345
|
+
async policyGetUserPoliciesForAllProductsRaw(requestParameters, initOverrides) {
|
|
25346
|
+
if (requestParameters["identifier"] == null) {
|
|
25347
|
+
throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetUserPoliciesForAllProducts().');
|
|
25348
|
+
}
|
|
25349
|
+
const queryParameters = {};
|
|
25350
|
+
const headerParameters = {};
|
|
25351
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25352
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25353
|
+
}
|
|
25354
|
+
let urlPath = `/api/Policy/user/{identifier}`;
|
|
25355
|
+
urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
|
|
25356
|
+
const response = await this.request({
|
|
25357
|
+
path: urlPath,
|
|
25358
|
+
method: "GET",
|
|
25359
|
+
headers: headerParameters,
|
|
25360
|
+
query: queryParameters
|
|
25361
|
+
}, initOverrides);
|
|
25362
|
+
return new VoidApiResponse(response);
|
|
25363
|
+
}
|
|
25364
|
+
async policyGetUserPoliciesForAllProducts(requestParameters, initOverrides) {
|
|
25365
|
+
await this.policyGetUserPoliciesForAllProductsRaw(requestParameters, initOverrides);
|
|
25366
|
+
}
|
|
25367
|
+
async policyGetUserPoliciesForAllProductsAndAllGroupsRaw(requestParameters, initOverrides) {
|
|
25368
|
+
if (requestParameters["identifier"] == null) {
|
|
25369
|
+
throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetUserPoliciesForAllProductsAndAllGroups().');
|
|
25370
|
+
}
|
|
25371
|
+
const queryParameters = {};
|
|
25372
|
+
const headerParameters = {};
|
|
25373
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25374
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25375
|
+
}
|
|
25376
|
+
let urlPath = `/api/Policy/user/{identifier}/all`;
|
|
25377
|
+
urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
|
|
25378
|
+
const response = await this.request({
|
|
25379
|
+
path: urlPath,
|
|
25380
|
+
method: "GET",
|
|
25381
|
+
headers: headerParameters,
|
|
25382
|
+
query: queryParameters
|
|
25383
|
+
}, initOverrides);
|
|
25384
|
+
return new VoidApiResponse(response);
|
|
25385
|
+
}
|
|
25386
|
+
async policyGetUserPoliciesForAllProductsAndAllGroups(requestParameters, initOverrides) {
|
|
25387
|
+
await this.policyGetUserPoliciesForAllProductsAndAllGroupsRaw(requestParameters, initOverrides);
|
|
25388
|
+
}
|
|
25389
|
+
async policyUpdateGlobalPolicyRaw(requestParameters, initOverrides) {
|
|
25390
|
+
const queryParameters = {};
|
|
25391
|
+
const headerParameters = {};
|
|
25392
|
+
headerParameters["Content-Type"] = "application/json";
|
|
25393
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25394
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25395
|
+
}
|
|
25396
|
+
let urlPath = `/api/Policy/global`;
|
|
25397
|
+
const response = await this.request({
|
|
25398
|
+
path: urlPath,
|
|
25399
|
+
method: "PUT",
|
|
25400
|
+
headers: headerParameters,
|
|
25401
|
+
query: queryParameters,
|
|
25402
|
+
body: CreateGlobalPolicyWithFormDataRequestToJSON(requestParameters["createGlobalPolicyWithFormDataRequest"])
|
|
25403
|
+
}, initOverrides);
|
|
25404
|
+
return new JSONApiResponse(response, (jsonValue) => GlobalPolicyDtoFromJSON(jsonValue));
|
|
25405
|
+
}
|
|
25406
|
+
async policyUpdateGlobalPolicy(requestParameters = {}, initOverrides) {
|
|
25407
|
+
const response = await this.policyUpdateGlobalPolicyRaw(requestParameters, initOverrides);
|
|
25408
|
+
return await response.value();
|
|
25409
|
+
}
|
|
25410
|
+
async policyUpdatePolicyRaw(requestParameters, initOverrides) {
|
|
25411
|
+
const queryParameters = {};
|
|
25412
|
+
const headerParameters = {};
|
|
25413
|
+
headerParameters["Content-Type"] = "application/json";
|
|
25414
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25415
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25416
|
+
}
|
|
25417
|
+
let urlPath = `/api/Policy`;
|
|
25418
|
+
const response = await this.request({
|
|
25419
|
+
path: urlPath,
|
|
25420
|
+
method: "PUT",
|
|
25421
|
+
headers: headerParameters,
|
|
25422
|
+
query: queryParameters,
|
|
25423
|
+
body: CreatePolicyWithFormDataRequestToJSON(requestParameters["createPolicyWithFormDataRequest"])
|
|
25424
|
+
}, initOverrides);
|
|
25425
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
25426
|
+
}
|
|
25427
|
+
async policyUpdatePolicy(requestParameters = {}, initOverrides) {
|
|
25428
|
+
const response = await this.policyUpdatePolicyRaw(requestParameters, initOverrides);
|
|
25429
|
+
return await response.value();
|
|
25430
|
+
}
|
|
25431
|
+
async policyUpdatePolicyV2Raw(requestParameters, initOverrides) {
|
|
25432
|
+
const queryParameters = {};
|
|
25433
|
+
const headerParameters = {};
|
|
25434
|
+
headerParameters["Content-Type"] = "application/json";
|
|
25435
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25436
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25437
|
+
}
|
|
25438
|
+
let urlPath = `/api/Policy/v2/update`;
|
|
25439
|
+
const response = await this.request({
|
|
25440
|
+
path: urlPath,
|
|
25441
|
+
method: "PUT",
|
|
25442
|
+
headers: headerParameters,
|
|
25443
|
+
query: queryParameters,
|
|
25444
|
+
body: UpdatePolicyRequestToJSON(requestParameters["updatePolicyRequest"])
|
|
25445
|
+
}, initOverrides);
|
|
25446
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
25447
|
+
}
|
|
25448
|
+
async policyUpdatePolicyV2(requestParameters = {}, initOverrides) {
|
|
25449
|
+
const response = await this.policyUpdatePolicyV2Raw(requestParameters, initOverrides);
|
|
25450
|
+
return await response.value();
|
|
25451
|
+
}
|
|
25452
|
+
async policyUploadCheckPolicyRaw(requestParameters, initOverrides) {
|
|
25453
|
+
const queryParameters = {};
|
|
25454
|
+
const headerParameters = {};
|
|
25455
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
25456
|
+
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
|
|
25457
|
+
}
|
|
25458
|
+
const consumes = [
|
|
25459
|
+
{ contentType: "multipart/form-data" }
|
|
25460
|
+
];
|
|
25461
|
+
const canConsumeForm2 = canConsumeForm(consumes);
|
|
25462
|
+
let formParams;
|
|
25463
|
+
let useForm = false;
|
|
25464
|
+
useForm = canConsumeForm2;
|
|
25465
|
+
if (useForm) {
|
|
25466
|
+
formParams = new FormData;
|
|
25467
|
+
} else {
|
|
25468
|
+
formParams = new URLSearchParams;
|
|
25469
|
+
}
|
|
25470
|
+
if (requestParameters["file"] != null) {
|
|
25471
|
+
formParams.append("file", requestParameters["file"]);
|
|
25472
|
+
}
|
|
25473
|
+
let urlPath = `/api/Policy/upload/check`;
|
|
25474
|
+
const response = await this.request({
|
|
25475
|
+
path: urlPath,
|
|
25476
|
+
method: "POST",
|
|
25477
|
+
headers: headerParameters,
|
|
25478
|
+
query: queryParameters,
|
|
25479
|
+
body: formParams
|
|
25480
|
+
}, initOverrides);
|
|
25481
|
+
return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
|
|
25482
|
+
}
|
|
25483
|
+
async policyUploadCheckPolicy(requestParameters = {}, initOverrides) {
|
|
25484
|
+
const response = await this.policyUploadCheckPolicyRaw(requestParameters, initOverrides);
|
|
25485
|
+
return await response.value();
|
|
25486
|
+
}
|
|
25487
|
+
}
|
|
25488
|
+
var DEFAULT_TIMEOUT_MS = 1e4;
|
|
25489
|
+
var CLIENT_VERSION_HEADER = "ClientVersion";
|
|
25490
|
+
var JSON_MIME = /^application\/(json|[^;\s]+\+json)\s*(;.*)?$/i;
|
|
25491
|
+
async function resolvePolicyAsync(options) {
|
|
25492
|
+
const subject = options.subject;
|
|
25493
|
+
requireValue("subject", subject);
|
|
25494
|
+
requireText("subject.organizationId", subject.organizationId);
|
|
25495
|
+
requireText("subject.tenantId", subject.tenantId);
|
|
25496
|
+
requireText("subject.product", subject.product);
|
|
25497
|
+
requireText("subject.licenseType", subject.licenseType);
|
|
25498
|
+
requireText("baseUrl", options.baseUrl);
|
|
25499
|
+
requireText("clientVersion", options.clientVersion);
|
|
25500
|
+
const fetchApi = options.fetch ?? globalThis.fetch;
|
|
25501
|
+
if (typeof fetchApi !== "function") {
|
|
25502
|
+
throw new RequiredError("fetch", "No fetch implementation available. Pass options.fetch.");
|
|
25503
|
+
}
|
|
25504
|
+
const now = options.now ?? (() => new Date);
|
|
25505
|
+
const basePath = `${options.baseUrl.replace(/\/+$/, "")}/${encodeURIComponent(subject.organizationId)}/roboticsops_`;
|
|
25506
|
+
let requestUrl = basePath;
|
|
25507
|
+
const api = new PolicyApi(new Configuration({
|
|
25508
|
+
basePath,
|
|
25509
|
+
fetchApi,
|
|
25510
|
+
apiKey: async () => `Bearer ${await readToken(options.accessToken)}`,
|
|
25511
|
+
headers: {
|
|
25512
|
+
AccountId: subject.organizationId,
|
|
25513
|
+
[CLIENT_VERSION_HEADER]: options.clientVersion
|
|
25514
|
+
},
|
|
25515
|
+
middleware: [
|
|
25516
|
+
{
|
|
25517
|
+
pre: async (context) => {
|
|
25518
|
+
requestUrl = context.url;
|
|
25519
|
+
}
|
|
25520
|
+
}
|
|
25521
|
+
]
|
|
25522
|
+
}));
|
|
25523
|
+
if (options.signal?.aborted) {
|
|
25524
|
+
return unknown(subject, buildAudit(requestUrl, now), "cancelled", "The request was cancelled before it was sent.");
|
|
25525
|
+
}
|
|
25526
|
+
const controller = new AbortController;
|
|
25527
|
+
let timedOut = false;
|
|
25528
|
+
const timer = setTimeout(() => {
|
|
25529
|
+
timedOut = true;
|
|
25530
|
+
controller.abort();
|
|
25531
|
+
}, options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
|
|
25532
|
+
const relayAbort = () => controller.abort();
|
|
25533
|
+
options.signal?.addEventListener("abort", relayAbort, { once: true });
|
|
25534
|
+
let seenResponse;
|
|
25535
|
+
try {
|
|
25536
|
+
const response = await api.policyGetRulesForProductRaw({
|
|
25537
|
+
licenseType: subject.licenseType,
|
|
25538
|
+
productName: subject.product,
|
|
25539
|
+
tenantIdentifier: subject.tenantId
|
|
25540
|
+
}, { signal: controller.signal });
|
|
25541
|
+
seenResponse = response.raw;
|
|
25542
|
+
return await classifySuccess(response.raw, subject, requestUrl, now);
|
|
25543
|
+
} catch (error) {
|
|
25544
|
+
return classifyFailure(error, subject, requestUrl, now, timedOut, options.signal, seenResponse);
|
|
25545
|
+
} finally {
|
|
25546
|
+
clearTimeout(timer);
|
|
25547
|
+
options.signal?.removeEventListener("abort", relayAbort);
|
|
25548
|
+
}
|
|
25549
|
+
}
|
|
25550
|
+
async function classifySuccess(response, subject, url, now) {
|
|
25551
|
+
const audit = buildAudit(url, now, response);
|
|
25552
|
+
if (response.status === 204) {
|
|
25553
|
+
return { outcome: "ungoverned", subject, audit };
|
|
25554
|
+
}
|
|
25555
|
+
if (response.status !== 200) {
|
|
25556
|
+
return unknown(subject, audit, "serverError", `The policy service answered ${response.status}; only 200 carries a policy and only 204 means none is published.`);
|
|
25557
|
+
}
|
|
25558
|
+
const contentType = response.headers.get("content-type");
|
|
25559
|
+
if (!JSON_MIME.test(contentType ?? "")) {
|
|
25560
|
+
return unknown(subject, audit, "notJson", `Expected a JSON policy document, got content-type ${contentType ?? "(none)"}.`);
|
|
25561
|
+
}
|
|
25562
|
+
const body = await response.text();
|
|
25563
|
+
if (!isJsonObject(body)) {
|
|
25564
|
+
return unknown(subject, audit, "notJson", body.trim() === "" ? "The response body was empty." : "The response body is not a JSON object.");
|
|
25565
|
+
}
|
|
25566
|
+
return { outcome: "governed", subject, audit, document: body };
|
|
25567
|
+
}
|
|
25568
|
+
function classifyFailure(error, subject, url, now, timedOut, signal, seenResponse) {
|
|
25569
|
+
if (error instanceof ResponseError) {
|
|
25570
|
+
return unknown(subject, buildAudit(url, now, error.response), reasonForStatus(error.response.status), `The policy service answered ${error.response.status}.`);
|
|
25571
|
+
}
|
|
25572
|
+
const audit = buildAudit(url, now, seenResponse);
|
|
25573
|
+
if (timedOut) {
|
|
25574
|
+
return unknown(subject, audit, "timedOut", "The policy service did not answer within the timeout.");
|
|
25575
|
+
}
|
|
25576
|
+
if (signal?.aborted || isAbortError(error)) {
|
|
25577
|
+
return unknown(subject, audit, "cancelled", "The request was cancelled.");
|
|
25578
|
+
}
|
|
25579
|
+
return unknown(subject, audit, "transport", `The request to the policy service failed: ${describe(unwrap(error))}`);
|
|
25580
|
+
}
|
|
25581
|
+
function unwrap(error) {
|
|
25582
|
+
return error instanceof FetchError ? error.cause : error;
|
|
25583
|
+
}
|
|
25584
|
+
function reasonForStatus(status) {
|
|
25585
|
+
if (status === 401 || status === 403) {
|
|
25586
|
+
return "unauthorized";
|
|
25587
|
+
}
|
|
25588
|
+
if (status === 404) {
|
|
25589
|
+
return "notFound";
|
|
25590
|
+
}
|
|
25591
|
+
return "serverError";
|
|
25592
|
+
}
|
|
25593
|
+
function buildAudit(url, now, response) {
|
|
25594
|
+
const audit = { url, resolvedAt: now().toISOString() };
|
|
25595
|
+
if (response) {
|
|
25596
|
+
audit.httpStatus = response.status;
|
|
25597
|
+
const retryAfter = parseRetryAfter(response.headers.get("retry-after"), now);
|
|
25598
|
+
if (retryAfter !== undefined) {
|
|
25599
|
+
audit.retryAfterSeconds = retryAfter;
|
|
25600
|
+
}
|
|
25601
|
+
}
|
|
25602
|
+
return audit;
|
|
25603
|
+
}
|
|
25604
|
+
function parseRetryAfter(header, now) {
|
|
25605
|
+
if (header === null || header.trim() === "") {
|
|
25606
|
+
return;
|
|
25607
|
+
}
|
|
25608
|
+
const seconds = Number(header.trim());
|
|
25609
|
+
if (Number.isInteger(seconds) && seconds >= 0) {
|
|
25610
|
+
return seconds;
|
|
25611
|
+
}
|
|
25612
|
+
const at = Date.parse(header);
|
|
25613
|
+
if (Number.isNaN(at)) {
|
|
25614
|
+
return;
|
|
25615
|
+
}
|
|
25616
|
+
return Math.max(0, Math.round((at - now().getTime()) / 1000));
|
|
25617
|
+
}
|
|
25618
|
+
function isJsonObject(body) {
|
|
25619
|
+
if (body.trim() === "") {
|
|
25620
|
+
return false;
|
|
25621
|
+
}
|
|
25622
|
+
let parsed;
|
|
25623
|
+
try {
|
|
25624
|
+
parsed = JSON.parse(body);
|
|
25625
|
+
} catch {
|
|
25626
|
+
return false;
|
|
25627
|
+
}
|
|
25628
|
+
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed);
|
|
25629
|
+
}
|
|
25630
|
+
function unknown(subject, audit, reason, detail) {
|
|
25631
|
+
return { outcome: "unknown", subject, audit, reason, detail };
|
|
25632
|
+
}
|
|
25633
|
+
async function readToken(accessToken) {
|
|
25634
|
+
return typeof accessToken === "function" ? await accessToken() : accessToken;
|
|
25635
|
+
}
|
|
25636
|
+
function isAbortError(error) {
|
|
25637
|
+
const candidate = error instanceof Error && "cause" in error && error.cause instanceof Error ? error.cause : error;
|
|
25638
|
+
return candidate instanceof Error && candidate.name === "AbortError";
|
|
25639
|
+
}
|
|
25640
|
+
function describe(error) {
|
|
25641
|
+
return error instanceof Error ? error.message : String(error);
|
|
25642
|
+
}
|
|
25643
|
+
function requireValue(field, value) {
|
|
25644
|
+
if (value === undefined || value === null) {
|
|
25645
|
+
throw new RequiredError(field, `Required option "${field}" is missing.`);
|
|
25646
|
+
}
|
|
25647
|
+
}
|
|
25648
|
+
function requireText(field, value) {
|
|
25649
|
+
requireValue(field, value);
|
|
25650
|
+
if (typeof value !== "string" || value.trim() === "") {
|
|
25651
|
+
throw new RequiredError(field, `Required option "${field}" must be a non-empty string.`);
|
|
25652
|
+
}
|
|
25653
|
+
}
|
|
25654
|
+
|
|
23969
25655
|
// src/services/governance-policy-service.ts
|
|
23970
25656
|
import {
|
|
23971
25657
|
Path,
|
|
23972
25658
|
translate as translate2
|
|
23973
25659
|
} from "@uipath/solutionpackager-tool-core";
|
|
25660
|
+
// package.json
|
|
25661
|
+
var package_default = {
|
|
25662
|
+
name: "@uipath/project-packager",
|
|
25663
|
+
author: "UiPath",
|
|
25664
|
+
license: "SEE LICENSE IN LICENSE.txt",
|
|
25665
|
+
version: "1.203.0-preview.180",
|
|
25666
|
+
description: "UiPath Project Packager - core library for packing individual UiPath projects",
|
|
25667
|
+
type: "module",
|
|
25668
|
+
main: "./dist/index.js",
|
|
25669
|
+
exports: {
|
|
25670
|
+
".": {
|
|
25671
|
+
types: "./dist/src/index.d.ts",
|
|
25672
|
+
default: "./dist/index.js"
|
|
25673
|
+
},
|
|
25674
|
+
"./node": {
|
|
25675
|
+
types: "./dist/src/node.d.ts",
|
|
25676
|
+
default: "./dist/node.js"
|
|
25677
|
+
},
|
|
25678
|
+
"./browser": {
|
|
25679
|
+
types: "./dist/src/browser.d.ts",
|
|
25680
|
+
default: "./dist/browser.js"
|
|
25681
|
+
}
|
|
25682
|
+
},
|
|
25683
|
+
types: "./dist/src/index.d.ts",
|
|
25684
|
+
repository: {
|
|
25685
|
+
type: "git",
|
|
25686
|
+
url: "https://github.com/UiPath/cli.git",
|
|
25687
|
+
directory: "packages/packager/project-packager"
|
|
25688
|
+
},
|
|
25689
|
+
publishConfig: {
|
|
25690
|
+
registry: "https://npm.pkg.github.com/"
|
|
25691
|
+
},
|
|
25692
|
+
files: [
|
|
25693
|
+
"dist"
|
|
25694
|
+
],
|
|
25695
|
+
scripts: {
|
|
25696
|
+
build: "bun build ./src/index.ts --outdir dist --format esm --target browser --external @uipath/solutionpackager-tool-core --external '@uipath/filesystem/*' --external @uipath/filesystem --sourcemap=linked && bun build ./src/browser.ts --outdir dist --format esm --target browser --external @uipath/solutionpackager-tool-core --external '@uipath/filesystem/*' --external @uipath/filesystem --sourcemap=linked && bun build ./src/node.ts --outdir dist --format esm --target node --external @uipath/solutionpackager-tool-core --external '@uipath/filesystem/*' --external @uipath/filesystem --sourcemap=linked && tsc --emitDeclarationOnly --outDir dist",
|
|
25697
|
+
clean: "rimraf dist",
|
|
25698
|
+
test: "vitest run",
|
|
25699
|
+
e2e: "vitest run --config vitest.e2e.config.ts",
|
|
25700
|
+
"test:coverage": "vitest run --coverage",
|
|
25701
|
+
prepack: "bun run build",
|
|
25702
|
+
"publish:dry": "bun publish --dry-run",
|
|
25703
|
+
"publish:gh": "bun publish",
|
|
25704
|
+
"version:patch": "bun version patch --no-git-tag-version",
|
|
25705
|
+
"version:minor": "bun version minor --no-git-tag-version",
|
|
25706
|
+
"version:major": "bun version major --no-git-tag-version",
|
|
25707
|
+
lint: "biome check ."
|
|
25708
|
+
},
|
|
25709
|
+
dependencies: {
|
|
25710
|
+
"@uipath/aops-policy-sdk": "workspace:*",
|
|
25711
|
+
"@uipath/filesystem": "workspace:*",
|
|
25712
|
+
"@uipath/solutionpackager-tool-core": "workspace:*",
|
|
25713
|
+
"@uipath/common": "workspace:*"
|
|
25714
|
+
},
|
|
25715
|
+
peerDependencies: {
|
|
25716
|
+
fflate: "^0.8.2"
|
|
25717
|
+
},
|
|
25718
|
+
devDependencies: {
|
|
25719
|
+
"@types/node": "^25.5.2",
|
|
25720
|
+
"@uipath/resource-builder-tool": "2025.11.0-alpha4535-3530",
|
|
25721
|
+
"@uipath/tool-agent": "^2.0.0",
|
|
25722
|
+
"@uipath/packager-tool-apiworkflow": "workspace:*",
|
|
25723
|
+
"@uipath/packager-tool-connector": "workspace:*",
|
|
25724
|
+
"@uipath/packager-tool-flow": "workspace:*",
|
|
25725
|
+
"@uipath/packager-tool-functions": "workspace:*",
|
|
25726
|
+
"@uipath/packager-tool-webapp": "workspace:*",
|
|
25727
|
+
"@uipath/packager-tool-workflowcompiler": "workspace:*",
|
|
25728
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
25729
|
+
jsdom: "^30.0.1",
|
|
25730
|
+
typescript: "^7.0.2",
|
|
25731
|
+
"vite-tsconfig-paths": "^6.1.1",
|
|
25732
|
+
vitest: "^4.1.11"
|
|
25733
|
+
}
|
|
25734
|
+
};
|
|
23974
25735
|
|
|
23975
25736
|
// src/models/packager-parameters.ts
|
|
23976
25737
|
import {
|
|
@@ -23978,6 +25739,14 @@ import {
|
|
|
23978
25739
|
} from "@uipath/solutionpackager-tool-core";
|
|
23979
25740
|
|
|
23980
25741
|
// src/services/governance-policy-service.ts
|
|
25742
|
+
class GovernancePolicyError extends Error {
|
|
25743
|
+
instructions;
|
|
25744
|
+
name = "GovernancePolicyError";
|
|
25745
|
+
constructor(message, instructions) {
|
|
25746
|
+
super(message);
|
|
25747
|
+
this.instructions = instructions;
|
|
25748
|
+
}
|
|
25749
|
+
}
|
|
23981
25750
|
var LICENSE_TYPES = {
|
|
23982
25751
|
NoLicense: "NoLicense",
|
|
23983
25752
|
Development: "Development",
|
|
@@ -23987,7 +25756,7 @@ var LICENSE_TYPES = {
|
|
|
23987
25756
|
StudioPro: "StudioPro",
|
|
23988
25757
|
AutomationKit: "AutomationKit"
|
|
23989
25758
|
};
|
|
23990
|
-
var
|
|
25759
|
+
var STUDIOWEB_PRODUCT = "StudioWeb";
|
|
23991
25760
|
var ACQUIRE_LICENSE_PATH = "/orchestrator_/api/StudioWeb/AcquireLicense";
|
|
23992
25761
|
var GOVERNANCE_SUBFOLDER = "governance";
|
|
23993
25762
|
var GOVERNANCE_FILE_NAME = "governance-policy.json";
|
|
@@ -24004,87 +25773,122 @@ class GovernancePolicyService {
|
|
|
24004
25773
|
this.temporaryStorage = temporaryStorage;
|
|
24005
25774
|
this.fetchFn = fetchFn;
|
|
24006
25775
|
}
|
|
24007
|
-
async resolveGovernancePolicyAsync(validateOptions, connectionInfo, cancellationToken) {
|
|
24008
|
-
if (validateOptions.governanceFileType
|
|
25776
|
+
async resolveGovernancePolicyAsync(validateOptions, connectionInfo, cancellationToken, usage = "pack") {
|
|
25777
|
+
if (validateOptions.governanceFileType === "Default" /* Default */) {
|
|
24009
25778
|
return;
|
|
24010
25779
|
}
|
|
24011
|
-
|
|
25780
|
+
const suppliedFilePath = validateOptions.governanceFilePath;
|
|
25781
|
+
if (suppliedFilePath && validateOptions.governanceFileType === "AutomationOps" /* AutomationOps */) {
|
|
24012
25782
|
this.logger.info(t("info.alreadyProvided"));
|
|
24013
25783
|
return;
|
|
24014
25784
|
}
|
|
24015
|
-
|
|
24016
|
-
|
|
24017
|
-
|
|
24018
|
-
const accessToken = connectionInfo?.accessToken;
|
|
24019
|
-
if (!cloudUrl || !organizationId || !tenantId || !accessToken) {
|
|
24020
|
-
this.logger.warn(t("errors.connectionIncomplete"));
|
|
24021
|
-
validateOptions.governanceFileType = "Default" /* Default */;
|
|
25785
|
+
if (suppliedFilePath && usage === "analyze") {
|
|
25786
|
+
this.logger.info(t("info.alreadyProvided"));
|
|
25787
|
+
validateOptions.governanceFileType = "Studio" /* Studio */;
|
|
24022
25788
|
return;
|
|
24023
25789
|
}
|
|
24024
|
-
const
|
|
24025
|
-
|
|
24026
|
-
|
|
24027
|
-
|
|
24028
|
-
|
|
24029
|
-
|
|
24030
|
-
|
|
24031
|
-
|
|
25790
|
+
const origin = this.resolveCloudOrigin(connectionInfo?.cloudUrl);
|
|
25791
|
+
const product = validateOptions.profileKey;
|
|
25792
|
+
if (!origin || !product || !connectionInfo?.organizationId || !connectionInfo.tenantId || !connectionInfo.accessToken) {
|
|
25793
|
+
if (suppliedFilePath) {
|
|
25794
|
+
this.logger.info(t("info.noTenantToAsk", { path: suppliedFilePath }));
|
|
25795
|
+
validateOptions.governanceFileType = "Studio" /* Studio */;
|
|
25796
|
+
return;
|
|
25797
|
+
}
|
|
25798
|
+
this.warnAndUseShippedRules(validateOptions, t("errors.connectionIncomplete"));
|
|
24032
25799
|
return;
|
|
24033
25800
|
}
|
|
24034
|
-
const licenseType = await this.resolveLicenseTypeAsync(
|
|
24035
|
-
const
|
|
24036
|
-
|
|
24037
|
-
|
|
24038
|
-
|
|
25801
|
+
const licenseType = await this.resolveLicenseTypeAsync(product, connectionInfo.cloudUrl?.replace(/\/+$/, "") ?? "", connectionInfo.accessToken, cancellationToken);
|
|
25802
|
+
const subject = {
|
|
25803
|
+
organizationId: connectionInfo.organizationId,
|
|
25804
|
+
tenantId: connectionInfo.tenantId,
|
|
25805
|
+
product,
|
|
25806
|
+
licenseType
|
|
25807
|
+
};
|
|
25808
|
+
this.logger.info(t("info.resolving", { product, licenseType }));
|
|
25809
|
+
const resolution = await resolvePolicyAsync({
|
|
25810
|
+
subject,
|
|
25811
|
+
baseUrl: origin,
|
|
25812
|
+
accessToken: connectionInfo.accessToken,
|
|
25813
|
+
clientVersion: package_default.version,
|
|
25814
|
+
fetch: this.fetchFn,
|
|
25815
|
+
signal: cancellationToken
|
|
25816
|
+
});
|
|
25817
|
+
await this.applyResolutionAsync(resolution, validateOptions, suppliedFilePath);
|
|
25818
|
+
}
|
|
25819
|
+
async applyResolutionAsync(resolution, validateOptions, suppliedFilePath) {
|
|
25820
|
+
switch (resolution.outcome) {
|
|
25821
|
+
case "governed":
|
|
25822
|
+
if (suppliedFilePath) {
|
|
25823
|
+
throw new GovernancePolicyError(t("errors.tenantPolicyWins", {
|
|
25824
|
+
product: resolution.subject.product,
|
|
25825
|
+
path: suppliedFilePath
|
|
25826
|
+
}), t("instructions.tenantPolicyWins"));
|
|
25827
|
+
}
|
|
25828
|
+
await this.savePolicyAsync(validateOptions, resolution.document);
|
|
25829
|
+
return;
|
|
25830
|
+
case "ungoverned":
|
|
25831
|
+
if (suppliedFilePath) {
|
|
25832
|
+
this.logger.info(t("info.suppliedFileHonoured", {
|
|
25833
|
+
path: suppliedFilePath
|
|
25834
|
+
}));
|
|
25835
|
+
validateOptions.governanceFileType = "Studio" /* Studio */;
|
|
25836
|
+
return;
|
|
25837
|
+
}
|
|
25838
|
+
this.logger.info(t("info.ungoverned"));
|
|
25839
|
+
validateOptions.governanceFileType = "Default" /* Default */;
|
|
25840
|
+
return;
|
|
25841
|
+
case "unknown": {
|
|
25842
|
+
this.logger.warn(this.describeUnknown(resolution));
|
|
25843
|
+
if (suppliedFilePath) {
|
|
25844
|
+
this.logger.info(t("info.suppliedFileUnchecked", {
|
|
25845
|
+
path: suppliedFilePath
|
|
25846
|
+
}));
|
|
25847
|
+
validateOptions.governanceFileType = "Studio" /* Studio */;
|
|
25848
|
+
return;
|
|
25849
|
+
}
|
|
25850
|
+
validateOptions.governanceFileType = "Default" /* Default */;
|
|
25851
|
+
return;
|
|
25852
|
+
}
|
|
24039
25853
|
}
|
|
25854
|
+
}
|
|
25855
|
+
async savePolicyAsync(validateOptions, document2) {
|
|
24040
25856
|
try {
|
|
24041
25857
|
const dir = await this.temporaryStorage.getTempSubfolderPathAsync(GOVERNANCE_SUBFOLDER);
|
|
24042
25858
|
const filePath = Path.join(dir, GOVERNANCE_FILE_NAME);
|
|
24043
|
-
await this.fileSystem.writeFile(filePath,
|
|
25859
|
+
await this.fileSystem.writeFile(filePath, document2);
|
|
24044
25860
|
this.logger.info(t("info.saved", { path: filePath }));
|
|
24045
25861
|
validateOptions.governanceFilePath = filePath;
|
|
25862
|
+
validateOptions.governanceFileType = "AutomationOps" /* AutomationOps */;
|
|
24046
25863
|
} catch (error) {
|
|
24047
|
-
this.
|
|
24048
|
-
error: errorMessage(error)
|
|
24049
|
-
}));
|
|
24050
|
-
validateOptions.governanceFileType = "Default" /* Default */;
|
|
25864
|
+
this.warnAndUseShippedRules(validateOptions, t("errors.failedToSave", { error: errorMessage(error) }));
|
|
24051
25865
|
}
|
|
24052
25866
|
}
|
|
24053
|
-
|
|
24054
|
-
|
|
24055
|
-
|
|
25867
|
+
warnAndUseShippedRules(validateOptions, reason) {
|
|
25868
|
+
this.logger.warn(t("errors.fallingBackToDefault", { reason }));
|
|
25869
|
+
validateOptions.governanceFileType = "Default" /* Default */;
|
|
25870
|
+
}
|
|
25871
|
+
describeUnknown(resolution) {
|
|
25872
|
+
const reason = t("errors.unknownOutcome", {
|
|
25873
|
+
reason: resolution.reason,
|
|
25874
|
+
detail: resolution.detail,
|
|
25875
|
+
url: resolution.audit.url
|
|
25876
|
+
});
|
|
25877
|
+
const retryAfter = resolution.audit.retryAfterSeconds;
|
|
25878
|
+
return retryAfter === undefined ? reason : `${reason} ${t("errors.retryAfter", { seconds: retryAfter })}`;
|
|
25879
|
+
}
|
|
25880
|
+
resolveCloudOrigin(cloudUrl) {
|
|
25881
|
+
if (!cloudUrl) {
|
|
25882
|
+
return null;
|
|
25883
|
+
}
|
|
24056
25884
|
try {
|
|
24057
|
-
|
|
24058
|
-
|
|
24059
|
-
Authorization: `Bearer ${accessToken}`,
|
|
24060
|
-
AccountId: organizationId
|
|
24061
|
-
},
|
|
24062
|
-
signal: cancellationToken
|
|
24063
|
-
});
|
|
24064
|
-
if (response.status === 204 || response.status === 404) {
|
|
24065
|
-
this.logger.info(t("info.noPolicyFound"));
|
|
24066
|
-
return null;
|
|
24067
|
-
}
|
|
24068
|
-
if (!response.ok) {
|
|
24069
|
-
const body = await response.text();
|
|
24070
|
-
this.logger.warn(t("errors.failedToGetPolicy", { content: body }));
|
|
24071
|
-
return null;
|
|
24072
|
-
}
|
|
24073
|
-
const content = await response.text();
|
|
24074
|
-
if (!content?.trimStart().startsWith("{")) {
|
|
24075
|
-
this.logger.info(t("info.responseNotJson"));
|
|
24076
|
-
return null;
|
|
24077
|
-
}
|
|
24078
|
-
return content;
|
|
24079
|
-
} catch (error) {
|
|
24080
|
-
this.logger.warn(t("errors.failedToDownload", {
|
|
24081
|
-
error: errorMessage(error)
|
|
24082
|
-
}));
|
|
25885
|
+
return new URL(cloudUrl).origin;
|
|
25886
|
+
} catch {
|
|
24083
25887
|
return null;
|
|
24084
25888
|
}
|
|
24085
25889
|
}
|
|
24086
25890
|
async resolveLicenseTypeAsync(profileKey, cloudUrl, accessToken, cancellationToken) {
|
|
24087
|
-
const isStudioWeb = profileKey ===
|
|
25891
|
+
const isStudioWeb = profileKey === STUDIOWEB_PRODUCT;
|
|
24088
25892
|
const fallback = isStudioWeb ? LICENSE_TYPES.NoLicense : LICENSE_TYPES.Development;
|
|
24089
25893
|
try {
|
|
24090
25894
|
const response = await this.fetchFn(`${cloudUrl}${ACQUIRE_LICENSE_PATH}`, {
|
|
@@ -24142,6 +25946,7 @@ async function resolveProducedNupkgsAsync(fileSystem, packagePath) {
|
|
|
24142
25946
|
}
|
|
24143
25947
|
|
|
24144
25948
|
// src/services/pack-service.ts
|
|
25949
|
+
var PACKAGE_ID_TOO_LONG = "PACKAGE_ID_TOO_LONG";
|
|
24145
25950
|
class PackService {
|
|
24146
25951
|
disallowedCharsRegex = /[^\p{L}\p{N}_.-]/gu;
|
|
24147
25952
|
spacesDotRegex = /[\s.]+/g;
|
|
@@ -24153,7 +25958,11 @@ class PackService {
|
|
|
24153
25958
|
packageId = packageId.replace(this.dotDashRegex, "-");
|
|
24154
25959
|
packageId = packageId.replace(this.disallowedCharsRegex, "_");
|
|
24155
25960
|
if (packageId.length > this.MaxPackageIdLength) {
|
|
24156
|
-
|
|
25961
|
+
const error = new Error(`Package id ${packageId} exceeds the characters limit of ${this.MaxPackageIdLength}`);
|
|
25962
|
+
error.code = PACKAGE_ID_TOO_LONG;
|
|
25963
|
+
error.packageId = packageId;
|
|
25964
|
+
error.maxLength = this.MaxPackageIdLength;
|
|
25965
|
+
throw error;
|
|
24157
25966
|
}
|
|
24158
25967
|
return packageId;
|
|
24159
25968
|
}
|
|
@@ -24597,7 +26406,7 @@ class ProjectPackager {
|
|
|
24597
26406
|
}, cancellationToken);
|
|
24598
26407
|
}
|
|
24599
26408
|
async validateProjectAsync(options, cancellationToken) {
|
|
24600
|
-
await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken);
|
|
26409
|
+
await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken, "analyze");
|
|
24601
26410
|
const validationResult = await this.validateOptionsValidator.validateAsync(options, cancellationToken);
|
|
24602
26411
|
if (!validationResult.isSuccess) {
|
|
24603
26412
|
return validationResult;
|
|
@@ -24621,7 +26430,10 @@ class ProjectPackager {
|
|
|
24621
26430
|
}, cancellationToken);
|
|
24622
26431
|
}
|
|
24623
26432
|
async buildProjectAsync(options, cancellationToken) {
|
|
24624
|
-
await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken);
|
|
26433
|
+
const [governanceError] = await catchError(this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken));
|
|
26434
|
+
if (governanceError) {
|
|
26435
|
+
return ToolResult4.error(ToolErrorCodes4.InternalError, `Project build failed: ${governanceError.message}`, carriedInstructions(governanceError));
|
|
26436
|
+
}
|
|
24625
26437
|
const validationResult = await this.buildOptionsValidator.validateAsync(options, cancellationToken);
|
|
24626
26438
|
if (!validationResult.isSuccess) {
|
|
24627
26439
|
return validationResult;
|
|
@@ -24688,7 +26500,7 @@ class ProjectPackager {
|
|
|
24688
26500
|
} catch (error) {
|
|
24689
26501
|
const errorMessage2 = error instanceof Error ? error.message : String(error);
|
|
24690
26502
|
this.logger.error(`Processing error: ${errorMessage2}`);
|
|
24691
|
-
return ToolResult4.error(ToolErrorCodes4.InternalError, `Project pack failed: ${errorMessage2}
|
|
26503
|
+
return ToolResult4.error(ToolErrorCodes4.InternalError, `Project pack failed: ${errorMessage2}`, carriedInstructions(error));
|
|
24692
26504
|
} finally {
|
|
24693
26505
|
await this.temporaryStorage.cleanup();
|
|
24694
26506
|
}
|
|
@@ -24831,4 +26643,4 @@ export {
|
|
|
24831
26643
|
createBrowserProjectPackager
|
|
24832
26644
|
};
|
|
24833
26645
|
|
|
24834
|
-
//# debugId=
|
|
26646
|
+
//# debugId=3E36CB04868FC05E64756E2164756E21
|