@uipath/project-packager 1.202.0 → 1.203.0-preview.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js 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
- downloading: "Downloading governance policy from {url}",
35
- noPolicyFound: "No governance policy found for this configuration.",
36
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
43
- failedToGetPolicy: "Failed to download governance policy: {content}",
44
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
45
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
120
- noPolicyFound: "No governance policy found for this configuration.",
121
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
128
- failedToGetPolicy: "Failed to download governance policy: {content}",
129
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
130
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
204
- noPolicyFound: "No governance policy found for this configuration.",
205
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
212
- failedToGetPolicy: "Failed to download governance policy: {content}",
213
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
214
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
288
- noPolicyFound: "No governance policy found for this configuration.",
289
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
296
- failedToGetPolicy: "Failed to download governance policy: {content}",
297
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
298
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
372
- noPolicyFound: "No governance policy found for this configuration.",
373
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
380
- failedToGetPolicy: "Failed to download governance policy: {content}",
381
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
382
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
456
- noPolicyFound: "No governance policy found for this configuration.",
457
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
464
- failedToGetPolicy: "Failed to download governance policy: {content}",
465
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
466
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
540
- noPolicyFound: "No governance policy found for this configuration.",
541
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
548
- failedToGetPolicy: "Failed to download governance policy: {content}",
549
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
550
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
624
- noPolicyFound: "No governance policy found for this configuration.",
625
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
632
- failedToGetPolicy: "Failed to download governance policy: {content}",
633
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
634
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
708
- noPolicyFound: "No governance policy found for this configuration.",
709
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
716
- failedToGetPolicy: "Failed to download governance policy: {content}",
717
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
718
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
792
- noPolicyFound: "No governance policy found for this configuration.",
793
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
800
- failedToGetPolicy: "Failed to download governance policy: {content}",
801
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
802
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
876
- noPolicyFound: "No governance policy found for this configuration.",
877
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
884
- failedToGetPolicy: "Failed to download governance policy: {content}",
885
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
886
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
960
- noPolicyFound: "No governance policy found for this configuration.",
961
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
968
- failedToGetPolicy: "Failed to download governance policy: {content}",
969
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
970
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
1044
- noPolicyFound: "No governance policy found for this configuration.",
1045
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
1052
- failedToGetPolicy: "Failed to download governance policy: {content}",
1053
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
1054
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
1128
- noPolicyFound: "No governance policy found for this configuration.",
1129
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
1136
- failedToGetPolicy: "Failed to download governance policy: {content}",
1137
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
1138
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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
- downloading: "Downloading governance policy from {url}",
1212
- noPolicyFound: "No governance policy found for this configuration.",
1213
- responseNotJson: "Policy response is not JSON, treating as no policy.",
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, falling back to Default governance.",
1220
- failedToGetPolicy: "Failed to download governance policy: {content}",
1221
- failedToSave: "Failed to save governance policy: {error}. Falling back to Default governance.",
1222
- failedToDownload: "Failed to download governance policy: {error}. Falling back to Default governance."
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: {
@@ -1279,8 +1384,1579 @@ I18nManager.registerTranslations("zh-CN", zh_CN_default);
1279
1384
  I18nManager.registerTranslations("zh-TW", zh_TW_default);
1280
1385
  I18nManager.registerTranslations("zu", zu_default);
1281
1386
 
1387
+ // ../../gov/aops-policy-sdk/dist/policy-resolver.js
1388
+ var {createRequire} = (() => ({}));
1389
+ var BASE_PATH = "http://localhost".replace(/\/+$/, "");
1390
+
1391
+ class Configuration {
1392
+ configuration;
1393
+ constructor(configuration = {}) {
1394
+ this.configuration = configuration;
1395
+ }
1396
+ set config(configuration) {
1397
+ this.configuration = configuration;
1398
+ }
1399
+ get basePath() {
1400
+ return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
1401
+ }
1402
+ get fetchApi() {
1403
+ return this.configuration.fetchApi;
1404
+ }
1405
+ get middleware() {
1406
+ return this.configuration.middleware || [];
1407
+ }
1408
+ get queryParamsStringify() {
1409
+ return this.configuration.queryParamsStringify || querystring;
1410
+ }
1411
+ get username() {
1412
+ return this.configuration.username;
1413
+ }
1414
+ get password() {
1415
+ return this.configuration.password;
1416
+ }
1417
+ get apiKey() {
1418
+ const apiKey = this.configuration.apiKey;
1419
+ if (apiKey) {
1420
+ return typeof apiKey === "function" ? apiKey : () => apiKey;
1421
+ }
1422
+ return;
1423
+ }
1424
+ get accessToken() {
1425
+ const accessToken = this.configuration.accessToken;
1426
+ if (accessToken) {
1427
+ return typeof accessToken === "function" ? accessToken : async () => accessToken;
1428
+ }
1429
+ return;
1430
+ }
1431
+ get headers() {
1432
+ return this.configuration.headers;
1433
+ }
1434
+ get credentials() {
1435
+ return this.configuration.credentials;
1436
+ }
1437
+ }
1438
+ var DefaultConfig = new Configuration;
1439
+
1440
+ class BaseAPI {
1441
+ configuration;
1442
+ static jsonRegex = new RegExp("^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$", "i");
1443
+ middleware;
1444
+ constructor(configuration = DefaultConfig) {
1445
+ this.configuration = configuration;
1446
+ this.middleware = configuration.middleware;
1447
+ }
1448
+ withMiddleware(...middlewares) {
1449
+ const next = this.clone();
1450
+ next.middleware = next.middleware.concat(...middlewares);
1451
+ return next;
1452
+ }
1453
+ withPreMiddleware(...preMiddlewares) {
1454
+ const middlewares = preMiddlewares.map((pre) => ({ pre }));
1455
+ return this.withMiddleware(...middlewares);
1456
+ }
1457
+ withPostMiddleware(...postMiddlewares) {
1458
+ const middlewares = postMiddlewares.map((post) => ({ post }));
1459
+ return this.withMiddleware(...middlewares);
1460
+ }
1461
+ isJsonMime(mime) {
1462
+ if (!mime) {
1463
+ return false;
1464
+ }
1465
+ return BaseAPI.jsonRegex.test(mime);
1466
+ }
1467
+ async request(context, initOverrides) {
1468
+ const { url, init } = await this.createFetchParams(context, initOverrides);
1469
+ const response = await this.fetchApi(url, init);
1470
+ if (response && (response.status >= 200 && response.status < 300)) {
1471
+ return response;
1472
+ }
1473
+ throw new ResponseError(response, "Response returned an error code");
1474
+ }
1475
+ async createFetchParams(context, initOverrides) {
1476
+ let url = this.configuration.basePath + context.path;
1477
+ if (context.query !== undefined && Object.keys(context.query).length !== 0) {
1478
+ url += "?" + this.configuration.queryParamsStringify(context.query);
1479
+ }
1480
+ const headers = Object.assign({}, this.configuration.headers, context.headers);
1481
+ Object.keys(headers).forEach((key) => headers[key] === undefined ? delete headers[key] : {});
1482
+ const initOverrideFn = typeof initOverrides === "function" ? initOverrides : async () => initOverrides;
1483
+ const initParams = {
1484
+ method: context.method,
1485
+ headers,
1486
+ body: context.body,
1487
+ credentials: this.configuration.credentials
1488
+ };
1489
+ const overriddenInit = {
1490
+ ...initParams,
1491
+ ...await initOverrideFn({
1492
+ init: initParams,
1493
+ context
1494
+ })
1495
+ };
1496
+ let body;
1497
+ if (isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob(overriddenInit.body)) {
1498
+ body = overriddenInit.body;
1499
+ } else if (this.isJsonMime(headers["Content-Type"])) {
1500
+ body = JSON.stringify(overriddenInit.body);
1501
+ } else {
1502
+ body = overriddenInit.body;
1503
+ }
1504
+ const init = {
1505
+ ...overriddenInit,
1506
+ body
1507
+ };
1508
+ return { url, init };
1509
+ }
1510
+ fetchApi = async (url, init) => {
1511
+ let fetchParams = { url, init };
1512
+ for (const middleware of this.middleware) {
1513
+ if (middleware.pre) {
1514
+ fetchParams = await middleware.pre({
1515
+ fetch: this.fetchApi,
1516
+ ...fetchParams
1517
+ }) || fetchParams;
1518
+ }
1519
+ }
1520
+ let response = undefined;
1521
+ try {
1522
+ response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
1523
+ } catch (e) {
1524
+ for (const middleware of this.middleware) {
1525
+ if (middleware.onError) {
1526
+ response = await middleware.onError({
1527
+ fetch: this.fetchApi,
1528
+ url: fetchParams.url,
1529
+ init: fetchParams.init,
1530
+ error: e,
1531
+ response: response ? response.clone() : undefined
1532
+ }) || response;
1533
+ }
1534
+ }
1535
+ if (response === undefined) {
1536
+ if (e instanceof Error) {
1537
+ throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
1538
+ } else {
1539
+ throw e;
1540
+ }
1541
+ }
1542
+ }
1543
+ for (const middleware of this.middleware) {
1544
+ if (middleware.post) {
1545
+ response = await middleware.post({
1546
+ fetch: this.fetchApi,
1547
+ url: fetchParams.url,
1548
+ init: fetchParams.init,
1549
+ response: response.clone()
1550
+ }) || response;
1551
+ }
1552
+ }
1553
+ return response;
1554
+ };
1555
+ clone() {
1556
+ const constructor = this.constructor;
1557
+ const next = new constructor(this.configuration);
1558
+ next.middleware = this.middleware.slice();
1559
+ return next;
1560
+ }
1561
+ }
1562
+ function isBlob(value) {
1563
+ return typeof Blob !== "undefined" && value instanceof Blob;
1564
+ }
1565
+ function isFormData(value) {
1566
+ return typeof FormData !== "undefined" && value instanceof FormData;
1567
+ }
1568
+
1569
+ class ResponseError extends Error {
1570
+ response;
1571
+ name = "ResponseError";
1572
+ constructor(response, msg) {
1573
+ super(msg);
1574
+ this.response = response;
1575
+ }
1576
+ }
1577
+
1578
+ class FetchError extends Error {
1579
+ cause;
1580
+ name = "FetchError";
1581
+ constructor(cause, msg) {
1582
+ super(msg);
1583
+ this.cause = cause;
1584
+ }
1585
+ }
1586
+
1587
+ class RequiredError extends Error {
1588
+ field;
1589
+ name = "RequiredError";
1590
+ constructor(field, msg) {
1591
+ super(msg);
1592
+ this.field = field;
1593
+ }
1594
+ }
1595
+ function querystring(params, prefix = "") {
1596
+ return Object.keys(params).map((key) => querystringSingleKey(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
1597
+ }
1598
+ function querystringSingleKey(key, value, keyPrefix = "") {
1599
+ const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
1600
+ if (value instanceof Array) {
1601
+ const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
1602
+ return `${encodeURIComponent(fullKey)}=${multiValue}`;
1603
+ }
1604
+ if (value instanceof Set) {
1605
+ const valueAsArray = Array.from(value);
1606
+ return querystringSingleKey(key, valueAsArray, keyPrefix);
1607
+ }
1608
+ if (value instanceof Date) {
1609
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
1610
+ }
1611
+ if (value instanceof Object) {
1612
+ return querystring(value, fullKey);
1613
+ }
1614
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
1615
+ }
1616
+ function canConsumeForm(consumes) {
1617
+ for (const consume of consumes) {
1618
+ if (consume.contentType === "multipart/form-data") {
1619
+ return true;
1620
+ }
1621
+ }
1622
+ return false;
1623
+ }
1624
+
1625
+ class JSONApiResponse {
1626
+ raw;
1627
+ transformer;
1628
+ constructor(raw, transformer = (jsonValue) => jsonValue) {
1629
+ this.raw = raw;
1630
+ this.transformer = transformer;
1631
+ }
1632
+ async value() {
1633
+ return this.transformer(await this.raw.json());
1634
+ }
1635
+ }
1636
+
1637
+ class VoidApiResponse {
1638
+ raw;
1639
+ constructor(raw) {
1640
+ this.raw = raw;
1641
+ }
1642
+ async value() {
1643
+ return;
1644
+ }
1645
+ }
1646
+ class TextApiResponse {
1647
+ raw;
1648
+ constructor(raw) {
1649
+ this.raw = raw;
1650
+ }
1651
+ async value() {
1652
+ return await this.raw.text();
1653
+ }
1654
+ }
1655
+ function ProductDtoFromJSON(json) {
1656
+ return ProductDtoFromJSONTyped(json, false);
1657
+ }
1658
+ function ProductDtoFromJSONTyped(json, ignoreDiscriminator) {
1659
+ if (json == null) {
1660
+ return json;
1661
+ }
1662
+ return {
1663
+ name: json["name"] == null ? undefined : json["name"],
1664
+ label: json["label"] == null ? undefined : json["label"],
1665
+ isRestricted: json["isRestricted"] == null ? undefined : json["isRestricted"],
1666
+ isCloud: json["isCloud"] == null ? undefined : json["isCloud"],
1667
+ isRemote: json["isRemote"] == null ? undefined : json["isRemote"]
1668
+ };
1669
+ }
1670
+ function ProductDtoToJSON(json) {
1671
+ return ProductDtoToJSONTyped(json, false);
1672
+ }
1673
+ function ProductDtoToJSONTyped(value, ignoreDiscriminator = false) {
1674
+ if (value == null) {
1675
+ return value;
1676
+ }
1677
+ return {
1678
+ name: value["name"],
1679
+ label: value["label"],
1680
+ isRestricted: value["isRestricted"],
1681
+ isCloud: value["isCloud"],
1682
+ isRemote: value["isRemote"]
1683
+ };
1684
+ }
1685
+ function GlobalPolicyDtoFromJSON(json) {
1686
+ return GlobalPolicyDtoFromJSONTyped(json, false);
1687
+ }
1688
+ function GlobalPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
1689
+ if (json == null) {
1690
+ return json;
1691
+ }
1692
+ return {
1693
+ licenseType: json["licenseType"] == null ? undefined : json["licenseType"],
1694
+ identifier: json["identifier"] == null ? undefined : json["identifier"],
1695
+ policyNumber: json["policyNumber"] == null ? undefined : json["policyNumber"],
1696
+ product: json["product"] == null ? undefined : ProductDtoFromJSON(json["product"]),
1697
+ data: json["data"] == null ? undefined : json["data"]
1698
+ };
1699
+ }
1700
+ function GlobalPolicyDtoToJSON(json) {
1701
+ return GlobalPolicyDtoToJSONTyped(json, false);
1702
+ }
1703
+ function GlobalPolicyDtoToJSONTyped(value, ignoreDiscriminator = false) {
1704
+ if (value == null) {
1705
+ return value;
1706
+ }
1707
+ return {
1708
+ licenseType: value["licenseType"],
1709
+ identifier: value["identifier"],
1710
+ policyNumber: value["policyNumber"],
1711
+ product: ProductDtoToJSON(value["product"]),
1712
+ data: value["data"]
1713
+ };
1714
+ }
1715
+ function CreateGlobalPolicyWithFormDataRequestToJSON(json) {
1716
+ return CreateGlobalPolicyWithFormDataRequestToJSONTyped(json, false);
1717
+ }
1718
+ function CreateGlobalPolicyWithFormDataRequestToJSONTyped(value, ignoreDiscriminator = false) {
1719
+ if (value == null) {
1720
+ return value;
1721
+ }
1722
+ return {
1723
+ globalPolicy: GlobalPolicyDtoToJSON(value["globalPolicy"])
1724
+ };
1725
+ }
1726
+ function CreatePolicyRequestToJSON(json) {
1727
+ return CreatePolicyRequestToJSONTyped(json, false);
1728
+ }
1729
+ function CreatePolicyRequestToJSONTyped(value, ignoreDiscriminator = false) {
1730
+ if (value == null) {
1731
+ return value;
1732
+ }
1733
+ return {
1734
+ name: value["name"],
1735
+ description: value["description"],
1736
+ priority: value["priority"],
1737
+ availability: value["availability"],
1738
+ productName: value["productName"],
1739
+ data: value["data"]
1740
+ };
1741
+ }
1742
+ function FormDataDtoFromJSON(json) {
1743
+ return FormDataDtoFromJSONTyped(json, false);
1744
+ }
1745
+ function FormDataDtoFromJSONTyped(json, ignoreDiscriminator) {
1746
+ if (json == null) {
1747
+ return json;
1748
+ }
1749
+ return {
1750
+ policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
1751
+ data: json["data"] == null ? undefined : json["data"]
1752
+ };
1753
+ }
1754
+ function FormDataDtoToJSON(json) {
1755
+ return FormDataDtoToJSONTyped(json, false);
1756
+ }
1757
+ function FormDataDtoToJSONTyped(value, ignoreDiscriminator = false) {
1758
+ if (value == null) {
1759
+ return value;
1760
+ }
1761
+ return {
1762
+ policyIdentifier: value["policyIdentifier"],
1763
+ data: value["data"]
1764
+ };
1765
+ }
1766
+ function PolicyDtoFromJSON(json) {
1767
+ return PolicyDtoFromJSONTyped(json, false);
1768
+ }
1769
+ function PolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
1770
+ if (json == null) {
1771
+ return json;
1772
+ }
1773
+ return {
1774
+ name: json["name"] == null ? undefined : json["name"],
1775
+ identifier: json["identifier"] == null ? undefined : json["identifier"],
1776
+ description: json["description"] == null ? undefined : json["description"],
1777
+ priority: json["priority"] == null ? undefined : json["priority"],
1778
+ availability: json["availability"] == null ? undefined : json["availability"],
1779
+ product: json["product"] == null ? undefined : ProductDtoFromJSON(json["product"]),
1780
+ data: json["data"] == null ? undefined : FormDataDtoFromJSON(json["data"])
1781
+ };
1782
+ }
1783
+ function PolicyDtoToJSON(json) {
1784
+ return PolicyDtoToJSONTyped(json, false);
1785
+ }
1786
+ function PolicyDtoToJSONTyped(value, ignoreDiscriminator = false) {
1787
+ if (value == null) {
1788
+ return value;
1789
+ }
1790
+ return {
1791
+ name: value["name"],
1792
+ identifier: value["identifier"],
1793
+ description: value["description"],
1794
+ priority: value["priority"],
1795
+ availability: value["availability"],
1796
+ product: ProductDtoToJSON(value["product"]),
1797
+ data: FormDataDtoToJSON(value["data"])
1798
+ };
1799
+ }
1800
+ function CreatePolicyWithFormDataRequestToJSON(json) {
1801
+ return CreatePolicyWithFormDataRequestToJSONTyped(json, false);
1802
+ }
1803
+ function CreatePolicyWithFormDataRequestToJSONTyped(value, ignoreDiscriminator = false) {
1804
+ if (value == null) {
1805
+ return value;
1806
+ }
1807
+ return {
1808
+ policy: PolicyDtoToJSON(value["policy"]),
1809
+ policyFormData: FormDataDtoToJSON(value["policyFormData"])
1810
+ };
1811
+ }
1812
+ function DeployedPolicyDtoToJSON(json) {
1813
+ return DeployedPolicyDtoToJSONTyped(json, false);
1814
+ }
1815
+ function DeployedPolicyDtoToJSONTyped(value, ignoreDiscriminator = false) {
1816
+ if (value == null) {
1817
+ return value;
1818
+ }
1819
+ return {
1820
+ licenseType: value["licenseType"],
1821
+ productName: value["productName"],
1822
+ tenantIdentifier: value["tenantIdentifier"],
1823
+ userIdentifier: value["userIdentifier"]
1824
+ };
1825
+ }
1826
+ function DeployedPolicyWithoutUserDtoToJSON(json) {
1827
+ return DeployedPolicyWithoutUserDtoToJSONTyped(json, false);
1828
+ }
1829
+ function DeployedPolicyWithoutUserDtoToJSONTyped(value, ignoreDiscriminator = false) {
1830
+ if (value == null) {
1831
+ return value;
1832
+ }
1833
+ return {
1834
+ licenseType: value["licenseType"],
1835
+ productName: value["productName"],
1836
+ tenantIdentifier: value["tenantIdentifier"]
1837
+ };
1838
+ }
1839
+ function DeploymentLevelFromJSON(json) {
1840
+ return DeploymentLevelFromJSONTyped(json, false);
1841
+ }
1842
+ function DeploymentLevelFromJSONTyped(json, ignoreDiscriminator) {
1843
+ return json;
1844
+ }
1845
+ function TenantPolicyDtoFromJSON(json) {
1846
+ return TenantPolicyDtoFromJSONTyped(json, false);
1847
+ }
1848
+ function TenantPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
1849
+ if (json == null) {
1850
+ return json;
1851
+ }
1852
+ return {
1853
+ tenantIdentifier: json["tenantIdentifier"] == null ? undefined : json["tenantIdentifier"],
1854
+ policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
1855
+ productIdentifier: json["productIdentifier"] == null ? undefined : json["productIdentifier"],
1856
+ licenseTypeIdentifier: json["licenseTypeIdentifier"] == null ? undefined : json["licenseTypeIdentifier"],
1857
+ tenantName: json["tenantName"] == null ? undefined : json["tenantName"]
1858
+ };
1859
+ }
1860
+ function GroupPolicyDtoFromJSON(json) {
1861
+ return GroupPolicyDtoFromJSONTyped(json, false);
1862
+ }
1863
+ function GroupPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
1864
+ if (json == null) {
1865
+ return json;
1866
+ }
1867
+ return {
1868
+ policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
1869
+ productIdentifier: json["productIdentifier"] == null ? undefined : json["productIdentifier"],
1870
+ groupId: json["groupId"] == null ? undefined : json["groupId"],
1871
+ groupName: json["groupName"] == null ? undefined : json["groupName"]
1872
+ };
1873
+ }
1874
+ function UserPolicyDtoFromJSON(json) {
1875
+ return UserPolicyDtoFromJSONTyped(json, false);
1876
+ }
1877
+ function UserPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
1878
+ if (json == null) {
1879
+ return json;
1880
+ }
1881
+ return {
1882
+ policyIdentifier: json["policyIdentifier"] == null ? undefined : json["policyIdentifier"],
1883
+ productIdentifier: json["productIdentifier"] == null ? undefined : json["productIdentifier"],
1884
+ userId: json["userId"] == null ? undefined : json["userId"],
1885
+ userName: json["userName"] == null ? undefined : json["userName"]
1886
+ };
1887
+ }
1888
+ function FederatedPolicyDtoFromJSON(json) {
1889
+ return FederatedPolicyDtoFromJSONTyped(json, false);
1890
+ }
1891
+ function FederatedPolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
1892
+ if (json == null) {
1893
+ return json;
1894
+ }
1895
+ return {
1896
+ name: json["name"] == null ? undefined : json["name"],
1897
+ identifier: json["identifier"] == null ? undefined : json["identifier"],
1898
+ product: json["product"] == null ? undefined : ProductDtoFromJSON(json["product"]),
1899
+ description: json["description"] == null ? undefined : json["description"],
1900
+ priority: json["priority"] == null ? undefined : json["priority"],
1901
+ availability: json["availability"] == null ? undefined : json["availability"],
1902
+ tenantPolicies: json["tenantPolicies"] == null ? undefined : json["tenantPolicies"].map(TenantPolicyDtoFromJSON),
1903
+ userPolicies: json["userPolicies"] == null ? undefined : json["userPolicies"].map(UserPolicyDtoFromJSON),
1904
+ groupPolicies: json["groupPolicies"] == null ? undefined : json["groupPolicies"].map(GroupPolicyDtoFromJSON)
1905
+ };
1906
+ }
1907
+ function FederatedPolicyDtoPagedResultFromJSON(json) {
1908
+ return FederatedPolicyDtoPagedResultFromJSONTyped(json, false);
1909
+ }
1910
+ function FederatedPolicyDtoPagedResultFromJSONTyped(json, ignoreDiscriminator) {
1911
+ if (json == null) {
1912
+ return json;
1913
+ }
1914
+ return {
1915
+ totalCount: json["totalCount"] == null ? undefined : json["totalCount"],
1916
+ result: json["result"] == null ? undefined : json["result"].map(FederatedPolicyDtoFromJSON)
1917
+ };
1918
+ }
1919
+ function ImportPolicyRequestFromJSON(json) {
1920
+ return ImportPolicyRequestFromJSONTyped(json, false);
1921
+ }
1922
+ function ImportPolicyRequestFromJSONTyped(json, ignoreDiscriminator) {
1923
+ if (json == null) {
1924
+ return json;
1925
+ }
1926
+ return {
1927
+ productName: json["product-name"] == null ? undefined : json["product-name"],
1928
+ policyName: json["policy-name"] == null ? undefined : json["policy-name"],
1929
+ version: json["version"] == null ? undefined : json["version"],
1930
+ data: json["data"] == null ? undefined : json["data"]
1931
+ };
1932
+ }
1933
+ function PolicyDtoPagedResultFromJSON(json) {
1934
+ return PolicyDtoPagedResultFromJSONTyped(json, false);
1935
+ }
1936
+ function PolicyDtoPagedResultFromJSONTyped(json, ignoreDiscriminator) {
1937
+ if (json == null) {
1938
+ return json;
1939
+ }
1940
+ return {
1941
+ totalCount: json["totalCount"] == null ? undefined : json["totalCount"],
1942
+ result: json["result"] == null ? undefined : json["result"].map(PolicyDtoFromJSON)
1943
+ };
1944
+ }
1945
+ function PolicyExportResponseFromJSON(json) {
1946
+ return PolicyExportResponseFromJSONTyped(json, false);
1947
+ }
1948
+ function PolicyExportResponseFromJSONTyped(json, ignoreDiscriminator) {
1949
+ if (json == null) {
1950
+ return json;
1951
+ }
1952
+ return {
1953
+ identifier: json["identifier"] == null ? undefined : json["identifier"],
1954
+ name: json["name"] == null ? undefined : json["name"],
1955
+ availability: json["availability"] == null ? undefined : json["availability"],
1956
+ data: json["data"] == null ? undefined : json["data"],
1957
+ priority: json["priority"] == null ? undefined : json["priority"],
1958
+ deploymentLevel: json["deploymentLevel"] == null ? undefined : DeploymentLevelFromJSON(json["deploymentLevel"])
1959
+ };
1960
+ }
1961
+ function PolicyInfoDtoFromJSON(json) {
1962
+ return PolicyInfoDtoFromJSONTyped(json, false);
1963
+ }
1964
+ function PolicyInfoDtoFromJSONTyped(json, ignoreDiscriminator) {
1965
+ if (json == null) {
1966
+ return json;
1967
+ }
1968
+ return {
1969
+ name: json["name"] == null ? undefined : json["name"],
1970
+ identifier: json["identifier"] == null ? undefined : json["identifier"],
1971
+ product: json["product"] == null ? undefined : json["product"]
1972
+ };
1973
+ }
1974
+ function PolicyUsageDataFromJSON(json) {
1975
+ return PolicyUsageDataFromJSONTyped(json, false);
1976
+ }
1977
+ function PolicyUsageDataFromJSONTyped(json, ignoreDiscriminator) {
1978
+ if (json == null) {
1979
+ return json;
1980
+ }
1981
+ return {
1982
+ tenants: json["tenants"] == null ? undefined : json["tenants"],
1983
+ users: json["users"] == null ? undefined : json["users"],
1984
+ groups: json["groups"] == null ? undefined : json["groups"]
1985
+ };
1986
+ }
1987
+ function UpdatePolicyRequestToJSON(json) {
1988
+ return UpdatePolicyRequestToJSONTyped(json, false);
1989
+ }
1990
+ function UpdatePolicyRequestToJSONTyped(value, ignoreDiscriminator = false) {
1991
+ if (value == null) {
1992
+ return value;
1993
+ }
1994
+ return {
1995
+ name: value["name"],
1996
+ identifier: value["identifier"],
1997
+ description: value["description"],
1998
+ priority: value["priority"],
1999
+ availability: value["availability"],
2000
+ productName: value["productName"],
2001
+ data: value["data"]
2002
+ };
2003
+ }
2004
+
2005
+ class PolicyApi extends BaseAPI {
2006
+ async policyCreateDefaultPolicyForAllProductsRaw(initOverrides) {
2007
+ const queryParameters = {};
2008
+ const headerParameters = {};
2009
+ if (this.configuration && this.configuration.apiKey) {
2010
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2011
+ }
2012
+ let urlPath = `/api/Policy/default`;
2013
+ const response = await this.request({
2014
+ path: urlPath,
2015
+ method: "POST",
2016
+ headers: headerParameters,
2017
+ query: queryParameters
2018
+ }, initOverrides);
2019
+ return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
2020
+ }
2021
+ async policyCreateDefaultPolicyForAllProducts(initOverrides) {
2022
+ const response = await this.policyCreateDefaultPolicyForAllProductsRaw(initOverrides);
2023
+ return await response.value();
2024
+ }
2025
+ async policyCreateFormDataRaw(requestParameters, initOverrides) {
2026
+ if (requestParameters["policyIdentifier"] == null) {
2027
+ throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyCreateFormData().');
2028
+ }
2029
+ const queryParameters = {};
2030
+ const headerParameters = {};
2031
+ headerParameters["Content-Type"] = "application/json";
2032
+ if (this.configuration && this.configuration.apiKey) {
2033
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2034
+ }
2035
+ let urlPath = `/api/Policy/form-data/{policyIdentifier}`;
2036
+ urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
2037
+ const response = await this.request({
2038
+ path: urlPath,
2039
+ method: "PUT",
2040
+ headers: headerParameters,
2041
+ query: queryParameters,
2042
+ body: requestParameters["body"]
2043
+ }, initOverrides);
2044
+ if (this.isJsonMime(response.headers.get("content-type"))) {
2045
+ return new JSONApiResponse(response);
2046
+ } else {
2047
+ return new TextApiResponse(response);
2048
+ }
2049
+ }
2050
+ async policyCreateFormData(requestParameters, initOverrides) {
2051
+ const response = await this.policyCreateFormDataRaw(requestParameters, initOverrides);
2052
+ return await response.value();
2053
+ }
2054
+ async policyCreateGlobalPolicyRaw(requestParameters, initOverrides) {
2055
+ const queryParameters = {};
2056
+ const headerParameters = {};
2057
+ headerParameters["Content-Type"] = "application/json";
2058
+ if (this.configuration && this.configuration.apiKey) {
2059
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2060
+ }
2061
+ let urlPath = `/api/Policy/global`;
2062
+ const response = await this.request({
2063
+ path: urlPath,
2064
+ method: "POST",
2065
+ headers: headerParameters,
2066
+ query: queryParameters,
2067
+ body: CreateGlobalPolicyWithFormDataRequestToJSON(requestParameters["createGlobalPolicyWithFormDataRequest"])
2068
+ }, initOverrides);
2069
+ return new JSONApiResponse(response, (jsonValue) => GlobalPolicyDtoFromJSON(jsonValue));
2070
+ }
2071
+ async policyCreateGlobalPolicy(requestParameters = {}, initOverrides) {
2072
+ const response = await this.policyCreateGlobalPolicyRaw(requestParameters, initOverrides);
2073
+ return await response.value();
2074
+ }
2075
+ async policyCreatePolicyRaw(requestParameters, initOverrides) {
2076
+ const queryParameters = {};
2077
+ if (requestParameters["telemetryFlowId"] != null) {
2078
+ queryParameters["telemetryFlowId"] = requestParameters["telemetryFlowId"];
2079
+ }
2080
+ const headerParameters = {};
2081
+ headerParameters["Content-Type"] = "application/json";
2082
+ if (this.configuration && this.configuration.apiKey) {
2083
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2084
+ }
2085
+ let urlPath = `/api/Policy`;
2086
+ const response = await this.request({
2087
+ path: urlPath,
2088
+ method: "POST",
2089
+ headers: headerParameters,
2090
+ query: queryParameters,
2091
+ body: CreatePolicyWithFormDataRequestToJSON(requestParameters["createPolicyWithFormDataRequest"])
2092
+ }, initOverrides);
2093
+ return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
2094
+ }
2095
+ async policyCreatePolicy(requestParameters = {}, initOverrides) {
2096
+ const response = await this.policyCreatePolicyRaw(requestParameters, initOverrides);
2097
+ return await response.value();
2098
+ }
2099
+ async policyCreatePolicyV2Raw(requestParameters, initOverrides) {
2100
+ const queryParameters = {};
2101
+ if (requestParameters["telemetryFlowId"] != null) {
2102
+ queryParameters["telemetryFlowId"] = requestParameters["telemetryFlowId"];
2103
+ }
2104
+ const headerParameters = {};
2105
+ headerParameters["Content-Type"] = "application/json";
2106
+ if (this.configuration && this.configuration.apiKey) {
2107
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2108
+ }
2109
+ let urlPath = `/api/Policy/v2/create`;
2110
+ const response = await this.request({
2111
+ path: urlPath,
2112
+ method: "POST",
2113
+ headers: headerParameters,
2114
+ query: queryParameters,
2115
+ body: CreatePolicyRequestToJSON(requestParameters["createPolicyRequest"])
2116
+ }, initOverrides);
2117
+ return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
2118
+ }
2119
+ async policyCreatePolicyV2(requestParameters = {}, initOverrides) {
2120
+ const response = await this.policyCreatePolicyV2Raw(requestParameters, initOverrides);
2121
+ return await response.value();
2122
+ }
2123
+ async policyDeletePolicyRaw(requestParameters, initOverrides) {
2124
+ if (requestParameters["policyIdentifier"] == null) {
2125
+ throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyDeletePolicy().');
2126
+ }
2127
+ const queryParameters = {};
2128
+ const headerParameters = {};
2129
+ if (this.configuration && this.configuration.apiKey) {
2130
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2131
+ }
2132
+ let urlPath = `/api/Policy/{policyIdentifier}`;
2133
+ urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
2134
+ const response = await this.request({
2135
+ path: urlPath,
2136
+ method: "DELETE",
2137
+ headers: headerParameters,
2138
+ query: queryParameters
2139
+ }, initOverrides);
2140
+ return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
2141
+ }
2142
+ async policyDeletePolicy(requestParameters, initOverrides) {
2143
+ const response = await this.policyDeletePolicyRaw(requestParameters, initOverrides);
2144
+ return await response.value();
2145
+ }
2146
+ async policyDeletePolicyByProductNameAndPolicyNameRaw(requestParameters, initOverrides) {
2147
+ if (requestParameters["productName"] == null) {
2148
+ throw new RequiredError("productName", 'Required parameter "productName" was null or undefined when calling policyDeletePolicyByProductNameAndPolicyName().');
2149
+ }
2150
+ if (requestParameters["policyName"] == null) {
2151
+ throw new RequiredError("policyName", 'Required parameter "policyName" was null or undefined when calling policyDeletePolicyByProductNameAndPolicyName().');
2152
+ }
2153
+ const queryParameters = {};
2154
+ const headerParameters = {};
2155
+ if (this.configuration && this.configuration.apiKey) {
2156
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2157
+ }
2158
+ let urlPath = `/api/Policy/product/{productName}/policy/{policyName}`;
2159
+ urlPath = urlPath.replace(`{${"productName"}}`, encodeURIComponent(String(requestParameters["productName"])));
2160
+ urlPath = urlPath.replace(`{${"policyName"}}`, encodeURIComponent(String(requestParameters["policyName"])));
2161
+ const response = await this.request({
2162
+ path: urlPath,
2163
+ method: "DELETE",
2164
+ headers: headerParameters,
2165
+ query: queryParameters
2166
+ }, initOverrides);
2167
+ return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
2168
+ }
2169
+ async policyDeletePolicyByProductNameAndPolicyName(requestParameters, initOverrides) {
2170
+ const response = await this.policyDeletePolicyByProductNameAndPolicyNameRaw(requestParameters, initOverrides);
2171
+ return await response.value();
2172
+ }
2173
+ async policyDownloadPolicyByIdentifierRaw(requestParameters, initOverrides) {
2174
+ if (requestParameters["policyIdentifier"] == null) {
2175
+ throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyDownloadPolicyByIdentifier().');
2176
+ }
2177
+ const queryParameters = {};
2178
+ const headerParameters = {};
2179
+ if (this.configuration && this.configuration.apiKey) {
2180
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2181
+ }
2182
+ let urlPath = `/api/Policy/{policyIdentifier}/download`;
2183
+ urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
2184
+ const response = await this.request({
2185
+ path: urlPath,
2186
+ method: "GET",
2187
+ headers: headerParameters,
2188
+ query: queryParameters
2189
+ }, initOverrides);
2190
+ return new JSONApiResponse(response, (jsonValue) => PolicyUsageDataFromJSON(jsonValue));
2191
+ }
2192
+ async policyDownloadPolicyByIdentifier(requestParameters, initOverrides) {
2193
+ const response = await this.policyDownloadPolicyByIdentifierRaw(requestParameters, initOverrides);
2194
+ return await response.value();
2195
+ }
2196
+ async policyGetAllPoliciesRaw(initOverrides) {
2197
+ const queryParameters = {};
2198
+ const headerParameters = {};
2199
+ if (this.configuration && this.configuration.apiKey) {
2200
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2201
+ }
2202
+ let urlPath = `/api/Policy`;
2203
+ const response = await this.request({
2204
+ path: urlPath,
2205
+ method: "GET",
2206
+ headers: headerParameters,
2207
+ query: queryParameters
2208
+ }, initOverrides);
2209
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyDtoFromJSON));
2210
+ }
2211
+ async policyGetAllPolicies(initOverrides) {
2212
+ const response = await this.policyGetAllPoliciesRaw(initOverrides);
2213
+ return await response.value();
2214
+ }
2215
+ async policyGetAllPoliciesByProductIdRaw(requestParameters, initOverrides) {
2216
+ if (requestParameters["productIdentifier"] == null) {
2217
+ throw new RequiredError("productIdentifier", 'Required parameter "productIdentifier" was null or undefined when calling policyGetAllPoliciesByProductId().');
2218
+ }
2219
+ const queryParameters = {};
2220
+ const headerParameters = {};
2221
+ if (this.configuration && this.configuration.apiKey) {
2222
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2223
+ }
2224
+ let urlPath = `/api/Policy/{productIdentifier}`;
2225
+ urlPath = urlPath.replace(`{${"productIdentifier"}}`, encodeURIComponent(String(requestParameters["productIdentifier"])));
2226
+ const response = await this.request({
2227
+ path: urlPath,
2228
+ method: "GET",
2229
+ headers: headerParameters,
2230
+ query: queryParameters
2231
+ }, initOverrides);
2232
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyDtoFromJSON));
2233
+ }
2234
+ async policyGetAllPoliciesByProductId(requestParameters, initOverrides) {
2235
+ const response = await this.policyGetAllPoliciesByProductIdRaw(requestParameters, initOverrides);
2236
+ return await response.value();
2237
+ }
2238
+ async policyGetAllPoliciesByQueryOptionsRaw(requestParameters, initOverrides) {
2239
+ const queryParameters = {};
2240
+ if (requestParameters["productLabel"] != null) {
2241
+ queryParameters["productLabel"] = requestParameters["productLabel"];
2242
+ }
2243
+ if (requestParameters["productName"] != null) {
2244
+ queryParameters["productName"] = requestParameters["productName"];
2245
+ }
2246
+ if (requestParameters["productNames"] != null) {
2247
+ queryParameters["productNames"] = requestParameters["productNames"];
2248
+ }
2249
+ if (requestParameters["sortBy"] != null) {
2250
+ queryParameters["sortBy"] = requestParameters["sortBy"];
2251
+ }
2252
+ if (requestParameters["sortOrder"] != null) {
2253
+ queryParameters["sortOrder"] = requestParameters["sortOrder"];
2254
+ }
2255
+ if (requestParameters["pageIndex"] != null) {
2256
+ queryParameters["pageIndex"] = requestParameters["pageIndex"];
2257
+ }
2258
+ if (requestParameters["pageSize"] != null) {
2259
+ queryParameters["pageSize"] = requestParameters["pageSize"];
2260
+ }
2261
+ if (requestParameters["searchTerm"] != null) {
2262
+ queryParameters["searchTerm"] = requestParameters["searchTerm"];
2263
+ }
2264
+ const headerParameters = {};
2265
+ if (this.configuration && this.configuration.apiKey) {
2266
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2267
+ }
2268
+ let urlPath = `/api/Policy/paged`;
2269
+ const response = await this.request({
2270
+ path: urlPath,
2271
+ method: "GET",
2272
+ headers: headerParameters,
2273
+ query: queryParameters
2274
+ }, initOverrides);
2275
+ return new JSONApiResponse(response, (jsonValue) => PolicyDtoPagedResultFromJSON(jsonValue));
2276
+ }
2277
+ async policyGetAllPoliciesByQueryOptions(requestParameters = {}, initOverrides) {
2278
+ const response = await this.policyGetAllPoliciesByQueryOptionsRaw(requestParameters, initOverrides);
2279
+ return await response.value();
2280
+ }
2281
+ async policyGetAllRulesForProductRaw(requestParameters, initOverrides) {
2282
+ if (requestParameters["licenseType"] == null) {
2283
+ throw new RequiredError("licenseType", 'Required parameter "licenseType" was null or undefined when calling policyGetAllRulesForProduct().');
2284
+ }
2285
+ if (requestParameters["productName"] == null) {
2286
+ throw new RequiredError("productName", 'Required parameter "productName" was null or undefined when calling policyGetAllRulesForProduct().');
2287
+ }
2288
+ if (requestParameters["tenantIdentifier"] == null) {
2289
+ throw new RequiredError("tenantIdentifier", 'Required parameter "tenantIdentifier" was null or undefined when calling policyGetAllRulesForProduct().');
2290
+ }
2291
+ const queryParameters = {};
2292
+ const headerParameters = {};
2293
+ if (this.configuration && this.configuration.apiKey) {
2294
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2295
+ }
2296
+ let urlPath = `/api/Policy/all/license/{licenseType}/product/{productName}/tenant/{tenantIdentifier}`;
2297
+ urlPath = urlPath.replace(`{${"licenseType"}}`, encodeURIComponent(String(requestParameters["licenseType"])));
2298
+ urlPath = urlPath.replace(`{${"productName"}}`, encodeURIComponent(String(requestParameters["productName"])));
2299
+ urlPath = urlPath.replace(`{${"tenantIdentifier"}}`, encodeURIComponent(String(requestParameters["tenantIdentifier"])));
2300
+ const response = await this.request({
2301
+ path: urlPath,
2302
+ method: "GET",
2303
+ headers: headerParameters,
2304
+ query: queryParameters
2305
+ }, initOverrides);
2306
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyExportResponseFromJSON));
2307
+ }
2308
+ async policyGetAllRulesForProduct(requestParameters, initOverrides) {
2309
+ const response = await this.policyGetAllRulesForProductRaw(requestParameters, initOverrides);
2310
+ return await response.value();
2311
+ }
2312
+ async policyGetDeployedPolicyRaw(requestParameters, initOverrides) {
2313
+ const queryParameters = {};
2314
+ const headerParameters = {};
2315
+ headerParameters["Content-Type"] = "application/json";
2316
+ if (requestParameters["xUiPathClientVersion"] != null) {
2317
+ headerParameters["x-UiPath-ClientVersion"] = String(requestParameters["xUiPathClientVersion"]);
2318
+ }
2319
+ if (this.configuration && this.configuration.apiKey) {
2320
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2321
+ }
2322
+ let urlPath = `/api/Policy/deployed-policy`;
2323
+ const response = await this.request({
2324
+ path: urlPath,
2325
+ method: "POST",
2326
+ headers: headerParameters,
2327
+ query: queryParameters,
2328
+ body: DeployedPolicyDtoToJSON(requestParameters["deployedPolicyDto"])
2329
+ }, initOverrides);
2330
+ return new VoidApiResponse(response);
2331
+ }
2332
+ async policyGetDeployedPolicy(requestParameters = {}, initOverrides) {
2333
+ await this.policyGetDeployedPolicyRaw(requestParameters, initOverrides);
2334
+ }
2335
+ async policyGetDeployedTenantPoliciesRaw(requestParameters, initOverrides) {
2336
+ const queryParameters = {};
2337
+ const headerParameters = {};
2338
+ headerParameters["Content-Type"] = "application/json";
2339
+ if (requestParameters["xUiPathClientVersion"] != null) {
2340
+ headerParameters["x-UiPath-ClientVersion"] = String(requestParameters["xUiPathClientVersion"]);
2341
+ }
2342
+ if (this.configuration && this.configuration.apiKey) {
2343
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2344
+ }
2345
+ let urlPath = `/api/Policy/deployed-policy/tenant`;
2346
+ const response = await this.request({
2347
+ path: urlPath,
2348
+ method: "POST",
2349
+ headers: headerParameters,
2350
+ query: queryParameters,
2351
+ body: DeployedPolicyWithoutUserDtoToJSON(requestParameters["deployedPolicyWithoutUserDto"])
2352
+ }, initOverrides);
2353
+ return new VoidApiResponse(response);
2354
+ }
2355
+ async policyGetDeployedTenantPolicies(requestParameters = {}, initOverrides) {
2356
+ await this.policyGetDeployedTenantPoliciesRaw(requestParameters, initOverrides);
2357
+ }
2358
+ async policyGetFederatedPoliciesByQueryOptionsRaw(requestParameters, initOverrides) {
2359
+ const queryParameters = {};
2360
+ if (requestParameters["productLabel"] != null) {
2361
+ queryParameters["productLabel"] = requestParameters["productLabel"];
2362
+ }
2363
+ if (requestParameters["productName"] != null) {
2364
+ queryParameters["productName"] = requestParameters["productName"];
2365
+ }
2366
+ if (requestParameters["productNames"] != null) {
2367
+ queryParameters["productNames"] = requestParameters["productNames"];
2368
+ }
2369
+ if (requestParameters["sortBy"] != null) {
2370
+ queryParameters["sortBy"] = requestParameters["sortBy"];
2371
+ }
2372
+ if (requestParameters["sortOrder"] != null) {
2373
+ queryParameters["sortOrder"] = requestParameters["sortOrder"];
2374
+ }
2375
+ if (requestParameters["pageIndex"] != null) {
2376
+ queryParameters["pageIndex"] = requestParameters["pageIndex"];
2377
+ }
2378
+ if (requestParameters["pageSize"] != null) {
2379
+ queryParameters["pageSize"] = requestParameters["pageSize"];
2380
+ }
2381
+ if (requestParameters["searchTerm"] != null) {
2382
+ queryParameters["searchTerm"] = requestParameters["searchTerm"];
2383
+ }
2384
+ const headerParameters = {};
2385
+ if (this.configuration && this.configuration.apiKey) {
2386
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2387
+ }
2388
+ let urlPath = `/api/Policy/federated/paged`;
2389
+ const response = await this.request({
2390
+ path: urlPath,
2391
+ method: "GET",
2392
+ headers: headerParameters,
2393
+ query: queryParameters
2394
+ }, initOverrides);
2395
+ return new JSONApiResponse(response, (jsonValue) => FederatedPolicyDtoPagedResultFromJSON(jsonValue));
2396
+ }
2397
+ async policyGetFederatedPoliciesByQueryOptions(requestParameters = {}, initOverrides) {
2398
+ const response = await this.policyGetFederatedPoliciesByQueryOptionsRaw(requestParameters, initOverrides);
2399
+ return await response.value();
2400
+ }
2401
+ async policyGetFormDataByPolicyIdRaw(requestParameters, initOverrides) {
2402
+ if (requestParameters["policyIdentifier"] == null) {
2403
+ throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetFormDataByPolicyId().');
2404
+ }
2405
+ const queryParameters = {};
2406
+ const headerParameters = {};
2407
+ if (this.configuration && this.configuration.apiKey) {
2408
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2409
+ }
2410
+ let urlPath = `/api/Policy/form-data/{policyIdentifier}`;
2411
+ urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
2412
+ const response = await this.request({
2413
+ path: urlPath,
2414
+ method: "GET",
2415
+ headers: headerParameters,
2416
+ query: queryParameters
2417
+ }, initOverrides);
2418
+ if (this.isJsonMime(response.headers.get("content-type"))) {
2419
+ return new JSONApiResponse(response);
2420
+ } else {
2421
+ return new TextApiResponse(response);
2422
+ }
2423
+ }
2424
+ async policyGetFormDataByPolicyId(requestParameters, initOverrides) {
2425
+ const response = await this.policyGetFormDataByPolicyIdRaw(requestParameters, initOverrides);
2426
+ return await response.value();
2427
+ }
2428
+ async policyGetGlobalPolicyByLicenseTypeAndProductNameRaw(requestParameters, initOverrides) {
2429
+ if (requestParameters["licenseType"] == null) {
2430
+ throw new RequiredError("licenseType", 'Required parameter "licenseType" was null or undefined when calling policyGetGlobalPolicyByLicenseTypeAndProductName().');
2431
+ }
2432
+ if (requestParameters["productIdentifier"] == null) {
2433
+ throw new RequiredError("productIdentifier", 'Required parameter "productIdentifier" was null or undefined when calling policyGetGlobalPolicyByLicenseTypeAndProductName().');
2434
+ }
2435
+ const queryParameters = {};
2436
+ const headerParameters = {};
2437
+ if (this.configuration && this.configuration.apiKey) {
2438
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2439
+ }
2440
+ let urlPath = `/api/Policy/global/license/{licenseType}/product/{productIdentifier}`;
2441
+ urlPath = urlPath.replace(`{${"licenseType"}}`, encodeURIComponent(String(requestParameters["licenseType"])));
2442
+ urlPath = urlPath.replace(`{${"productIdentifier"}}`, encodeURIComponent(String(requestParameters["productIdentifier"])));
2443
+ const response = await this.request({
2444
+ path: urlPath,
2445
+ method: "GET",
2446
+ headers: headerParameters,
2447
+ query: queryParameters
2448
+ }, initOverrides);
2449
+ return new JSONApiResponse(response, (jsonValue) => GlobalPolicyDtoFromJSON(jsonValue));
2450
+ }
2451
+ async policyGetGlobalPolicyByLicenseTypeAndProductName(requestParameters, initOverrides) {
2452
+ const response = await this.policyGetGlobalPolicyByLicenseTypeAndProductNameRaw(requestParameters, initOverrides);
2453
+ return await response.value();
2454
+ }
2455
+ async policyGetGroupPoliciesForAllProductsRaw(requestParameters, initOverrides) {
2456
+ if (requestParameters["identifier"] == null) {
2457
+ throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetGroupPoliciesForAllProducts().');
2458
+ }
2459
+ const queryParameters = {};
2460
+ const headerParameters = {};
2461
+ if (this.configuration && this.configuration.apiKey) {
2462
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2463
+ }
2464
+ let urlPath = `/api/Policy/group/{identifier}`;
2465
+ urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
2466
+ const response = await this.request({
2467
+ path: urlPath,
2468
+ method: "GET",
2469
+ headers: headerParameters,
2470
+ query: queryParameters
2471
+ }, initOverrides);
2472
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(GroupPolicyDtoFromJSON));
2473
+ }
2474
+ async policyGetGroupPoliciesForAllProducts(requestParameters, initOverrides) {
2475
+ const response = await this.policyGetGroupPoliciesForAllProductsRaw(requestParameters, initOverrides);
2476
+ return await response.value();
2477
+ }
2478
+ async policyGetPoliciesByProductIdentifiersRaw(requestParameters, initOverrides) {
2479
+ const queryParameters = {};
2480
+ if (requestParameters["ids"] != null) {
2481
+ queryParameters["ids"] = requestParameters["ids"];
2482
+ }
2483
+ const headerParameters = {};
2484
+ if (this.configuration && this.configuration.apiKey) {
2485
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2486
+ }
2487
+ let urlPath = `/api/Policy/filter/products`;
2488
+ const response = await this.request({
2489
+ path: urlPath,
2490
+ method: "GET",
2491
+ headers: headerParameters,
2492
+ query: queryParameters
2493
+ }, initOverrides);
2494
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(PolicyInfoDtoFromJSON));
2495
+ }
2496
+ async policyGetPoliciesByProductIdentifiers(requestParameters = {}, initOverrides) {
2497
+ const response = await this.policyGetPoliciesByProductIdentifiersRaw(requestParameters, initOverrides);
2498
+ return await response.value();
2499
+ }
2500
+ async policyGetPolicyByIdRaw(requestParameters, initOverrides) {
2501
+ if (requestParameters["policyIdentifier"] == null) {
2502
+ throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetPolicyById().');
2503
+ }
2504
+ const queryParameters = {};
2505
+ const headerParameters = {};
2506
+ if (this.configuration && this.configuration.apiKey) {
2507
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2508
+ }
2509
+ let urlPath = `/api/Policy/id/{policyIdentifier}`;
2510
+ urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
2511
+ const response = await this.request({
2512
+ path: urlPath,
2513
+ method: "GET",
2514
+ headers: headerParameters,
2515
+ query: queryParameters
2516
+ }, initOverrides);
2517
+ return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
2518
+ }
2519
+ async policyGetPolicyById(requestParameters, initOverrides) {
2520
+ const response = await this.policyGetPolicyByIdRaw(requestParameters, initOverrides);
2521
+ return await response.value();
2522
+ }
2523
+ async policyGetPolicyByNameAndProductIdentifierRaw(requestParameters, initOverrides) {
2524
+ if (requestParameters["policyName"] == null) {
2525
+ throw new RequiredError("policyName", 'Required parameter "policyName" was null or undefined when calling policyGetPolicyByNameAndProductIdentifier().');
2526
+ }
2527
+ if (requestParameters["productIdentifier"] == null) {
2528
+ throw new RequiredError("productIdentifier", 'Required parameter "productIdentifier" was null or undefined when calling policyGetPolicyByNameAndProductIdentifier().');
2529
+ }
2530
+ const queryParameters = {};
2531
+ const headerParameters = {};
2532
+ if (this.configuration && this.configuration.apiKey) {
2533
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2534
+ }
2535
+ let urlPath = `/api/Policy/{policyName}/product/{productIdentifier}`;
2536
+ urlPath = urlPath.replace(`{${"policyName"}}`, encodeURIComponent(String(requestParameters["policyName"])));
2537
+ urlPath = urlPath.replace(`{${"productIdentifier"}}`, encodeURIComponent(String(requestParameters["productIdentifier"])));
2538
+ const response = await this.request({
2539
+ path: urlPath,
2540
+ method: "GET",
2541
+ headers: headerParameters,
2542
+ query: queryParameters
2543
+ }, initOverrides);
2544
+ return new JSONApiResponse(response, (jsonValue) => PolicyUsageDataFromJSON(jsonValue));
2545
+ }
2546
+ async policyGetPolicyByNameAndProductIdentifier(requestParameters, initOverrides) {
2547
+ const response = await this.policyGetPolicyByNameAndProductIdentifierRaw(requestParameters, initOverrides);
2548
+ return await response.value();
2549
+ }
2550
+ async policyGetPolicyDataByIdentifierRaw(requestParameters, initOverrides) {
2551
+ if (requestParameters["policyIdentifier"] == null) {
2552
+ throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetPolicyDataByIdentifier().');
2553
+ }
2554
+ const queryParameters = {};
2555
+ const headerParameters = {};
2556
+ if (this.configuration && this.configuration.apiKey) {
2557
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2558
+ }
2559
+ let urlPath = `/api/Policy/data/{policyIdentifier}`;
2560
+ urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
2561
+ const response = await this.request({
2562
+ path: urlPath,
2563
+ method: "GET",
2564
+ headers: headerParameters,
2565
+ query: queryParameters
2566
+ }, initOverrides);
2567
+ return new JSONApiResponse(response, (jsonValue) => ImportPolicyRequestFromJSON(jsonValue));
2568
+ }
2569
+ async policyGetPolicyDataByIdentifier(requestParameters, initOverrides) {
2570
+ const response = await this.policyGetPolicyDataByIdentifierRaw(requestParameters, initOverrides);
2571
+ return await response.value();
2572
+ }
2573
+ async policyGetPolicyUsageDataRaw(requestParameters, initOverrides) {
2574
+ if (requestParameters["policyIdentifier"] == null) {
2575
+ throw new RequiredError("policyIdentifier", 'Required parameter "policyIdentifier" was null or undefined when calling policyGetPolicyUsageData().');
2576
+ }
2577
+ const queryParameters = {};
2578
+ const headerParameters = {};
2579
+ if (this.configuration && this.configuration.apiKey) {
2580
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2581
+ }
2582
+ let urlPath = `/api/Policy/usage/{policyIdentifier}`;
2583
+ urlPath = urlPath.replace(`{${"policyIdentifier"}}`, encodeURIComponent(String(requestParameters["policyIdentifier"])));
2584
+ const response = await this.request({
2585
+ path: urlPath,
2586
+ method: "GET",
2587
+ headers: headerParameters,
2588
+ query: queryParameters
2589
+ }, initOverrides);
2590
+ return new JSONApiResponse(response, (jsonValue) => PolicyUsageDataFromJSON(jsonValue));
2591
+ }
2592
+ async policyGetPolicyUsageData(requestParameters, initOverrides) {
2593
+ const response = await this.policyGetPolicyUsageDataRaw(requestParameters, initOverrides);
2594
+ return await response.value();
2595
+ }
2596
+ async policyGetRulesForProductRaw(requestParameters, initOverrides) {
2597
+ if (requestParameters["licenseType"] == null) {
2598
+ throw new RequiredError("licenseType", 'Required parameter "licenseType" was null or undefined when calling policyGetRulesForProduct().');
2599
+ }
2600
+ if (requestParameters["productName"] == null) {
2601
+ throw new RequiredError("productName", 'Required parameter "productName" was null or undefined when calling policyGetRulesForProduct().');
2602
+ }
2603
+ if (requestParameters["tenantIdentifier"] == null) {
2604
+ throw new RequiredError("tenantIdentifier", 'Required parameter "tenantIdentifier" was null or undefined when calling policyGetRulesForProduct().');
2605
+ }
2606
+ const queryParameters = {};
2607
+ const headerParameters = {};
2608
+ if (this.configuration && this.configuration.apiKey) {
2609
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2610
+ }
2611
+ let urlPath = `/api/Policy/license/{licenseType}/product/{productName}/tenant/{tenantIdentifier}`;
2612
+ urlPath = urlPath.replace(`{${"licenseType"}}`, encodeURIComponent(String(requestParameters["licenseType"])));
2613
+ urlPath = urlPath.replace(`{${"productName"}}`, encodeURIComponent(String(requestParameters["productName"])));
2614
+ urlPath = urlPath.replace(`{${"tenantIdentifier"}}`, encodeURIComponent(String(requestParameters["tenantIdentifier"])));
2615
+ const response = await this.request({
2616
+ path: urlPath,
2617
+ method: "GET",
2618
+ headers: headerParameters,
2619
+ query: queryParameters
2620
+ }, initOverrides);
2621
+ return new VoidApiResponse(response);
2622
+ }
2623
+ async policyGetRulesForProduct(requestParameters, initOverrides) {
2624
+ await this.policyGetRulesForProductRaw(requestParameters, initOverrides);
2625
+ }
2626
+ async policyGetUserInheritanceGroupPoliciesForAllProductsRaw(requestParameters, initOverrides) {
2627
+ if (requestParameters["identifier"] == null) {
2628
+ throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetUserInheritanceGroupPoliciesForAllProducts().');
2629
+ }
2630
+ const queryParameters = {};
2631
+ const headerParameters = {};
2632
+ if (this.configuration && this.configuration.apiKey) {
2633
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2634
+ }
2635
+ let urlPath = `/api/Policy/user/group/{identifier}`;
2636
+ urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
2637
+ const response = await this.request({
2638
+ path: urlPath,
2639
+ method: "GET",
2640
+ headers: headerParameters,
2641
+ query: queryParameters
2642
+ }, initOverrides);
2643
+ return new VoidApiResponse(response);
2644
+ }
2645
+ async policyGetUserInheritanceGroupPoliciesForAllProducts(requestParameters, initOverrides) {
2646
+ await this.policyGetUserInheritanceGroupPoliciesForAllProductsRaw(requestParameters, initOverrides);
2647
+ }
2648
+ async policyGetUserPoliciesForAllProductsRaw(requestParameters, initOverrides) {
2649
+ if (requestParameters["identifier"] == null) {
2650
+ throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetUserPoliciesForAllProducts().');
2651
+ }
2652
+ const queryParameters = {};
2653
+ const headerParameters = {};
2654
+ if (this.configuration && this.configuration.apiKey) {
2655
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2656
+ }
2657
+ let urlPath = `/api/Policy/user/{identifier}`;
2658
+ urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
2659
+ const response = await this.request({
2660
+ path: urlPath,
2661
+ method: "GET",
2662
+ headers: headerParameters,
2663
+ query: queryParameters
2664
+ }, initOverrides);
2665
+ return new VoidApiResponse(response);
2666
+ }
2667
+ async policyGetUserPoliciesForAllProducts(requestParameters, initOverrides) {
2668
+ await this.policyGetUserPoliciesForAllProductsRaw(requestParameters, initOverrides);
2669
+ }
2670
+ async policyGetUserPoliciesForAllProductsAndAllGroupsRaw(requestParameters, initOverrides) {
2671
+ if (requestParameters["identifier"] == null) {
2672
+ throw new RequiredError("identifier", 'Required parameter "identifier" was null or undefined when calling policyGetUserPoliciesForAllProductsAndAllGroups().');
2673
+ }
2674
+ const queryParameters = {};
2675
+ const headerParameters = {};
2676
+ if (this.configuration && this.configuration.apiKey) {
2677
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2678
+ }
2679
+ let urlPath = `/api/Policy/user/{identifier}/all`;
2680
+ urlPath = urlPath.replace(`{${"identifier"}}`, encodeURIComponent(String(requestParameters["identifier"])));
2681
+ const response = await this.request({
2682
+ path: urlPath,
2683
+ method: "GET",
2684
+ headers: headerParameters,
2685
+ query: queryParameters
2686
+ }, initOverrides);
2687
+ return new VoidApiResponse(response);
2688
+ }
2689
+ async policyGetUserPoliciesForAllProductsAndAllGroups(requestParameters, initOverrides) {
2690
+ await this.policyGetUserPoliciesForAllProductsAndAllGroupsRaw(requestParameters, initOverrides);
2691
+ }
2692
+ async policyUpdateGlobalPolicyRaw(requestParameters, initOverrides) {
2693
+ const queryParameters = {};
2694
+ const headerParameters = {};
2695
+ headerParameters["Content-Type"] = "application/json";
2696
+ if (this.configuration && this.configuration.apiKey) {
2697
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2698
+ }
2699
+ let urlPath = `/api/Policy/global`;
2700
+ const response = await this.request({
2701
+ path: urlPath,
2702
+ method: "PUT",
2703
+ headers: headerParameters,
2704
+ query: queryParameters,
2705
+ body: CreateGlobalPolicyWithFormDataRequestToJSON(requestParameters["createGlobalPolicyWithFormDataRequest"])
2706
+ }, initOverrides);
2707
+ return new JSONApiResponse(response, (jsonValue) => GlobalPolicyDtoFromJSON(jsonValue));
2708
+ }
2709
+ async policyUpdateGlobalPolicy(requestParameters = {}, initOverrides) {
2710
+ const response = await this.policyUpdateGlobalPolicyRaw(requestParameters, initOverrides);
2711
+ return await response.value();
2712
+ }
2713
+ async policyUpdatePolicyRaw(requestParameters, initOverrides) {
2714
+ const queryParameters = {};
2715
+ const headerParameters = {};
2716
+ headerParameters["Content-Type"] = "application/json";
2717
+ if (this.configuration && this.configuration.apiKey) {
2718
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2719
+ }
2720
+ let urlPath = `/api/Policy`;
2721
+ const response = await this.request({
2722
+ path: urlPath,
2723
+ method: "PUT",
2724
+ headers: headerParameters,
2725
+ query: queryParameters,
2726
+ body: CreatePolicyWithFormDataRequestToJSON(requestParameters["createPolicyWithFormDataRequest"])
2727
+ }, initOverrides);
2728
+ return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
2729
+ }
2730
+ async policyUpdatePolicy(requestParameters = {}, initOverrides) {
2731
+ const response = await this.policyUpdatePolicyRaw(requestParameters, initOverrides);
2732
+ return await response.value();
2733
+ }
2734
+ async policyUpdatePolicyV2Raw(requestParameters, initOverrides) {
2735
+ const queryParameters = {};
2736
+ const headerParameters = {};
2737
+ headerParameters["Content-Type"] = "application/json";
2738
+ if (this.configuration && this.configuration.apiKey) {
2739
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2740
+ }
2741
+ let urlPath = `/api/Policy/v2/update`;
2742
+ const response = await this.request({
2743
+ path: urlPath,
2744
+ method: "PUT",
2745
+ headers: headerParameters,
2746
+ query: queryParameters,
2747
+ body: UpdatePolicyRequestToJSON(requestParameters["updatePolicyRequest"])
2748
+ }, initOverrides);
2749
+ return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
2750
+ }
2751
+ async policyUpdatePolicyV2(requestParameters = {}, initOverrides) {
2752
+ const response = await this.policyUpdatePolicyV2Raw(requestParameters, initOverrides);
2753
+ return await response.value();
2754
+ }
2755
+ async policyUploadCheckPolicyRaw(requestParameters, initOverrides) {
2756
+ const queryParameters = {};
2757
+ const headerParameters = {};
2758
+ if (this.configuration && this.configuration.apiKey) {
2759
+ headerParameters["Authorization"] = await this.configuration.apiKey("Authorization");
2760
+ }
2761
+ const consumes = [
2762
+ { contentType: "multipart/form-data" }
2763
+ ];
2764
+ const canConsumeForm2 = canConsumeForm(consumes);
2765
+ let formParams;
2766
+ let useForm = false;
2767
+ useForm = canConsumeForm2;
2768
+ if (useForm) {
2769
+ formParams = new FormData;
2770
+ } else {
2771
+ formParams = new URLSearchParams;
2772
+ }
2773
+ if (requestParameters["file"] != null) {
2774
+ formParams.append("file", requestParameters["file"]);
2775
+ }
2776
+ let urlPath = `/api/Policy/upload/check`;
2777
+ const response = await this.request({
2778
+ path: urlPath,
2779
+ method: "POST",
2780
+ headers: headerParameters,
2781
+ query: queryParameters,
2782
+ body: formParams
2783
+ }, initOverrides);
2784
+ return new JSONApiResponse(response, (jsonValue) => PolicyDtoFromJSON(jsonValue));
2785
+ }
2786
+ async policyUploadCheckPolicy(requestParameters = {}, initOverrides) {
2787
+ const response = await this.policyUploadCheckPolicyRaw(requestParameters, initOverrides);
2788
+ return await response.value();
2789
+ }
2790
+ }
2791
+ var DEFAULT_TIMEOUT_MS = 1e4;
2792
+ var CLIENT_VERSION_HEADER = "ClientVersion";
2793
+ var JSON_MIME = /^application\/(json|[^;\s]+\+json)\s*(;.*)?$/i;
2794
+ async function resolvePolicyAsync(options) {
2795
+ const subject = options.subject;
2796
+ requireValue("subject", subject);
2797
+ requireText("subject.organizationId", subject.organizationId);
2798
+ requireText("subject.tenantId", subject.tenantId);
2799
+ requireText("subject.product", subject.product);
2800
+ requireText("subject.licenseType", subject.licenseType);
2801
+ requireText("baseUrl", options.baseUrl);
2802
+ requireText("clientVersion", options.clientVersion);
2803
+ const fetchApi = options.fetch ?? globalThis.fetch;
2804
+ if (typeof fetchApi !== "function") {
2805
+ throw new RequiredError("fetch", "No fetch implementation available. Pass options.fetch.");
2806
+ }
2807
+ const now = options.now ?? (() => new Date);
2808
+ const basePath = `${options.baseUrl.replace(/\/+$/, "")}/${encodeURIComponent(subject.organizationId)}/roboticsops_`;
2809
+ let requestUrl = basePath;
2810
+ const api = new PolicyApi(new Configuration({
2811
+ basePath,
2812
+ fetchApi,
2813
+ apiKey: async () => `Bearer ${await readToken(options.accessToken)}`,
2814
+ headers: {
2815
+ AccountId: subject.organizationId,
2816
+ [CLIENT_VERSION_HEADER]: options.clientVersion
2817
+ },
2818
+ middleware: [
2819
+ {
2820
+ pre: async (context) => {
2821
+ requestUrl = context.url;
2822
+ }
2823
+ }
2824
+ ]
2825
+ }));
2826
+ if (options.signal?.aborted) {
2827
+ return unknown(subject, buildAudit(requestUrl, now), "cancelled", "The request was cancelled before it was sent.");
2828
+ }
2829
+ const controller = new AbortController;
2830
+ let timedOut = false;
2831
+ const timer = setTimeout(() => {
2832
+ timedOut = true;
2833
+ controller.abort();
2834
+ }, options.timeoutMs ?? DEFAULT_TIMEOUT_MS);
2835
+ const relayAbort = () => controller.abort();
2836
+ options.signal?.addEventListener("abort", relayAbort, { once: true });
2837
+ let seenResponse;
2838
+ try {
2839
+ const response = await api.policyGetRulesForProductRaw({
2840
+ licenseType: subject.licenseType,
2841
+ productName: subject.product,
2842
+ tenantIdentifier: subject.tenantId
2843
+ }, { signal: controller.signal });
2844
+ seenResponse = response.raw;
2845
+ return await classifySuccess(response.raw, subject, requestUrl, now);
2846
+ } catch (error) {
2847
+ return classifyFailure(error, subject, requestUrl, now, timedOut, options.signal, seenResponse);
2848
+ } finally {
2849
+ clearTimeout(timer);
2850
+ options.signal?.removeEventListener("abort", relayAbort);
2851
+ }
2852
+ }
2853
+ async function classifySuccess(response, subject, url, now) {
2854
+ const audit = buildAudit(url, now, response);
2855
+ if (response.status === 204) {
2856
+ return { outcome: "ungoverned", subject, audit };
2857
+ }
2858
+ if (response.status !== 200) {
2859
+ return unknown(subject, audit, "serverError", `The policy service answered ${response.status}; only 200 carries a policy and only 204 means none is published.`);
2860
+ }
2861
+ const contentType = response.headers.get("content-type");
2862
+ if (!JSON_MIME.test(contentType ?? "")) {
2863
+ return unknown(subject, audit, "notJson", `Expected a JSON policy document, got content-type ${contentType ?? "(none)"}.`);
2864
+ }
2865
+ const body = await response.text();
2866
+ if (!isJsonObject(body)) {
2867
+ return unknown(subject, audit, "notJson", body.trim() === "" ? "The response body was empty." : "The response body is not a JSON object.");
2868
+ }
2869
+ return { outcome: "governed", subject, audit, document: body };
2870
+ }
2871
+ function classifyFailure(error, subject, url, now, timedOut, signal, seenResponse) {
2872
+ if (error instanceof ResponseError) {
2873
+ return unknown(subject, buildAudit(url, now, error.response), reasonForStatus(error.response.status), `The policy service answered ${error.response.status}.`);
2874
+ }
2875
+ const audit = buildAudit(url, now, seenResponse);
2876
+ if (timedOut) {
2877
+ return unknown(subject, audit, "timedOut", "The policy service did not answer within the timeout.");
2878
+ }
2879
+ if (signal?.aborted || isAbortError(error)) {
2880
+ return unknown(subject, audit, "cancelled", "The request was cancelled.");
2881
+ }
2882
+ return unknown(subject, audit, "transport", `The request to the policy service failed: ${describe(unwrap(error))}`);
2883
+ }
2884
+ function unwrap(error) {
2885
+ return error instanceof FetchError ? error.cause : error;
2886
+ }
2887
+ function reasonForStatus(status) {
2888
+ if (status === 401 || status === 403) {
2889
+ return "unauthorized";
2890
+ }
2891
+ if (status === 404) {
2892
+ return "notFound";
2893
+ }
2894
+ return "serverError";
2895
+ }
2896
+ function buildAudit(url, now, response) {
2897
+ const audit = { url, resolvedAt: now().toISOString() };
2898
+ if (response) {
2899
+ audit.httpStatus = response.status;
2900
+ const retryAfter = parseRetryAfter(response.headers.get("retry-after"), now);
2901
+ if (retryAfter !== undefined) {
2902
+ audit.retryAfterSeconds = retryAfter;
2903
+ }
2904
+ }
2905
+ return audit;
2906
+ }
2907
+ function parseRetryAfter(header, now) {
2908
+ if (header === null || header.trim() === "") {
2909
+ return;
2910
+ }
2911
+ const seconds = Number(header.trim());
2912
+ if (Number.isInteger(seconds) && seconds >= 0) {
2913
+ return seconds;
2914
+ }
2915
+ const at = Date.parse(header);
2916
+ if (Number.isNaN(at)) {
2917
+ return;
2918
+ }
2919
+ return Math.max(0, Math.round((at - now().getTime()) / 1000));
2920
+ }
2921
+ function isJsonObject(body) {
2922
+ if (body.trim() === "") {
2923
+ return false;
2924
+ }
2925
+ let parsed;
2926
+ try {
2927
+ parsed = JSON.parse(body);
2928
+ } catch {
2929
+ return false;
2930
+ }
2931
+ return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed);
2932
+ }
2933
+ function unknown(subject, audit, reason, detail) {
2934
+ return { outcome: "unknown", subject, audit, reason, detail };
2935
+ }
2936
+ async function readToken(accessToken) {
2937
+ return typeof accessToken === "function" ? await accessToken() : accessToken;
2938
+ }
2939
+ function isAbortError(error) {
2940
+ const candidate = error instanceof Error && "cause" in error && error.cause instanceof Error ? error.cause : error;
2941
+ return candidate instanceof Error && candidate.name === "AbortError";
2942
+ }
2943
+ function describe(error) {
2944
+ return error instanceof Error ? error.message : String(error);
2945
+ }
2946
+ function requireValue(field, value) {
2947
+ if (value === undefined || value === null) {
2948
+ throw new RequiredError(field, `Required option "${field}" is missing.`);
2949
+ }
2950
+ }
2951
+ function requireText(field, value) {
2952
+ requireValue(field, value);
2953
+ if (typeof value !== "string" || value.trim() === "") {
2954
+ throw new RequiredError(field, `Required option "${field}" must be a non-empty string.`);
2955
+ }
2956
+ }
1282
2957
  // ../../common/dist/index.browser.js
1283
2958
  import { getFileSystem } from "@uipath/filesystem";
2959
+ import { getFileSystem as getFileSystem2 } from "@uipath/filesystem";
1284
2960
  var __create = Object.create;
1285
2961
  var __getProtoOf = Object.getPrototypeOf;
1286
2962
  var __defProp = Object.defineProperty;
@@ -4165,7 +5841,7 @@ var require_stream = __commonJS(function(exports, module) {
4165
5841
  module2.exports.AbortSignal = AbortSignal;
4166
5842
  });
4167
5843
  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, Blob22 = globalThis.Blob || bufferModule.Blob, isBlob = typeof Blob22 < "u" ? function(b) {
5844
+ 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, isBlob2 = typeof Blob22 < "u" ? function(b) {
4169
5845
  return b instanceof Blob22;
4170
5846
  } : function(b) {
4171
5847
  return false;
@@ -4202,7 +5878,7 @@ var require_stream = __commonJS(function(exports, module) {
4202
5878
  return fn instanceof AsyncFunction;
4203
5879
  }, isArrayBufferView(arr) {
4204
5880
  return ArrayBuffer.isView(arr);
4205
- } }, isBlob, deprecate(fn, message) {
5881
+ } }, isBlob: isBlob2, deprecate(fn, message) {
4206
5882
  return fn;
4207
5883
  }, addAbortListener: (init_events(), __toCommonJS(exports_events)).addAbortListener || function(signal, listener) {
4208
5884
  if (signal === undefined)
@@ -6426,7 +8102,7 @@ var require_stream = __commonJS(function(exports, module) {
6426
8102
  };
6427
8103
  });
6428
8104
  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(), Blob22 = globalThis.Blob || bufferModule.Blob, isBlob = typeof Blob22 < "u" ? function(b) {
8105
+ 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, isBlob2 = typeof Blob22 < "u" ? function(b) {
6430
8106
  return b instanceof Blob22;
6431
8107
  } : function(b) {
6432
8108
  return false;
@@ -6478,7 +8154,7 @@ var require_stream = __commonJS(function(exports, module) {
6478
8154
  }
6479
8155
  throw new ERR_INVALID_RETURN_VALUE("Iterable, AsyncIterable or AsyncFunction", name, value);
6480
8156
  }
6481
- if (isBlob(body))
8157
+ if (isBlob2(body))
6482
8158
  return duplexify(body.arrayBuffer());
6483
8159
  if (isIterable(body))
6484
8160
  return from2(Duplexify, body, { objectMode: true, writable: false });
@@ -21469,7 +23145,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
21469
23145
  });
21470
23146
  this.runningCommand = proc;
21471
23147
  }
21472
- _dispatchSubcommand(commandName, operands, unknown) {
23148
+ _dispatchSubcommand(commandName, operands, unknown2) {
21473
23149
  const subCommand = this._findCommand(commandName);
21474
23150
  if (!subCommand)
21475
23151
  this.help({ error: true });
@@ -21478,9 +23154,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
21478
23154
  promiseChain = this._chainOrCallSubCommandHook(promiseChain, subCommand, "preSubcommand");
21479
23155
  promiseChain = this._chainOrCall(promiseChain, () => {
21480
23156
  if (subCommand._executableHandler) {
21481
- this._executeSubCommand(subCommand, operands.concat(unknown));
23157
+ this._executeSubCommand(subCommand, operands.concat(unknown2));
21482
23158
  } else {
21483
- return subCommand._parseCommand(operands, unknown);
23159
+ return subCommand._parseCommand(operands, unknown2);
21484
23160
  }
21485
23161
  });
21486
23162
  return promiseChain;
@@ -21577,22 +23253,22 @@ Expecting one of '${allowedValues.join("', '")}'`);
21577
23253
  }
21578
23254
  return result;
21579
23255
  }
21580
- _parseCommand(operands, unknown) {
21581
- const parsed = this.parseOptions(unknown);
23256
+ _parseCommand(operands, unknown2) {
23257
+ const parsed = this.parseOptions(unknown2);
21582
23258
  this._parseOptionsEnv();
21583
23259
  this._parseOptionsImplied();
21584
23260
  operands = operands.concat(parsed.operands);
21585
- unknown = parsed.unknown;
21586
- this.args = operands.concat(unknown);
23261
+ unknown2 = parsed.unknown;
23262
+ this.args = operands.concat(unknown2);
21587
23263
  if (operands && this._findCommand(operands[0])) {
21588
- return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);
23264
+ return this._dispatchSubcommand(operands[0], operands.slice(1), unknown2);
21589
23265
  }
21590
23266
  if (this._getHelpCommand() && operands[0] === this._getHelpCommand().name()) {
21591
23267
  return this._dispatchHelpCommand(operands[1]);
21592
23268
  }
21593
23269
  if (this._defaultCommandName) {
21594
- this._outputHelpIfRequested(unknown);
21595
- return this._dispatchSubcommand(this._defaultCommandName, operands, unknown);
23270
+ this._outputHelpIfRequested(unknown2);
23271
+ return this._dispatchSubcommand(this._defaultCommandName, operands, unknown2);
21596
23272
  }
21597
23273
  if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {
21598
23274
  this.help({ error: true });
@@ -21614,7 +23290,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
21614
23290
  promiseChain = this._chainOrCall(promiseChain, () => this._actionHandler(this.processedArgs));
21615
23291
  if (this.parent) {
21616
23292
  promiseChain = this._chainOrCall(promiseChain, () => {
21617
- this.parent.emit(commandEvent, operands, unknown);
23293
+ this.parent.emit(commandEvent, operands, unknown2);
21618
23294
  });
21619
23295
  }
21620
23296
  promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
@@ -21623,13 +23299,13 @@ Expecting one of '${allowedValues.join("', '")}'`);
21623
23299
  if (this.parent?.listenerCount(commandEvent)) {
21624
23300
  checkForUnknownOptions();
21625
23301
  this._processArguments();
21626
- this.parent.emit(commandEvent, operands, unknown);
23302
+ this.parent.emit(commandEvent, operands, unknown2);
21627
23303
  } else if (operands.length) {
21628
23304
  if (this._findCommand("*")) {
21629
- return this._dispatchSubcommand("*", operands, unknown);
23305
+ return this._dispatchSubcommand("*", operands, unknown2);
21630
23306
  }
21631
23307
  if (this.listenerCount("command:*")) {
21632
- this.emit("command:*", operands, unknown);
23308
+ this.emit("command:*", operands, unknown2);
21633
23309
  } else if (this.commands.length) {
21634
23310
  this.unknownCommand();
21635
23311
  } else {
@@ -21684,7 +23360,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
21684
23360
  }
21685
23361
  parseOptions(args) {
21686
23362
  const operands = [];
21687
- const unknown = [];
23363
+ const unknown2 = [];
21688
23364
  let dest = operands;
21689
23365
  function maybeOption(arg) {
21690
23366
  return arg.length > 1 && arg[0] === "-";
@@ -21701,7 +23377,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
21701
23377
  const arg = activeGroup ?? args[i2++];
21702
23378
  activeGroup = null;
21703
23379
  if (arg === "--") {
21704
- if (dest === unknown)
23380
+ if (dest === unknown2)
21705
23381
  dest.push(arg);
21706
23382
  dest.push(...args.slice(i2));
21707
23383
  break;
@@ -21753,18 +23429,18 @@ Expecting one of '${allowedValues.join("', '")}'`);
21753
23429
  }
21754
23430
  }
21755
23431
  if (dest === operands && maybeOption(arg) && !(this.commands.length === 0 && negativeNumberArg(arg))) {
21756
- dest = unknown;
23432
+ dest = unknown2;
21757
23433
  }
21758
- if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) {
23434
+ if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown2.length === 0) {
21759
23435
  if (this._findCommand(arg)) {
21760
23436
  operands.push(arg);
21761
- unknown.push(...args.slice(i2));
23437
+ unknown2.push(...args.slice(i2));
21762
23438
  break;
21763
23439
  } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
21764
23440
  operands.push(arg, ...args.slice(i2));
21765
23441
  break;
21766
23442
  } else if (this._defaultCommandName) {
21767
- unknown.push(arg, ...args.slice(i2));
23443
+ unknown2.push(arg, ...args.slice(i2));
21768
23444
  break;
21769
23445
  }
21770
23446
  }
@@ -21774,7 +23450,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
21774
23450
  }
21775
23451
  dest.push(arg);
21776
23452
  }
21777
- return { operands, unknown };
23453
+ return { operands, unknown: unknown2 };
21778
23454
  }
21779
23455
  opts() {
21780
23456
  if (this._storeOptionsAsProperties) {
@@ -22456,7 +24132,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
24132
  var EMAIL_PATTERN = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
22457
24133
  var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
22458
24134
  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;
24135
+ var PADDED_BASE64_PATTERN = /(?<![A-Za-z0-9+/])[A-Za-z0-9+/]{16,}={1,2}(?![A-Za-z0-9+/=])/g;
22460
24136
  var BASE64_WITH_PLUS_PATTERN = /[A-Za-z0-9+/]{40,}/g;
22461
24137
  var USER_HOME_PATTERN = /(?<![A-Za-z0-9._-])([/\\])(Users|home|Profiles)([/\\])([^/\\]+)/gi;
22462
24138
  var UNC_PATH_PATTERN = /(^|[\s"'<>|=,;([{])(\\\\[^\s"'<>|]+)/g;
@@ -22503,7 +24179,7 @@ var QUOTED_LITERAL_PATTERN = new RegExp([
22503
24179
  `(?<![A-Za-z0-9])"(?:[^\\
22504
24180
  ]|\\.){2,${QUOTED_LITERAL_MAX_SPAN}}?"(?![A-Za-z0-9])`
22505
24181
  ].join("|"), "g");
22506
- var JSON_BODY_PATTERN = /[{[][^{}[\]]*[:,][^{}[\]]*[\]}]/g;
24182
+ var JSON_BODY_PATTERN = /[{[][^{}[\]:,]*[:,][^{}[\]]*[\]}]/g;
22507
24183
  var COLLAPSED_BODY = "{…}";
22508
24184
  var COLLAPSED_BODY_MARKER = "\x01body\x01";
22509
24185
  var MAX_BODY_NESTING = 8;
@@ -22518,10 +24194,13 @@ function collapseJsonBodies(text) {
22518
24194
  }
22519
24195
  return out.split(COLLAPSED_BODY_MARKER).join(COLLAPSED_BODY);
22520
24196
  }
22521
- var TRAILING_PROSE_PUNCT = /[.,;:!?)\]}>'"]+$/;
24197
+ var TRAILING_PROSE_PUNCT = `.,;:!?)]}>'"`;
22522
24198
  function peelTrailingPunctuation(match) {
22523
- const trailing = match.match(TRAILING_PROSE_PUNCT)?.[0] ?? "";
22524
- return trailing ? [match.slice(0, -trailing.length), trailing] : [match, ""];
24199
+ let end = match.length;
24200
+ while (end > 0 && TRAILING_PROSE_PUNCT.includes(match[end - 1])) {
24201
+ end -= 1;
24202
+ }
24203
+ return [match.slice(0, end), match.slice(end)];
22525
24204
  }
22526
24205
  function redactUrl(raw) {
22527
24206
  try {
@@ -22978,6 +24657,12 @@ var TLS_ERROR_CODES = new Set([
22978
24657
  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
24658
  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
24659
  var LOCAL_PERMISSION_ERROR_CODES = new Set(["EACCES", "EPERM", "EROFS"]);
24660
+ function carriedInstructions(error) {
24661
+ if (!error || typeof error !== "object")
24662
+ return;
24663
+ const e = error;
24664
+ return typeof e.instructions === "string" ? e.instructions : undefined;
24665
+ }
22981
24666
  var logFilePathSlot = singleton("logFilePath");
22982
24667
  function setGlobalLogFilePath(path) {
22983
24668
  logFilePathSlot.set(path);
@@ -24214,8 +25899,9 @@ import { translate as translate3 } from "@uipath/solutionpackager-tool-core";
24214
25899
  // package.json
24215
25900
  var package_default = {
24216
25901
  name: "@uipath/project-packager",
25902
+ author: "UiPath",
24217
25903
  license: "SEE LICENSE IN LICENSE.txt",
24218
- version: "1.202.0",
25904
+ version: "1.203.0-preview.160",
24219
25905
  description: "UiPath Project Packager - core library for packing individual UiPath projects",
24220
25906
  type: "module",
24221
25907
  main: "./dist/index.js",
@@ -24260,6 +25946,7 @@ var package_default = {
24260
25946
  lint: "biome check ."
24261
25947
  },
24262
25948
  dependencies: {
25949
+ "@uipath/aops-policy-sdk": "workspace:*",
24263
25950
  "@uipath/filesystem": "workspace:*",
24264
25951
  "@uipath/solutionpackager-tool-core": "workspace:*",
24265
25952
  "@uipath/common": "workspace:*"
@@ -24622,6 +26309,14 @@ import {
24622
26309
  Path,
24623
26310
  translate as translate6
24624
26311
  } from "@uipath/solutionpackager-tool-core";
26312
+ class GovernancePolicyError extends Error {
26313
+ instructions;
26314
+ name = "GovernancePolicyError";
26315
+ constructor(message, instructions) {
26316
+ super(message);
26317
+ this.instructions = instructions;
26318
+ }
26319
+ }
24625
26320
  var LICENSE_TYPES = {
24626
26321
  NoLicense: "NoLicense",
24627
26322
  Development: "Development",
@@ -24631,7 +26326,7 @@ var LICENSE_TYPES = {
24631
26326
  StudioPro: "StudioPro",
24632
26327
  AutomationKit: "AutomationKit"
24633
26328
  };
24634
- var DEFAULT_PROFILE_KEY = "StudioWeb";
26329
+ var STUDIOWEB_PRODUCT = "StudioWeb";
24635
26330
  var ACQUIRE_LICENSE_PATH = "/orchestrator_/api/StudioWeb/AcquireLicense";
24636
26331
  var GOVERNANCE_SUBFOLDER = "governance";
24637
26332
  var GOVERNANCE_FILE_NAME = "governance-policy.json";
@@ -24648,87 +26343,122 @@ class GovernancePolicyService {
24648
26343
  this.temporaryStorage = temporaryStorage;
24649
26344
  this.fetchFn = fetchFn;
24650
26345
  }
24651
- async resolveGovernancePolicyAsync(validateOptions, connectionInfo, cancellationToken) {
24652
- if (validateOptions.governanceFileType !== "AutomationOps" /* AutomationOps */) {
26346
+ async resolveGovernancePolicyAsync(validateOptions, connectionInfo, cancellationToken, usage = "pack") {
26347
+ if (validateOptions.governanceFileType === "Default" /* Default */) {
24653
26348
  return;
24654
26349
  }
24655
- if (validateOptions.governanceFilePath) {
26350
+ const suppliedFilePath = validateOptions.governanceFilePath;
26351
+ if (suppliedFilePath && validateOptions.governanceFileType === "AutomationOps" /* AutomationOps */) {
24656
26352
  this.logger.info(t("info.alreadyProvided"));
24657
26353
  return;
24658
26354
  }
24659
- let cloudUrl = connectionInfo?.cloudUrl;
24660
- const organizationId = connectionInfo?.organizationId;
24661
- const tenantId = connectionInfo?.tenantId;
24662
- const accessToken = connectionInfo?.accessToken;
24663
- if (!cloudUrl || !organizationId || !tenantId || !accessToken) {
24664
- this.logger.warn(t("errors.connectionIncomplete"));
24665
- validateOptions.governanceFileType = "Default" /* Default */;
26355
+ if (suppliedFilePath && usage === "analyze") {
26356
+ this.logger.info(t("info.alreadyProvided"));
26357
+ validateOptions.governanceFileType = "Studio" /* Studio */;
24666
26358
  return;
24667
26359
  }
24668
- const profileKey = validateOptions.profileKey ?? DEFAULT_PROFILE_KEY;
24669
- let cloudOrigin;
24670
- try {
24671
- cloudOrigin = new URL(cloudUrl).origin;
24672
- cloudUrl = cloudUrl.replace(/\/+$/, "");
24673
- } catch {
24674
- this.logger.warn(t("errors.connectionIncomplete"));
24675
- validateOptions.governanceFileType = "Default" /* Default */;
26360
+ const origin = this.resolveCloudOrigin(connectionInfo?.cloudUrl);
26361
+ const product = validateOptions.profileKey;
26362
+ if (!origin || !product || !connectionInfo?.organizationId || !connectionInfo.tenantId || !connectionInfo.accessToken) {
26363
+ if (suppliedFilePath) {
26364
+ this.logger.info(t("info.noTenantToAsk", { path: suppliedFilePath }));
26365
+ validateOptions.governanceFileType = "Studio" /* Studio */;
26366
+ return;
26367
+ }
26368
+ this.warnAndUseShippedRules(validateOptions, t("errors.connectionIncomplete"));
24676
26369
  return;
24677
26370
  }
24678
- const licenseType = await this.resolveLicenseTypeAsync(profileKey, cloudUrl, accessToken, cancellationToken);
24679
- const policy = await this.downloadPolicyAsync(cloudOrigin, organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken);
24680
- if (!policy) {
24681
- validateOptions.governanceFileType = "Default" /* Default */;
24682
- return;
26371
+ const licenseType = await this.resolveLicenseTypeAsync(product, connectionInfo.cloudUrl?.replace(/\/+$/, "") ?? "", connectionInfo.accessToken, cancellationToken);
26372
+ const subject = {
26373
+ organizationId: connectionInfo.organizationId,
26374
+ tenantId: connectionInfo.tenantId,
26375
+ product,
26376
+ licenseType
26377
+ };
26378
+ this.logger.info(t("info.resolving", { product, licenseType }));
26379
+ const resolution = await resolvePolicyAsync({
26380
+ subject,
26381
+ baseUrl: origin,
26382
+ accessToken: connectionInfo.accessToken,
26383
+ clientVersion: package_default.version,
26384
+ fetch: this.fetchFn,
26385
+ signal: cancellationToken
26386
+ });
26387
+ await this.applyResolutionAsync(resolution, validateOptions, suppliedFilePath);
26388
+ }
26389
+ async applyResolutionAsync(resolution, validateOptions, suppliedFilePath) {
26390
+ switch (resolution.outcome) {
26391
+ case "governed":
26392
+ if (suppliedFilePath) {
26393
+ throw new GovernancePolicyError(t("errors.tenantPolicyWins", {
26394
+ product: resolution.subject.product,
26395
+ path: suppliedFilePath
26396
+ }), t("instructions.tenantPolicyWins"));
26397
+ }
26398
+ await this.savePolicyAsync(validateOptions, resolution.document);
26399
+ return;
26400
+ case "ungoverned":
26401
+ if (suppliedFilePath) {
26402
+ this.logger.info(t("info.suppliedFileHonoured", {
26403
+ path: suppliedFilePath
26404
+ }));
26405
+ validateOptions.governanceFileType = "Studio" /* Studio */;
26406
+ return;
26407
+ }
26408
+ this.logger.info(t("info.ungoverned"));
26409
+ validateOptions.governanceFileType = "Default" /* Default */;
26410
+ return;
26411
+ case "unknown": {
26412
+ this.logger.warn(this.describeUnknown(resolution));
26413
+ if (suppliedFilePath) {
26414
+ this.logger.info(t("info.suppliedFileUnchecked", {
26415
+ path: suppliedFilePath
26416
+ }));
26417
+ validateOptions.governanceFileType = "Studio" /* Studio */;
26418
+ return;
26419
+ }
26420
+ validateOptions.governanceFileType = "Default" /* Default */;
26421
+ return;
26422
+ }
24683
26423
  }
26424
+ }
26425
+ async savePolicyAsync(validateOptions, document2) {
24684
26426
  try {
24685
26427
  const dir = await this.temporaryStorage.getTempSubfolderPathAsync(GOVERNANCE_SUBFOLDER);
24686
26428
  const filePath = Path.join(dir, GOVERNANCE_FILE_NAME);
24687
- await this.fileSystem.writeFile(filePath, policy);
26429
+ await this.fileSystem.writeFile(filePath, document2);
24688
26430
  this.logger.info(t("info.saved", { path: filePath }));
24689
26431
  validateOptions.governanceFilePath = filePath;
26432
+ validateOptions.governanceFileType = "AutomationOps" /* AutomationOps */;
24690
26433
  } catch (error) {
24691
- this.logger.warn(t("errors.failedToSave", {
24692
- error: errorMessage(error)
24693
- }));
24694
- validateOptions.governanceFileType = "Default" /* Default */;
26434
+ this.warnAndUseShippedRules(validateOptions, t("errors.failedToSave", { error: errorMessage(error) }));
24695
26435
  }
24696
26436
  }
24697
- async downloadPolicyAsync(cloudOrigin, organizationId, tenantId, accessToken, licenseType, profileKey, cancellationToken) {
24698
- const policyUrl = `${cloudOrigin}/${organizationId}/roboticsops_` + `/api/Policy/license/${licenseType}/product/${profileKey}/tenant/${tenantId}`;
24699
- this.logger.info(t("info.downloading", { url: policyUrl }));
26437
+ warnAndUseShippedRules(validateOptions, reason) {
26438
+ this.logger.warn(t("errors.fallingBackToDefault", { reason }));
26439
+ validateOptions.governanceFileType = "Default" /* Default */;
26440
+ }
26441
+ describeUnknown(resolution) {
26442
+ const reason = t("errors.unknownOutcome", {
26443
+ reason: resolution.reason,
26444
+ detail: resolution.detail,
26445
+ url: resolution.audit.url
26446
+ });
26447
+ const retryAfter = resolution.audit.retryAfterSeconds;
26448
+ return retryAfter === undefined ? reason : `${reason} ${t("errors.retryAfter", { seconds: retryAfter })}`;
26449
+ }
26450
+ resolveCloudOrigin(cloudUrl) {
26451
+ if (!cloudUrl) {
26452
+ return null;
26453
+ }
24700
26454
  try {
24701
- const response = await this.fetchFn(policyUrl, {
24702
- headers: {
24703
- Authorization: `Bearer ${accessToken}`,
24704
- AccountId: organizationId
24705
- },
24706
- signal: cancellationToken
24707
- });
24708
- if (response.status === 204 || response.status === 404) {
24709
- this.logger.info(t("info.noPolicyFound"));
24710
- return null;
24711
- }
24712
- if (!response.ok) {
24713
- const body = await response.text();
24714
- this.logger.warn(t("errors.failedToGetPolicy", { content: body }));
24715
- return null;
24716
- }
24717
- const content = await response.text();
24718
- if (!content?.trimStart().startsWith("{")) {
24719
- this.logger.info(t("info.responseNotJson"));
24720
- return null;
24721
- }
24722
- return content;
24723
- } catch (error) {
24724
- this.logger.warn(t("errors.failedToDownload", {
24725
- error: errorMessage(error)
24726
- }));
26455
+ return new URL(cloudUrl).origin;
26456
+ } catch {
24727
26457
  return null;
24728
26458
  }
24729
26459
  }
24730
26460
  async resolveLicenseTypeAsync(profileKey, cloudUrl, accessToken, cancellationToken) {
24731
- const isStudioWeb = profileKey === DEFAULT_PROFILE_KEY;
26461
+ const isStudioWeb = profileKey === STUDIOWEB_PRODUCT;
24732
26462
  const fallback = isStudioWeb ? LICENSE_TYPES.NoLicense : LICENSE_TYPES.Development;
24733
26463
  try {
24734
26464
  const response = await this.fetchFn(`${cloudUrl}${ACQUIRE_LICENSE_PATH}`, {
@@ -24784,6 +26514,11 @@ async function resolveProducedNupkgsAsync(fileSystem, packagePath) {
24784
26514
  return [];
24785
26515
  }
24786
26516
  // src/services/pack-service.ts
26517
+ var PACKAGE_ID_TOO_LONG = "PACKAGE_ID_TOO_LONG";
26518
+ function isPackageIdTooLongError(error) {
26519
+ return error instanceof Error && error.code === PACKAGE_ID_TOO_LONG;
26520
+ }
26521
+
24787
26522
  class PackService {
24788
26523
  disallowedCharsRegex = /[^\p{L}\p{N}_.-]/gu;
24789
26524
  spacesDotRegex = /[\s.]+/g;
@@ -24795,7 +26530,11 @@ class PackService {
24795
26530
  packageId = packageId.replace(this.dotDashRegex, "-");
24796
26531
  packageId = packageId.replace(this.disallowedCharsRegex, "_");
24797
26532
  if (packageId.length > this.MaxPackageIdLength) {
24798
- throw new Error(`Package id ${packageId} exceeds the characters limit of ${this.MaxPackageIdLength}`);
26533
+ const error = new Error(`Package id ${packageId} exceeds the characters limit of ${this.MaxPackageIdLength}`);
26534
+ error.code = PACKAGE_ID_TOO_LONG;
26535
+ error.packageId = packageId;
26536
+ error.maxLength = this.MaxPackageIdLength;
26537
+ throw error;
24799
26538
  }
24800
26539
  return packageId;
24801
26540
  }
@@ -25263,7 +27002,7 @@ class ProjectPackager {
25263
27002
  }, cancellationToken);
25264
27003
  }
25265
27004
  async validateProjectAsync(options, cancellationToken) {
25266
- await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken);
27005
+ await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken, "analyze");
25267
27006
  const validationResult = await this.validateOptionsValidator.validateAsync(options, cancellationToken);
25268
27007
  if (!validationResult.isSuccess) {
25269
27008
  return validationResult;
@@ -25287,7 +27026,10 @@ class ProjectPackager {
25287
27026
  }, cancellationToken);
25288
27027
  }
25289
27028
  async buildProjectAsync(options, cancellationToken) {
25290
- await this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken);
27029
+ const [governanceError] = await catchError(this.governancePolicyService.resolveGovernancePolicyAsync(options.validateOptions, options.connection, cancellationToken));
27030
+ if (governanceError) {
27031
+ return ToolResult8.error(ToolErrorCodes8.InternalError, `Project build failed: ${governanceError.message}`, carriedInstructions(governanceError));
27032
+ }
25291
27033
  const validationResult = await this.buildOptionsValidator.validateAsync(options, cancellationToken);
25292
27034
  if (!validationResult.isSuccess) {
25293
27035
  return validationResult;
@@ -25354,7 +27096,7 @@ class ProjectPackager {
25354
27096
  } catch (error) {
25355
27097
  const errorMessage2 = error instanceof Error ? error.message : String(error);
25356
27098
  this.logger.error(`Processing error: ${errorMessage2}`);
25357
- return ToolResult8.error(ToolErrorCodes8.InternalError, `Project pack failed: ${errorMessage2}`);
27099
+ return ToolResult8.error(ToolErrorCodes8.InternalError, `Project pack failed: ${errorMessage2}`, carriedInstructions(error));
25358
27100
  } finally {
25359
27101
  await this.temporaryStorage.cleanup();
25360
27102
  }
@@ -25476,7 +27218,9 @@ class ProjectPackager {
25476
27218
  export {
25477
27219
  BrowserContextStorage,
25478
27220
  ConsoleTelemetryProvider,
27221
+ GovernancePolicyError,
25479
27222
  GovernancePolicyService,
27223
+ PACKAGE_ID_TOO_LONG,
25480
27224
  PackService,
25481
27225
  PackagerParameters,
25482
27226
  PackagerParametersValidator,
@@ -25498,9 +27242,11 @@ export {
25498
27242
  TelemetryService,
25499
27243
  ToolLogger,
25500
27244
  ToolsFactory,
27245
+ isPackageIdTooLongError,
27246
+ resolvePolicyAsync,
25501
27247
  resolveProducedNupkgsAsync,
25502
27248
  setGlobalLogHandler,
25503
27249
  signNupkgsAsync
25504
27250
  };
25505
27251
 
25506
- //# debugId=F2912B8941DB6F1B64756E2164756E21
27252
+ //# debugId=F124D3F72A319C0364756E2164756E21