@stack-spot/portal-network 0.58.0 → 0.58.2

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.
@@ -8,11 +8,11 @@ import * as Oazapfts from "@oazapfts/runtime";
8
8
  import * as QS from "@oazapfts/runtime/query";
9
9
  export const defaults = {
10
10
  headers: {},
11
- baseUrl: "https://workspace-workspace-api.dev.stackspot.com",
11
+ baseUrl: "https://workspace-workspace-api.stg.stackspot.com",
12
12
  };
13
13
  const oazapfts = Oazapfts.runtime(defaults);
14
14
  export const servers = {
15
- generatedServerUrl: "https://workspace-workspace-api.dev.stackspot.com"
15
+ generatedServerUrl: "https://workspace-workspace-api.stg.stackspot.com"
16
16
  };
17
17
  /**
18
18
  * Get a workspace variable by name
@@ -116,7 +116,7 @@ export function workflowControlleraddWorkflowStepInWorkspace({ workspaceId, stac
116
116
  /**
117
117
  * Update shared infrastructure status.
118
118
  */
119
- export function sharedInfrastructureControllerupdateStatus({ workspaceId, sharedInfraId, updateSharedInfraStatusRequest }, opts) {
119
+ export function workspaceSharedInfrastructureControllerupdateStatus({ workspaceId, sharedInfraId, updateSharedInfraStatusRequest }, opts) {
120
120
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/status`, oazapfts.json({
121
121
  ...opts,
122
122
  method: "PUT",
@@ -203,7 +203,7 @@ export function connectionInterfaceControllerupsertBatch({ workspaceId, body },
203
203
  /**
204
204
  * Update application status.
205
205
  */
206
- export function applicationControllerupdateStatus({ workspaceId, applicationId, accountId, updateApplicationStatusRequest }, opts) {
206
+ export function workspaceApplicationControllerupdateStatus({ workspaceId, applicationId, accountId, updateApplicationStatusRequest }, opts) {
207
207
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/status`, oazapfts.json({
208
208
  ...opts,
209
209
  method: "PUT",
@@ -345,10 +345,47 @@ export function workflowStackControllersaveStackWorkflowContext({ stackId, workf
345
345
  body: stackWorkflowCreateRequest
346
346
  })));
347
347
  }
348
+ /**
349
+ * Get all workspaces without stack version and favorites filter
350
+ */
351
+ export function workspaceV2ControllergetWorkspacesWithoutStackFilter({ name, aclOnly, accountId, page, size, sortBy, sortDir }, opts) {
352
+ return oazapfts.ok(oazapfts.fetchJson(`/v2/workspaces${QS.query(QS.explode({
353
+ name,
354
+ aclOnly,
355
+ page,
356
+ size,
357
+ sortBy,
358
+ sortDir
359
+ }))}`, {
360
+ ...opts,
361
+ headers: oazapfts.mergeHeaders(opts?.headers, {
362
+ accountId
363
+ })
364
+ }));
365
+ }
366
+ /**
367
+ * Get all workspaces
368
+ */
369
+ export function workspaceV2ControllergetWorkspaces({ aclOnly, accountId, page, size, sortBy, sortDir, getWorkspacePageRequest }, opts) {
370
+ return oazapfts.ok(oazapfts.fetchJson(`/v2/workspaces${QS.query(QS.explode({
371
+ aclOnly,
372
+ page,
373
+ size,
374
+ sortBy,
375
+ sortDir
376
+ }))}`, oazapfts.json({
377
+ ...opts,
378
+ method: "POST",
379
+ body: getWorkspacePageRequest,
380
+ headers: oazapfts.mergeHeaders(opts?.headers, {
381
+ accountId
382
+ })
383
+ })));
384
+ }
348
385
  /**
349
386
  * Get shared infra page.
350
387
  */
351
- export function sharedInfrastructureV2ControllergetSharedInfra({ workspaceId, page, size, sortBy, sortDir, getSharedInfraRequestBody }, opts) {
388
+ export function workspaceSharedInfrastructureV2ControllergetSharedInfra({ workspaceId, page, size, sortBy, sortDir, getSharedInfraRequestBody }, opts) {
352
389
  return oazapfts.ok(oazapfts.fetchJson(`/v2/workspaces/${encodeURIComponent(workspaceId)}/shared-infra${QS.query(QS.explode({
353
390
  page,
354
391
  size,
@@ -363,7 +400,7 @@ export function sharedInfrastructureV2ControllergetSharedInfra({ workspaceId, pa
363
400
  /**
364
401
  * Get applications from a workspace with pagination.
365
402
  */
366
- export function applicationV2ControllergetApplications({ workspaceId, page, size, sortBy, sortDir, getApplicationsRequestBody }, opts) {
403
+ export function workspaceApplicationV2ControllergetApplications({ workspaceId, page, size, sortBy, sortDir, getApplicationsRequestBody }, opts) {
367
404
  return oazapfts.ok(oazapfts.fetchJson(`/v2/workspaces/${encodeURIComponent(workspaceId)}/applications${QS.query(QS.explode({
368
405
  page,
369
406
  size,
@@ -466,7 +503,7 @@ export function workspaceStackControlleraddUpdateStack({ workspaceId, addStackIn
466
503
  /**
467
504
  * Get all shared infrastructure of a workspace.
468
505
  */
469
- export function sharedInfrastructureControllergetAllSharedInfrastructure({ workspaceId, name, stackVersionId }, opts) {
506
+ export function workspaceSharedInfrastructureControllergetAllSharedInfrastructure({ workspaceId, name, stackVersionId }, opts) {
470
507
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra${QS.query(QS.explode({
471
508
  name,
472
509
  stackVersionId
@@ -477,7 +514,7 @@ export function sharedInfrastructureControllergetAllSharedInfrastructure({ works
477
514
  /**
478
515
  * Create shared infrastructure in a workspace.
479
516
  */
480
- export function sharedInfrastructureControllersave({ workspaceId, fromPortal, createSharedInfraRequest }, opts) {
517
+ export function workspaceSharedInfrastructureControllersave({ workspaceId, fromPortal, createSharedInfraRequest }, opts) {
481
518
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra${QS.query(QS.explode({
482
519
  fromPortal
483
520
  }))}`, oazapfts.json({
@@ -489,7 +526,7 @@ export function sharedInfrastructureControllersave({ workspaceId, fromPortal, cr
489
526
  /**
490
527
  * Get shared infrastructure of a workspace.
491
528
  */
492
- export function sharedInfrastructureControllergetSharedInfrastructure({ workspaceId, sharedInfraId }, opts) {
529
+ export function workspaceSharedInfrastructureControllergetSharedInfrastructure({ workspaceId, sharedInfraId }, opts) {
493
530
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}`, {
494
531
  ...opts
495
532
  }));
@@ -497,7 +534,7 @@ export function sharedInfrastructureControllergetSharedInfrastructure({ workspac
497
534
  /**
498
535
  * Recreate a shared infrastructure in a workspace.
499
536
  */
500
- export function sharedInfrastructureControllerrecreate({ workspaceId, sharedInfraId, recreateSharedInfraRequest }, opts) {
537
+ export function workspaceSharedInfrastructureControllerrecreate({ workspaceId, sharedInfraId, recreateSharedInfraRequest }, opts) {
501
538
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}`, oazapfts.json({
502
539
  ...opts,
503
540
  method: "POST",
@@ -507,7 +544,7 @@ export function sharedInfrastructureControllerrecreate({ workspaceId, sharedInfr
507
544
  /**
508
545
  * Delete infrastructure in a workspace.
509
546
  */
510
- export function sharedInfrastructureControllerdeleteSharedInfra({ workspaceId, sharedInfraId }, opts) {
547
+ export function workspaceSharedInfrastructureControllerdeleteSharedInfra({ workspaceId, sharedInfraId }, opts) {
511
548
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}`, {
512
549
  ...opts,
513
550
  method: "DELETE"
@@ -516,7 +553,7 @@ export function sharedInfrastructureControllerdeleteSharedInfra({ workspaceId, s
516
553
  /**
517
554
  * Update shared infrastructure in a workspace.
518
555
  */
519
- export function sharedInfrastructureControllerupdate({ workspaceId, sharedInfraId, updateSharedInfraRequest }, opts) {
556
+ export function workspaceSharedInfrastructureControllerupdate({ workspaceId, sharedInfraId, updateSharedInfraRequest }, opts) {
520
557
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}`, oazapfts.json({
521
558
  ...opts,
522
559
  method: "PATCH",
@@ -546,7 +583,7 @@ export function sharedInfraLinkControllersave({ workspaceId, sharedInfraId, crea
546
583
  /**
547
584
  * Has active deploy with type self hosted?
548
585
  */
549
- export function sharedInfrastructureControllerhasActiveDeployWithTypeSelfHosted({ workspaceId, sharedInfraId }, opts) {
586
+ export function workspaceSharedInfrastructureControllerhasActiveDeployWithTypeSelfHosted({ workspaceId, sharedInfraId }, opts) {
550
587
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/has-self-hosted-deploy`, {
551
588
  ...opts,
552
589
  method: "POST"
@@ -555,7 +592,7 @@ export function sharedInfrastructureControllerhasActiveDeployWithTypeSelfHosted(
555
592
  /**
556
593
  * Can the shared infra be destroyed?
557
594
  */
558
- export function sharedInfrastructureControllercanBeDestroyed({ workspaceId, sharedInfraId, environmentId, accountId }, opts) {
595
+ export function workspaceSharedInfrastructureControllercanBeDestroyed({ workspaceId, sharedInfraId, environmentId, accountId }, opts) {
559
596
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/environments/${encodeURIComponent(environmentId)}/can-be-destroyed`, {
560
597
  ...opts,
561
598
  method: "POST",
@@ -567,7 +604,7 @@ export function sharedInfrastructureControllercanBeDestroyed({ workspaceId, shar
567
604
  /**
568
605
  * Register the snapshot of a shared infrastructure's deploy.
569
606
  */
570
- export function sharedInfrastructureControllerprocessDeploySnapshot({ workspaceId, sharedInfraId, sharedInfraDeploySnapshotRequest }, opts) {
607
+ export function workspaceSharedInfrastructureControllerprocessDeploySnapshot({ workspaceId, sharedInfraId, sharedInfraDeploySnapshotRequest }, opts) {
571
608
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/deploy`, oazapfts.json({
572
609
  ...opts,
573
610
  method: "POST",
@@ -660,7 +697,7 @@ export function connectionInterfaceControllerupdateConnectionInterfaceVisibility
660
697
  /**
661
698
  * Get all application of a workspace.
662
699
  */
663
- export function applicationControllergetApplications({ workspaceId, name, stackVersionId }, opts) {
700
+ export function workspaceApplicationControllergetApplications({ workspaceId, name, stackVersionId }, opts) {
664
701
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications${QS.query(QS.explode({
665
702
  name,
666
703
  stackVersionId
@@ -671,7 +708,7 @@ export function applicationControllergetApplications({ workspaceId, name, stackV
671
708
  /**
672
709
  * Create application on workspace.
673
710
  */
674
- export function applicationControllersave({ workspaceId, fromPortal, createApplicationRequest }, opts) {
711
+ export function workspaceApplicationControllersave({ workspaceId, fromPortal, createApplicationRequest }, opts) {
675
712
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications${QS.query(QS.explode({
676
713
  fromPortal
677
714
  }))}`, oazapfts.json({
@@ -683,7 +720,7 @@ export function applicationControllersave({ workspaceId, fromPortal, createAppli
683
720
  /**
684
721
  * Get application of a workspace.
685
722
  */
686
- export function applicationControllergetApplication({ workspaceId, applicationId }, opts) {
723
+ export function workspaceApplicationControllergetApplication({ workspaceId, applicationId }, opts) {
687
724
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}`, {
688
725
  ...opts
689
726
  }));
@@ -691,7 +728,7 @@ export function applicationControllergetApplication({ workspaceId, applicationId
691
728
  /**
692
729
  * Recreate an application in a workspace.
693
730
  */
694
- export function applicationControllerrecreate({ workspaceId, applicationId, recreateApplicationRequest }, opts) {
731
+ export function workspaceApplicationControllerrecreate({ workspaceId, applicationId, recreateApplicationRequest }, opts) {
695
732
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}`, oazapfts.json({
696
733
  ...opts,
697
734
  method: "POST",
@@ -701,7 +738,7 @@ export function applicationControllerrecreate({ workspaceId, applicationId, recr
701
738
  /**
702
739
  * Delete application of a workspace.
703
740
  */
704
- export function applicationControllerdeleteApplication({ workspaceId, applicationId, accountId }, opts) {
741
+ export function workspaceApplicationControllerdeleteApplication({ workspaceId, applicationId, accountId }, opts) {
705
742
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}`, {
706
743
  ...opts,
707
744
  method: "DELETE",
@@ -713,7 +750,7 @@ export function applicationControllerdeleteApplication({ workspaceId, applicatio
713
750
  /**
714
751
  * Update an application of a workspace.
715
752
  */
716
- export function applicationControllerupdate({ workspaceId, applicationId, updateApplicationRequest }, opts) {
753
+ export function workspaceApplicationControllerupdate({ workspaceId, applicationId, updateApplicationRequest }, opts) {
717
754
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}`, oazapfts.json({
718
755
  ...opts,
719
756
  method: "PATCH",
@@ -743,7 +780,7 @@ export function applicationLinkControllersave({ workspaceId, applicationId, crea
743
780
  /**
744
781
  * Has active deploy with type self hosted?
745
782
  */
746
- export function applicationControllerhasActiveDeployWithTypeSelfHosted({ workspaceId, applicationId }, opts) {
783
+ export function workspaceApplicationControllerhasActiveDeployWithTypeSelfHosted({ workspaceId, applicationId }, opts) {
747
784
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/has-self-hosted-deploy`, {
748
785
  ...opts,
749
786
  method: "POST"
@@ -752,7 +789,7 @@ export function applicationControllerhasActiveDeployWithTypeSelfHosted({ workspa
752
789
  /**
753
790
  * Can the application be destroyed?
754
791
  */
755
- export function applicationControllercanBeDestroyed({ workspaceId, applicationId, environmentId, accountId }, opts) {
792
+ export function workspaceApplicationControllercanBeDestroyed({ workspaceId, applicationId, environmentId, accountId }, opts) {
756
793
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/can-be-destroyed`, {
757
794
  ...opts,
758
795
  method: "POST",
@@ -761,14 +798,14 @@ export function applicationControllercanBeDestroyed({ workspaceId, applicationId
761
798
  })
762
799
  }));
763
800
  }
764
- export function applicationControllerregistryAppDestroy({ workspaceId, applicationId, environmentId, applicationDestroyRequest }, opts) {
801
+ export function workspaceApplicationControllerregistryAppDestroy({ workspaceId, applicationId, environmentId, applicationDestroyRequest }, opts) {
765
802
  return oazapfts.ok(oazapfts.fetchText(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/app-destroy`, oazapfts.json({
766
803
  ...opts,
767
804
  method: "POST",
768
805
  body: applicationDestroyRequest
769
806
  })));
770
807
  }
771
- export function applicationControllerregistryAppDeploy({ workspaceId, applicationId, environmentId, applicationDeployRequest }, opts) {
808
+ export function workspaceApplicationControllerregistryAppDeploy({ workspaceId, applicationId, environmentId, applicationDeployRequest }, opts) {
772
809
  return oazapfts.ok(oazapfts.fetchText(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/app-deploy`, oazapfts.json({
773
810
  ...opts,
774
811
  method: "POST",
@@ -798,7 +835,7 @@ export function applicationEmbeddedLinkControllersave({ workspaceId, application
798
835
  /**
799
836
  * Register the snapshot of an application's deploy.
800
837
  */
801
- export function applicationControllerprocessDeploySnapshot({ workspaceId, applicationId, applicationDeploySnapshotRequest }, opts) {
838
+ export function workspaceApplicationControllerprocessDeploySnapshot({ workspaceId, applicationId, applicationDeploySnapshotRequest }, opts) {
802
839
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/deploy`, oazapfts.json({
803
840
  ...opts,
804
841
  method: "POST",
@@ -818,6 +855,21 @@ export function usageInsightsControllerlistAllStackUsage({ accountId, body }, op
818
855
  })
819
856
  })));
820
857
  }
858
+ /**
859
+ * Get plugins applied to a workspace's application.
860
+ */
861
+ export function accountSharedInfrastructureControllergetSharedInfraPage({ page, size, sortBy, sortDir, getAllSharedInfraRequestBody }, opts) {
862
+ return oazapfts.ok(oazapfts.fetchJson(`/v1/shared-infra/-/search${QS.query(QS.explode({
863
+ page,
864
+ size,
865
+ sortBy,
866
+ sortDir
867
+ }))}`, oazapfts.json({
868
+ ...opts,
869
+ method: "POST",
870
+ body: getAllSharedInfraRequestBody
871
+ })));
872
+ }
821
873
  /**
822
874
  * Retrieve the amount of apps and shared infras that use the given plugin version id list
823
875
  */
@@ -865,6 +917,21 @@ export function environmentControllersaveBatch({ accountId, body }, opts) {
865
917
  })
866
918
  })));
867
919
  }
920
+ /**
921
+ * Get plugins applied to a workspace's application.
922
+ */
923
+ export function accountApplicationControllergetApplicationPage({ page, size, sortBy, sortDir, getAllApplicationsRequestBody }, opts) {
924
+ return oazapfts.ok(oazapfts.fetchJson(`/v1/applications/-/search${QS.query(QS.explode({
925
+ page,
926
+ size,
927
+ sortBy,
928
+ sortDir
929
+ }))}`, oazapfts.json({
930
+ ...opts,
931
+ method: "POST",
932
+ body: getAllApplicationsRequestBody
933
+ })));
934
+ }
868
935
  /**
869
936
  * List all workflows of an account.
870
937
  */
@@ -1108,7 +1175,7 @@ export function applicationEmbeddedLinkControllerupsertBatch({ workspaceId, appl
1108
1175
  /**
1109
1176
  * Archive application from a workspace.
1110
1177
  */
1111
- export function applicationControllerarchiveApplication({ workspaceId, applicationId }, opts) {
1178
+ export function workspaceApplicationControllerarchiveApplication({ workspaceId, applicationId }, opts) {
1112
1179
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/archive`, {
1113
1180
  ...opts,
1114
1181
  method: "PATCH"
@@ -1132,24 +1199,6 @@ export function environmentControllerupdate({ id, environmentUpdateRequest }, op
1132
1199
  body: environmentUpdateRequest
1133
1200
  })));
1134
1201
  }
1135
- /**
1136
- * Get all workspaces
1137
- */
1138
- export function workspaceV2ControllergetWorkspaces({ name, aclOnly, accountId, page, size, sortBy, sortDir }, opts) {
1139
- return oazapfts.ok(oazapfts.fetchJson(`/v2/workspaces${QS.query(QS.explode({
1140
- name,
1141
- aclOnly,
1142
- page,
1143
- size,
1144
- sortBy,
1145
- sortDir
1146
- }))}`, {
1147
- ...opts,
1148
- headers: oazapfts.mergeHeaders(opts?.headers, {
1149
- accountId
1150
- })
1151
- }));
1152
- }
1153
1202
  /**
1154
1203
  * Find all workspace variables
1155
1204
  */
@@ -1172,7 +1221,7 @@ export function workspaceVariableV2ControllerfindAll({ workspaceId, accountId, p
1172
1221
  /**
1173
1222
  * Get plugins applied to a workspace's shared infrastructure.
1174
1223
  */
1175
- export function sharedInfrastructureV2ControllergetAppliedPlugins({ workspaceId, sharedInfraId, environmentId }, opts) {
1224
+ export function workspaceSharedInfrastructureV2ControllergetAppliedPlugins({ workspaceId, sharedInfraId, environmentId }, opts) {
1176
1225
  return oazapfts.ok(oazapfts.fetchJson(`/v2/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/environments/${encodeURIComponent(environmentId)}/plugins`, {
1177
1226
  ...opts
1178
1227
  }));
@@ -1204,7 +1253,7 @@ export function availableConnectionInterfaceV2ControllergetAvailableConnectionIn
1204
1253
  /**
1205
1254
  * Get plugins applied to a workspace's application.
1206
1255
  */
1207
- export function applicationV2ControllergetAppliedPlugins({ workspaceId, applicationId, environmentId }, opts) {
1256
+ export function workspaceApplicationV2ControllergetAppliedPlugins({ workspaceId, applicationId, environmentId }, opts) {
1208
1257
  return oazapfts.ok(oazapfts.fetchJson(`/v2/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/plugins`, {
1209
1258
  ...opts
1210
1259
  }));
@@ -1292,7 +1341,7 @@ export function workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType(
1292
1341
  /**
1293
1342
  * Get plugins applied to a workspace's shared infrastructure.
1294
1343
  */
1295
- export function sharedInfrastructureControllergetAppliedPlugins({ workspaceId, sharedInfraId, environmentId, $type }, opts) {
1344
+ export function workspaceSharedInfrastructureControllergetAppliedPlugins({ workspaceId, sharedInfraId, environmentId, $type }, opts) {
1296
1345
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/environments/${encodeURIComponent(environmentId)}/plugins${QS.query(QS.explode({
1297
1346
  "type": $type
1298
1347
  }))}`, {
@@ -1302,7 +1351,7 @@ export function sharedInfrastructureControllergetAppliedPlugins({ workspaceId, s
1302
1351
  /**
1303
1352
  * List shared infrastructure's activities.
1304
1353
  */
1305
- export function sharedInfrastructureControllerlistActivities({ workspaceId, sharedInfraId, environmentId, $type, page, size }, opts) {
1354
+ export function workspaceSharedInfrastructureControllerlistActivities({ workspaceId, sharedInfraId, environmentId, $type, page, size }, opts) {
1306
1355
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/environments/${encodeURIComponent(environmentId)}/activities${QS.query(QS.explode({
1307
1356
  "type": $type,
1308
1357
  page,
@@ -1314,7 +1363,7 @@ export function sharedInfrastructureControllerlistActivities({ workspaceId, shar
1314
1363
  /**
1315
1364
  * Get all in use connection interface dependencies from the shared infra.
1316
1365
  */
1317
- export function sharedInfrastructureControllergetDependencyTree({ workspaceId, sharedInfraId }, opts) {
1366
+ export function workspaceSharedInfrastructureControllergetDependencyTree({ workspaceId, sharedInfraId }, opts) {
1318
1367
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/dependencies`, {
1319
1368
  ...opts
1320
1369
  }));
@@ -1322,7 +1371,7 @@ export function sharedInfrastructureControllergetDependencyTree({ workspaceId, s
1322
1371
  /**
1323
1372
  * Get stack version in use by shared infra in a workspace
1324
1373
  */
1325
- export function sharedInfrastructureControllergetStackVersionsInUse({ workspaceId }, opts) {
1374
+ export function workspaceSharedInfrastructureControllergetStackVersionsInUse({ workspaceId }, opts) {
1326
1375
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/stacks/versions`, {
1327
1376
  ...opts
1328
1377
  }));
@@ -1382,14 +1431,14 @@ export function availableConnectionInterfaceControllergetAvailableConnectionInte
1382
1431
  /**
1383
1432
  * Get plugins applied to a workspace's application.
1384
1433
  */
1385
- export function applicationControllergetAppliedPlugins({ workspaceId, applicationId, environmentId, $type }, opts) {
1434
+ export function workspaceApplicationControllergetAppliedPlugins({ workspaceId, applicationId, environmentId, $type }, opts) {
1386
1435
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/plugins${QS.query(QS.explode({
1387
1436
  "type": $type
1388
1437
  }))}`, {
1389
1438
  ...opts
1390
1439
  }));
1391
1440
  }
1392
- export function applicationControllergetAppDeployInfo({ workspaceId, applicationId, environmentId, accountId, tenant }, opts) {
1441
+ export function workspaceApplicationControllergetAppDeployInfo({ workspaceId, applicationId, environmentId, accountId, tenant }, opts) {
1393
1442
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/deploy-info`, {
1394
1443
  ...opts,
1395
1444
  headers: oazapfts.mergeHeaders(opts?.headers, {
@@ -1401,7 +1450,7 @@ export function applicationControllergetAppDeployInfo({ workspaceId, application
1401
1450
  /**
1402
1451
  * List application's activities.
1403
1452
  */
1404
- export function applicationControllerlistActivities({ workspaceId, applicationId, environmentId, $type, page, size }, opts) {
1453
+ export function workspaceApplicationControllerlistActivities({ workspaceId, applicationId, environmentId, $type, page, size }, opts) {
1405
1454
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/environments/${encodeURIComponent(environmentId)}/activities${QS.query(QS.explode({
1406
1455
  "type": $type,
1407
1456
  page,
@@ -1413,7 +1462,7 @@ export function applicationControllerlistActivities({ workspaceId, applicationId
1413
1462
  /**
1414
1463
  * Get all in use connection interface dependencies from the application.
1415
1464
  */
1416
- export function applicationControllergetDependencyTree({ workspaceId, applicationId }, opts) {
1465
+ export function workspaceApplicationControllergetDependencyTree({ workspaceId, applicationId }, opts) {
1417
1466
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/dependencies`, {
1418
1467
  ...opts
1419
1468
  }));
@@ -1421,7 +1470,7 @@ export function applicationControllergetDependencyTree({ workspaceId, applicatio
1421
1470
  /**
1422
1471
  * Can the application be destroyed?
1423
1472
  */
1424
- export function applicationControllercanBeDeleted({ workspaceId, applicationId, accountId, tenant }, opts) {
1473
+ export function workspaceApplicationControllercanBeDeleted({ workspaceId, applicationId, accountId, tenant }, opts) {
1425
1474
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/can-be-deleted`, {
1426
1475
  ...opts,
1427
1476
  headers: oazapfts.mergeHeaders(opts?.headers, {
@@ -1433,7 +1482,7 @@ export function applicationControllercanBeDeleted({ workspaceId, applicationId,
1433
1482
  /**
1434
1483
  * Get stack version in use by applications in a workspace
1435
1484
  */
1436
- export function applicationControllergetStackVersionsInUse({ workspaceId }, opts) {
1485
+ export function workspaceApplicationControllergetStackVersionsInUse({ workspaceId }, opts) {
1437
1486
  return oazapfts.ok(oazapfts.fetchJson(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/stacks/versions`, {
1438
1487
  ...opts
1439
1488
  }));
@@ -1449,7 +1498,7 @@ export function workspaceControllergetWorkspacesFromUserPermission({ resource, a
1449
1498
  /**
1450
1499
  * Get shared infrastructure information by id.
1451
1500
  */
1452
- export function getSharedInfraControllergetSharedInfra({ id }, opts) {
1501
+ export function accountSharedInfrastructureControllergetSharedInfra({ id }, opts) {
1453
1502
  return oazapfts.ok(oazapfts.fetchJson(`/v1/shared-infra/${encodeURIComponent(id)}`, {
1454
1503
  ...opts
1455
1504
  }));
@@ -1465,15 +1514,18 @@ export function pluginInUseControllercheckPluginInUse({ pluginVersionId }, opts)
1465
1514
  /**
1466
1515
  * Check availability of connection slug in account.
1467
1516
  */
1468
- export function checkConnectionSlugAvailabilityControllercheckConnectionSlugAvailability({ slug }, opts) {
1469
- return oazapfts.ok(oazapfts.fetchJson(`/v1/connection-interfaces/${encodeURIComponent(slug)}/availability`, {
1517
+ export function checkConnectionSlugAvailabilityControllercheckConnectionSlugAvailability({ slug, applicationId, sharedInfraId }, opts) {
1518
+ return oazapfts.ok(oazapfts.fetchJson(`/v1/connection-interfaces/${encodeURIComponent(slug)}/availability${QS.query(QS.explode({
1519
+ applicationId,
1520
+ sharedInfraId
1521
+ }))}`, {
1470
1522
  ...opts
1471
1523
  }));
1472
1524
  }
1473
1525
  /**
1474
1526
  * Get an application list by repo url.
1475
1527
  */
1476
- export function getApplicationControllergetApplicationsByUrl({ accountId, repoUrl }, opts) {
1528
+ export function accountApplicationControllergetApplicationsByUrl({ accountId, repoUrl }, opts) {
1477
1529
  return oazapfts.ok(oazapfts.fetchJson(`/v1/applications${QS.query(QS.explode({
1478
1530
  repoUrl
1479
1531
  }))}`, {
@@ -1486,7 +1538,7 @@ export function getApplicationControllergetApplicationsByUrl({ accountId, repoUr
1486
1538
  /**
1487
1539
  * Get application information by id.
1488
1540
  */
1489
- export function getApplicationControllergetApplication({ id }, opts) {
1541
+ export function accountApplicationControllergetApplication({ id }, opts) {
1490
1542
  return oazapfts.ok(oazapfts.fetchJson(`/v1/applications/${encodeURIComponent(id)}`, {
1491
1543
  ...opts
1492
1544
  }));
@@ -1568,6 +1620,17 @@ export function accountStackControllerlistStacksWithWorkflow(opts) {
1568
1620
  ...opts
1569
1621
  }));
1570
1622
  }
1623
+ /**
1624
+ * List all stacks that are most commonly used by applications and shared infrastructure.
1625
+ */
1626
+ export function accountStackControllerlistMostUsedStacks({ accountId }, opts) {
1627
+ return oazapfts.ok(oazapfts.fetchJson("/v1/account/stacks/most-used", {
1628
+ ...opts,
1629
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1630
+ accountId
1631
+ })
1632
+ }));
1633
+ }
1571
1634
  /**
1572
1635
  * List all default workflows of an account.
1573
1636
  */