@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: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
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
  export type WorkspaceVariableResponse = {
18
18
  /** Workspace variable name. */
@@ -330,6 +330,29 @@ export type StackWorkflowCreateRequest = {
330
330
  actionsBefore: WorkflowActionContextRequest[];
331
331
  actionsAfter: WorkflowActionContextRequest[];
332
332
  };
333
+ export type WorkspaceResponse = {
334
+ /** Workspace id. */
335
+ id: string;
336
+ /** Workspace name */
337
+ name: string;
338
+ /** Workspace description */
339
+ description?: string;
340
+ /** Workspace image */
341
+ imageUrl?: string;
342
+ };
343
+ export type WorkspacePageResponse = {
344
+ currentPage: number;
345
+ pageSize: number;
346
+ lastPage: number;
347
+ totalItems: number;
348
+ totalPages: number;
349
+ items: WorkspaceResponse[];
350
+ };
351
+ export type GetWorkspacePageRequest = {
352
+ name?: string;
353
+ createdBy?: string;
354
+ favorites?: string[];
355
+ };
333
356
  export type GetSharedInfraRequestBody = {
334
357
  name?: string;
335
358
  stackVersionIds?: string[];
@@ -372,11 +395,12 @@ export type SharedInfraDetailsResponse = {
372
395
  /** Shared Infrastructure update date. */
373
396
  updatedAt: string;
374
397
  };
375
- export type SharedInfraPageResponse = {
398
+ export type WorkspaceSharedInfraPageResponse = {
376
399
  currentPage: number;
377
400
  pageSize: number;
378
401
  lastPage: number;
379
402
  totalItems: number;
403
+ totalPages: number;
380
404
  items: SharedInfraDetailsResponse[];
381
405
  };
382
406
  export type GetApplicationsRequestBody = {
@@ -411,11 +435,12 @@ export type ApplicationReadResponse = {
411
435
  /** Application update date. */
412
436
  updatedAt: string;
413
437
  };
414
- export type ApplicationPageResponse = {
438
+ export type WorkspaceApplicationPageResponse = {
415
439
  currentPage: number;
416
440
  pageSize: number;
417
441
  lastPage: number;
418
442
  totalItems: number;
443
+ totalPages: number;
419
444
  items: ApplicationReadResponse[];
420
445
  };
421
446
  export type EnvironmentSimpleResponse = {
@@ -429,16 +454,6 @@ export type TargetByPluginUsageResponse = {
429
454
  pluginVersionId: string;
430
455
  environment: EnvironmentSimpleResponse;
431
456
  };
432
- export type WorkspaceResponse = {
433
- /** Workspace id. */
434
- id: string;
435
- /** Workspace name */
436
- name: string;
437
- /** Workspace description */
438
- description?: string;
439
- /** Workspace image */
440
- imageUrl?: string;
441
- };
442
457
  export type PluginUsageByTargetResponse = {
443
458
  /** Application id. */
444
459
  id: string;
@@ -492,9 +507,24 @@ export type StackInWorkspaceReadResponse = {
492
507
  /** Account id. */
493
508
  accountId: string;
494
509
  };
510
+ export type StackVersionInfoRequest = {
511
+ /** Stack id. */
512
+ stackId: string;
513
+ /** Stack slug. */
514
+ stackSlug: string;
515
+ /** Stack display name. */
516
+ stackDisplayName: string;
517
+ /** Stack semantic version. */
518
+ stackVersionSemVer: string;
519
+ /** Studio id. */
520
+ studioId: string;
521
+ /** Studio slug. */
522
+ studioSlug: string;
523
+ };
495
524
  export type AddStackInWorkspaceRequest = {
496
525
  /** Stack version id. */
497
526
  stackVersionId: string;
527
+ stackVersionInfo: StackVersionInfoRequest;
498
528
  };
499
529
  export type StackVersionResponse = {
500
530
  stackVersionId: string;
@@ -886,6 +916,46 @@ export type StackUsageByWorkspaceResponse = {
886
916
  /** Stack Versions linked. */
887
917
  stackVersions: EnvironmentStackResponse[];
888
918
  };
919
+ export type GetAllSharedInfraRequestBody = {
920
+ favorites?: string[];
921
+ name?: string;
922
+ stackVersionIds?: string[];
923
+ };
924
+ export type SharedInfraWorkspaceReadResponse = {
925
+ /** Application id. */
926
+ id: string;
927
+ /** Shared Infra name. */
928
+ name: string;
929
+ /** Shared Infra description. */
930
+ description?: string;
931
+ /** Shared Infra repository url. */
932
+ repoUrl?: string;
933
+ /** Shared Infra repository base branch. */
934
+ repoBaseBranch: string;
935
+ /** Stack used to generate this Shared Infra. */
936
+ stackVersionId: string;
937
+ /** Starter used to generate this Shared Infra. */
938
+ starterId?: string;
939
+ /** Shared Infra status. */
940
+ status: string;
941
+ /** Shared Infra creator. */
942
+ createdBy: string;
943
+ /** Shared Infra creation date. */
944
+ createdAt: string;
945
+ /** Shared Infra updater. */
946
+ updatedBy: string;
947
+ /** Shared Infra update date. */
948
+ updatedAt: string;
949
+ workspace: WorkspaceReadResponse;
950
+ };
951
+ export type SharedInfraPageResponse = {
952
+ currentPage: number;
953
+ pageSize: number;
954
+ lastPage: number;
955
+ totalItems: number;
956
+ totalPages: number;
957
+ items: SharedInfraWorkspaceReadResponse[];
958
+ };
889
959
  export type PluginUsageAmountResponse = {
890
960
  pluginVersionId: string;
891
961
  totalUsedInInfras: number;
@@ -918,6 +988,46 @@ export type EnvironmentReadBatchResponse = {
918
988
  /** Environment name. */
919
989
  name: string;
920
990
  };
991
+ export type GetAllApplicationsRequestBody = {
992
+ favorites?: string[];
993
+ name?: string;
994
+ stackVersionIds?: string[];
995
+ };
996
+ export type ApplicationWorkspaceReadResponse = {
997
+ /** Application id. */
998
+ id: string;
999
+ /** Application name. */
1000
+ name: string;
1001
+ /** Application description. */
1002
+ description?: string;
1003
+ /** Application repository url. */
1004
+ repoUrl?: string;
1005
+ /** Application repository base branch. */
1006
+ repoBaseBranch: string;
1007
+ /** Stack used to generate this application. */
1008
+ stackVersionId: string;
1009
+ /** Starter used to generate this application. */
1010
+ starterId: string;
1011
+ /** Application status. */
1012
+ status: string;
1013
+ /** Application creator. */
1014
+ createdBy: string;
1015
+ /** Application creation date. */
1016
+ createdAt: string;
1017
+ /** Application updater. */
1018
+ updatedBy: string;
1019
+ /** Application update date. */
1020
+ updatedAt: string;
1021
+ workspace: WorkspaceReadResponse;
1022
+ };
1023
+ export type ApplicationPageResponse = {
1024
+ currentPage: number;
1025
+ pageSize: number;
1026
+ lastPage: number;
1027
+ totalItems: number;
1028
+ totalPages: number;
1029
+ items: ApplicationWorkspaceReadResponse[];
1030
+ };
921
1031
  export type WorkflowResponse = {
922
1032
  id: string;
923
1033
  name: string;
@@ -1034,13 +1144,6 @@ export type EnvironmentUpdateRequest = {
1034
1144
  /** Environment description. */
1035
1145
  description?: string;
1036
1146
  };
1037
- export type WorkspacePageResponse = {
1038
- currentPage: number;
1039
- pageSize: number;
1040
- lastPage: number;
1041
- totalItems: number;
1042
- items: WorkspaceResponse[];
1043
- };
1044
1147
  export type PaginatedWorkspaceVariableResponse = {
1045
1148
  currentPage: number;
1046
1149
  pageSize: number;
@@ -1353,6 +1456,10 @@ export type WorkflowActionUsageResponse = {
1353
1456
  versionRanges: string[];
1354
1457
  };
1355
1458
  export type AccountVariableUsageResponse = {
1459
+ /** How many plugins are using this account variable */
1460
+ pluginsInUse: number;
1461
+ /** How many actions are using this account variable */
1462
+ actionsInUse: number;
1356
1463
  /** How many contexts are using this account variable */
1357
1464
  contextsInUse: number;
1358
1465
  };
@@ -1670,7 +1777,7 @@ export function workflowControlleraddWorkflowStepInWorkspace({ workspaceId, stac
1670
1777
  /**
1671
1778
  * Update shared infrastructure status.
1672
1779
  */
1673
- export function sharedInfrastructureControllerupdateStatus({ workspaceId, sharedInfraId, updateSharedInfraStatusRequest }: {
1780
+ export function workspaceSharedInfrastructureControllerupdateStatus({ workspaceId, sharedInfraId, updateSharedInfraStatusRequest }: {
1674
1781
  workspaceId: string;
1675
1782
  sharedInfraId: string;
1676
1783
  updateSharedInfraStatusRequest: UpdateSharedInfraStatusRequest;
@@ -1904,7 +2011,7 @@ export function connectionInterfaceControllerupsertBatch({ workspaceId, body }:
1904
2011
  /**
1905
2012
  * Update application status.
1906
2013
  */
1907
- export function applicationControllerupdateStatus({ workspaceId, applicationId, accountId, updateApplicationStatusRequest }: {
2014
+ export function workspaceApplicationControllerupdateStatus({ workspaceId, applicationId, accountId, updateApplicationStatusRequest }: {
1908
2015
  workspaceId: string;
1909
2016
  applicationId: string;
1910
2017
  accountId?: string;
@@ -2295,10 +2402,81 @@ export function workflowStackControllersaveStackWorkflowContext({ stackId, workf
2295
2402
  body: stackWorkflowCreateRequest
2296
2403
  })));
2297
2404
  }
2405
+ /**
2406
+ * Get all workspaces without stack version and favorites filter
2407
+ */
2408
+ export function workspaceV2ControllergetWorkspacesWithoutStackFilter({ name, aclOnly, accountId, page, size, sortBy, sortDir }: {
2409
+ name?: string;
2410
+ aclOnly?: boolean;
2411
+ accountId?: string;
2412
+ page?: number;
2413
+ size?: number;
2414
+ sortBy?: "NAME" | "DESCRIPTION";
2415
+ sortDir?: "ASC" | "DESC";
2416
+ }, opts?: Oazapfts.RequestOpts) {
2417
+ return oazapfts.ok(oazapfts.fetchJson<{
2418
+ status: 200;
2419
+ data: WorkspacePageResponse;
2420
+ } | {
2421
+ status: 403;
2422
+ data: ErrorResponse;
2423
+ } | {
2424
+ status: 500;
2425
+ data: ErrorResponse;
2426
+ }>(`/v2/workspaces${QS.query(QS.explode({
2427
+ name,
2428
+ aclOnly,
2429
+ page,
2430
+ size,
2431
+ sortBy,
2432
+ sortDir
2433
+ }))}`, {
2434
+ ...opts,
2435
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2436
+ accountId
2437
+ })
2438
+ }));
2439
+ }
2440
+ /**
2441
+ * Get all workspaces
2442
+ */
2443
+ export function workspaceV2ControllergetWorkspaces({ aclOnly, accountId, page, size, sortBy, sortDir, getWorkspacePageRequest }: {
2444
+ aclOnly?: boolean;
2445
+ accountId?: string;
2446
+ page?: number;
2447
+ size?: number;
2448
+ sortBy?: "NAME" | "DESCRIPTION";
2449
+ sortDir?: "ASC" | "DESC";
2450
+ getWorkspacePageRequest?: GetWorkspacePageRequest;
2451
+ }, opts?: Oazapfts.RequestOpts) {
2452
+ return oazapfts.ok(oazapfts.fetchJson<{
2453
+ status: 200;
2454
+ data: WorkspacePageResponse;
2455
+ } | {
2456
+ status: 403;
2457
+ data: ErrorResponse;
2458
+ } | {
2459
+ status: 500;
2460
+ data: ErrorResponse;
2461
+ }>(`/v2/workspaces${QS.query(QS.explode({
2462
+ aclOnly,
2463
+ page,
2464
+ size,
2465
+ sortBy,
2466
+ sortDir
2467
+ }))}`, oazapfts.json({
2468
+ ...opts,
2469
+ method: "POST",
2470
+ body: getWorkspacePageRequest,
2471
+ headers: oazapfts.mergeHeaders(opts?.headers, {
2472
+ accountId
2473
+ })
2474
+ })));
2475
+ }
2298
2476
  /**
2299
2477
  * Get shared infra page.
2300
2478
  */
2301
- export function sharedInfrastructureV2ControllergetSharedInfra({ workspaceId, page, size, sortBy, sortDir, getSharedInfraRequestBody }: {
2479
+ export function workspaceSharedInfrastructureV2ControllergetSharedInfra({ workspaceId, page, size, sortBy, sortDir, getSharedInfraRequestBody }: {
2302
2480
  workspaceId: string;
2303
2481
  page?: number;
2304
2482
  size?: number;
@@ -2308,7 +2486,7 @@ export function sharedInfrastructureV2ControllergetSharedInfra({ workspaceId, pa
2308
2486
  }, opts?: Oazapfts.RequestOpts) {
2309
2487
  return oazapfts.ok(oazapfts.fetchJson<{
2310
2488
  status: 200;
2311
- data: SharedInfraPageResponse;
2489
+ data: WorkspaceSharedInfraPageResponse;
2312
2490
  } | {
2313
2491
  status: 400;
2314
2492
  data: ErrorResponse;
@@ -2335,7 +2513,7 @@ export function sharedInfrastructureV2ControllergetSharedInfra({ workspaceId, pa
2335
2513
  /**
2336
2514
  * Get applications from a workspace with pagination.
2337
2515
  */
2338
- export function applicationV2ControllergetApplications({ workspaceId, page, size, sortBy, sortDir, getApplicationsRequestBody }: {
2516
+ export function workspaceApplicationV2ControllergetApplications({ workspaceId, page, size, sortBy, sortDir, getApplicationsRequestBody }: {
2339
2517
  workspaceId: string;
2340
2518
  page?: number;
2341
2519
  size?: number;
@@ -2345,7 +2523,7 @@ export function applicationV2ControllergetApplications({ workspaceId, page, size
2345
2523
  }, opts?: Oazapfts.RequestOpts) {
2346
2524
  return oazapfts.ok(oazapfts.fetchJson<{
2347
2525
  status: 200;
2348
- data: ApplicationPageResponse;
2526
+ data: WorkspaceApplicationPageResponse;
2349
2527
  } | {
2350
2528
  status: 400;
2351
2529
  data: ErrorResponse;
@@ -2583,7 +2761,7 @@ export function workspaceStackControlleraddUpdateStack({ workspaceId, addStackIn
2583
2761
  /**
2584
2762
  * Get all shared infrastructure of a workspace.
2585
2763
  */
2586
- export function sharedInfrastructureControllergetAllSharedInfrastructure({ workspaceId, name, stackVersionId }: {
2764
+ export function workspaceSharedInfrastructureControllergetAllSharedInfrastructure({ workspaceId, name, stackVersionId }: {
2587
2765
  workspaceId: string;
2588
2766
  name?: string;
2589
2767
  stackVersionId?: string;
@@ -2613,7 +2791,7 @@ export function sharedInfrastructureControllergetAllSharedInfrastructure({ works
2613
2791
  /**
2614
2792
  * Create shared infrastructure in a workspace.
2615
2793
  */
2616
- export function sharedInfrastructureControllersave({ workspaceId, fromPortal, createSharedInfraRequest }: {
2794
+ export function workspaceSharedInfrastructureControllersave({ workspaceId, fromPortal, createSharedInfraRequest }: {
2617
2795
  workspaceId: string;
2618
2796
  fromPortal?: boolean;
2619
2797
  createSharedInfraRequest: CreateSharedInfraRequest;
@@ -2644,7 +2822,7 @@ export function sharedInfrastructureControllersave({ workspaceId, fromPortal, cr
2644
2822
  /**
2645
2823
  * Get shared infrastructure of a workspace.
2646
2824
  */
2647
- export function sharedInfrastructureControllergetSharedInfrastructure({ workspaceId, sharedInfraId }: {
2825
+ export function workspaceSharedInfrastructureControllergetSharedInfrastructure({ workspaceId, sharedInfraId }: {
2648
2826
  workspaceId: string;
2649
2827
  sharedInfraId: string;
2650
2828
  }, opts?: Oazapfts.RequestOpts) {
@@ -2670,7 +2848,7 @@ export function sharedInfrastructureControllergetSharedInfrastructure({ workspac
2670
2848
  /**
2671
2849
  * Recreate a shared infrastructure in a workspace.
2672
2850
  */
2673
- export function sharedInfrastructureControllerrecreate({ workspaceId, sharedInfraId, recreateSharedInfraRequest }: {
2851
+ export function workspaceSharedInfrastructureControllerrecreate({ workspaceId, sharedInfraId, recreateSharedInfraRequest }: {
2674
2852
  workspaceId: string;
2675
2853
  sharedInfraId: string;
2676
2854
  recreateSharedInfraRequest: RecreateSharedInfraRequest;
@@ -2702,7 +2880,7 @@ export function sharedInfrastructureControllerrecreate({ workspaceId, sharedInfr
2702
2880
  /**
2703
2881
  * Delete infrastructure in a workspace.
2704
2882
  */
2705
- export function sharedInfrastructureControllerdeleteSharedInfra({ workspaceId, sharedInfraId }: {
2883
+ export function workspaceSharedInfrastructureControllerdeleteSharedInfra({ workspaceId, sharedInfraId }: {
2706
2884
  workspaceId: string;
2707
2885
  sharedInfraId: string;
2708
2886
  }, opts?: Oazapfts.RequestOpts) {
@@ -2728,7 +2906,7 @@ export function sharedInfrastructureControllerdeleteSharedInfra({ workspaceId, s
2728
2906
  /**
2729
2907
  * Update shared infrastructure in a workspace.
2730
2908
  */
2731
- export function sharedInfrastructureControllerupdate({ workspaceId, sharedInfraId, updateSharedInfraRequest }: {
2909
+ export function workspaceSharedInfrastructureControllerupdate({ workspaceId, sharedInfraId, updateSharedInfraRequest }: {
2732
2910
  workspaceId: string;
2733
2911
  sharedInfraId: string;
2734
2912
  updateSharedInfraRequest: UpdateSharedInfraRequest;
@@ -2812,7 +2990,7 @@ export function sharedInfraLinkControllersave({ workspaceId, sharedInfraId, crea
2812
2990
  /**
2813
2991
  * Has active deploy with type self hosted?
2814
2992
  */
2815
- export function sharedInfrastructureControllerhasActiveDeployWithTypeSelfHosted({ workspaceId, sharedInfraId }: {
2993
+ export function workspaceSharedInfrastructureControllerhasActiveDeployWithTypeSelfHosted({ workspaceId, sharedInfraId }: {
2816
2994
  workspaceId: string;
2817
2995
  sharedInfraId: string;
2818
2996
  }, opts?: Oazapfts.RequestOpts) {
@@ -2841,7 +3019,7 @@ export function sharedInfrastructureControllerhasActiveDeployWithTypeSelfHosted(
2841
3019
  /**
2842
3020
  * Can the shared infra be destroyed?
2843
3021
  */
2844
- export function sharedInfrastructureControllercanBeDestroyed({ workspaceId, sharedInfraId, environmentId, accountId }: {
3022
+ export function workspaceSharedInfrastructureControllercanBeDestroyed({ workspaceId, sharedInfraId, environmentId, accountId }: {
2845
3023
  workspaceId: string;
2846
3024
  sharedInfraId: string;
2847
3025
  environmentId: string;
@@ -2875,7 +3053,7 @@ export function sharedInfrastructureControllercanBeDestroyed({ workspaceId, shar
2875
3053
  /**
2876
3054
  * Register the snapshot of a shared infrastructure's deploy.
2877
3055
  */
2878
- export function sharedInfrastructureControllerprocessDeploySnapshot({ workspaceId, sharedInfraId, sharedInfraDeploySnapshotRequest }: {
3056
+ export function workspaceSharedInfrastructureControllerprocessDeploySnapshot({ workspaceId, sharedInfraId, sharedInfraDeploySnapshotRequest }: {
2879
3057
  workspaceId: string;
2880
3058
  sharedInfraId: string;
2881
3059
  sharedInfraDeploySnapshotRequest: SharedInfraDeploySnapshotRequest;
@@ -3126,7 +3304,7 @@ export function connectionInterfaceControllerupdateConnectionInterfaceVisibility
3126
3304
  /**
3127
3305
  * Get all application of a workspace.
3128
3306
  */
3129
- export function applicationControllergetApplications({ workspaceId, name, stackVersionId }: {
3307
+ export function workspaceApplicationControllergetApplications({ workspaceId, name, stackVersionId }: {
3130
3308
  workspaceId: string;
3131
3309
  name?: string;
3132
3310
  stackVersionId?: string;
@@ -3156,7 +3334,7 @@ export function applicationControllergetApplications({ workspaceId, name, stackV
3156
3334
  /**
3157
3335
  * Create application on workspace.
3158
3336
  */
3159
- export function applicationControllersave({ workspaceId, fromPortal, createApplicationRequest }: {
3337
+ export function workspaceApplicationControllersave({ workspaceId, fromPortal, createApplicationRequest }: {
3160
3338
  workspaceId: string;
3161
3339
  fromPortal?: boolean;
3162
3340
  createApplicationRequest: CreateApplicationRequest;
@@ -3187,7 +3365,7 @@ export function applicationControllersave({ workspaceId, fromPortal, createAppli
3187
3365
  /**
3188
3366
  * Get application of a workspace.
3189
3367
  */
3190
- export function applicationControllergetApplication({ workspaceId, applicationId }: {
3368
+ export function workspaceApplicationControllergetApplication({ workspaceId, applicationId }: {
3191
3369
  workspaceId: string;
3192
3370
  applicationId: string;
3193
3371
  }, opts?: Oazapfts.RequestOpts) {
@@ -3213,7 +3391,7 @@ export function applicationControllergetApplication({ workspaceId, applicationId
3213
3391
  /**
3214
3392
  * Recreate an application in a workspace.
3215
3393
  */
3216
- export function applicationControllerrecreate({ workspaceId, applicationId, recreateApplicationRequest }: {
3394
+ export function workspaceApplicationControllerrecreate({ workspaceId, applicationId, recreateApplicationRequest }: {
3217
3395
  workspaceId: string;
3218
3396
  applicationId: string;
3219
3397
  recreateApplicationRequest: RecreateApplicationRequest;
@@ -3245,7 +3423,7 @@ export function applicationControllerrecreate({ workspaceId, applicationId, recr
3245
3423
  /**
3246
3424
  * Delete application of a workspace.
3247
3425
  */
3248
- export function applicationControllerdeleteApplication({ workspaceId, applicationId, accountId }: {
3426
+ export function workspaceApplicationControllerdeleteApplication({ workspaceId, applicationId, accountId }: {
3249
3427
  workspaceId: string;
3250
3428
  applicationId: string;
3251
3429
  accountId?: string;
@@ -3275,7 +3453,7 @@ export function applicationControllerdeleteApplication({ workspaceId, applicatio
3275
3453
  /**
3276
3454
  * Update an application of a workspace.
3277
3455
  */
3278
- export function applicationControllerupdate({ workspaceId, applicationId, updateApplicationRequest }: {
3456
+ export function workspaceApplicationControllerupdate({ workspaceId, applicationId, updateApplicationRequest }: {
3279
3457
  workspaceId: string;
3280
3458
  applicationId: string;
3281
3459
  updateApplicationRequest: UpdateApplicationRequest;
@@ -3359,7 +3537,7 @@ export function applicationLinkControllersave({ workspaceId, applicationId, crea
3359
3537
  /**
3360
3538
  * Has active deploy with type self hosted?
3361
3539
  */
3362
- export function applicationControllerhasActiveDeployWithTypeSelfHosted({ workspaceId, applicationId }: {
3540
+ export function workspaceApplicationControllerhasActiveDeployWithTypeSelfHosted({ workspaceId, applicationId }: {
3363
3541
  workspaceId: string;
3364
3542
  applicationId: string;
3365
3543
  }, opts?: Oazapfts.RequestOpts) {
@@ -3388,7 +3566,7 @@ export function applicationControllerhasActiveDeployWithTypeSelfHosted({ workspa
3388
3566
  /**
3389
3567
  * Can the application be destroyed?
3390
3568
  */
3391
- export function applicationControllercanBeDestroyed({ workspaceId, applicationId, environmentId, accountId }: {
3569
+ export function workspaceApplicationControllercanBeDestroyed({ workspaceId, applicationId, environmentId, accountId }: {
3392
3570
  workspaceId: string;
3393
3571
  applicationId: string;
3394
3572
  environmentId: string;
@@ -3419,7 +3597,7 @@ export function applicationControllercanBeDestroyed({ workspaceId, applicationId
3419
3597
  })
3420
3598
  }));
3421
3599
  }
3422
- export function applicationControllerregistryAppDestroy({ workspaceId, applicationId, environmentId, applicationDestroyRequest }: {
3600
+ export function workspaceApplicationControllerregistryAppDestroy({ workspaceId, applicationId, environmentId, applicationDestroyRequest }: {
3423
3601
  workspaceId: string;
3424
3602
  applicationId: string;
3425
3603
  environmentId: string;
@@ -3431,7 +3609,7 @@ export function applicationControllerregistryAppDestroy({ workspaceId, applicati
3431
3609
  body: applicationDestroyRequest
3432
3610
  })));
3433
3611
  }
3434
- export function applicationControllerregistryAppDeploy({ workspaceId, applicationId, environmentId, applicationDeployRequest }: {
3612
+ export function workspaceApplicationControllerregistryAppDeploy({ workspaceId, applicationId, environmentId, applicationDeployRequest }: {
3435
3613
  workspaceId: string;
3436
3614
  applicationId: string;
3437
3615
  environmentId: string;
@@ -3501,7 +3679,7 @@ export function applicationEmbeddedLinkControllersave({ workspaceId, application
3501
3679
  /**
3502
3680
  * Register the snapshot of an application's deploy.
3503
3681
  */
3504
- export function applicationControllerprocessDeploySnapshot({ workspaceId, applicationId, applicationDeploySnapshotRequest }: {
3682
+ export function workspaceApplicationControllerprocessDeploySnapshot({ workspaceId, applicationId, applicationDeploySnapshotRequest }: {
3505
3683
  workspaceId: string;
3506
3684
  applicationId: string;
3507
3685
  applicationDeploySnapshotRequest: ApplicationDeploySnapshotRequest;
@@ -3548,6 +3726,42 @@ export function usageInsightsControllerlistAllStackUsage({ accountId, body }: {
3548
3726
  })
3549
3727
  })));
3550
3728
  }
3729
+ /**
3730
+ * Get plugins applied to a workspace's application.
3731
+ */
3732
+ export function accountSharedInfrastructureControllergetSharedInfraPage({ page, size, sortBy, sortDir, getAllSharedInfraRequestBody }: {
3733
+ page?: number;
3734
+ size?: number;
3735
+ sortBy?: "NAME" | "CREATED_AT" | "STACK_VERSION" | "STACK";
3736
+ sortDir?: "ASC" | "DESC";
3737
+ getAllSharedInfraRequestBody?: GetAllSharedInfraRequestBody;
3738
+ }, opts?: Oazapfts.RequestOpts) {
3739
+ return oazapfts.ok(oazapfts.fetchJson<{
3740
+ status: 200;
3741
+ data: SharedInfraPageResponse;
3742
+ } | {
3743
+ status: 400;
3744
+ data: ErrorResponse;
3745
+ } | {
3746
+ status: 403;
3747
+ data: ErrorResponse;
3748
+ } | {
3749
+ status: 404;
3750
+ data: ErrorResponse;
3751
+ } | {
3752
+ status: 500;
3753
+ data: ErrorResponse;
3754
+ }>(`/v1/shared-infra/-/search${QS.query(QS.explode({
3755
+ page,
3756
+ size,
3757
+ sortBy,
3758
+ sortDir
3759
+ }))}`, oazapfts.json({
3760
+ ...opts,
3761
+ method: "POST",
3762
+ body: getAllSharedInfraRequestBody
3763
+ })));
3764
+ }
3551
3765
  /**
3552
3766
  * Retrieve the amount of apps and shared infras that use the given plugin version id list
3553
3767
  */
@@ -3647,6 +3861,42 @@ export function environmentControllersaveBatch({ accountId, body }: {
3647
3861
  })
3648
3862
  })));
3649
3863
  }
3864
+ /**
3865
+ * Get plugins applied to a workspace's application.
3866
+ */
3867
+ export function accountApplicationControllergetApplicationPage({ page, size, sortBy, sortDir, getAllApplicationsRequestBody }: {
3868
+ page?: number;
3869
+ size?: number;
3870
+ sortBy?: "NAME" | "CREATED_AT" | "STACK_VERSION" | "STACK";
3871
+ sortDir?: "ASC" | "DESC";
3872
+ getAllApplicationsRequestBody?: GetAllApplicationsRequestBody;
3873
+ }, opts?: Oazapfts.RequestOpts) {
3874
+ return oazapfts.ok(oazapfts.fetchJson<{
3875
+ status: 200;
3876
+ data: ApplicationPageResponse;
3877
+ } | {
3878
+ status: 400;
3879
+ data: ErrorResponse;
3880
+ } | {
3881
+ status: 403;
3882
+ data: ErrorResponse;
3883
+ } | {
3884
+ status: 404;
3885
+ data: ErrorResponse;
3886
+ } | {
3887
+ status: 500;
3888
+ data: ErrorResponse;
3889
+ }>(`/v1/applications/-/search${QS.query(QS.explode({
3890
+ page,
3891
+ size,
3892
+ sortBy,
3893
+ sortDir
3894
+ }))}`, oazapfts.json({
3895
+ ...opts,
3896
+ method: "POST",
3897
+ body: getAllApplicationsRequestBody
3898
+ })));
3899
+ }
3650
3900
  /**
3651
3901
  * List all workflows of an account.
3652
3902
  */
@@ -4288,7 +4538,7 @@ export function applicationEmbeddedLinkControllerupsertBatch({ workspaceId, appl
4288
4538
  /**
4289
4539
  * Archive application from a workspace.
4290
4540
  */
4291
- export function applicationControllerarchiveApplication({ workspaceId, applicationId }: {
4541
+ export function workspaceApplicationControllerarchiveApplication({ workspaceId, applicationId }: {
4292
4542
  workspaceId: string;
4293
4543
  applicationId: string;
4294
4544
  }, opts?: Oazapfts.RequestOpts) {
@@ -4361,41 +4611,6 @@ export function environmentControllerupdate({ id, environmentUpdateRequest }: {
4361
4611
  body: environmentUpdateRequest
4362
4612
  })));
4363
4613
  }
4364
- /**
4365
- * Get all workspaces
4366
- */
4367
- export function workspaceV2ControllergetWorkspaces({ name, aclOnly, accountId, page, size, sortBy, sortDir }: {
4368
- name?: string;
4369
- aclOnly?: boolean;
4370
- accountId?: string;
4371
- page?: number;
4372
- size?: number;
4373
- sortBy?: "NAME" | "DESCRIPTION";
4374
- sortDir?: "ASC" | "DESC";
4375
- }, opts?: Oazapfts.RequestOpts) {
4376
- return oazapfts.ok(oazapfts.fetchJson<{
4377
- status: 200;
4378
- data: WorkspacePageResponse;
4379
- } | {
4380
- status: 403;
4381
- data: ErrorResponse;
4382
- } | {
4383
- status: 500;
4384
- data: ErrorResponse;
4385
- }>(`/v2/workspaces${QS.query(QS.explode({
4386
- name,
4387
- aclOnly,
4388
- page,
4389
- size,
4390
- sortBy,
4391
- sortDir
4392
- }))}`, {
4393
- ...opts,
4394
- headers: oazapfts.mergeHeaders(opts?.headers, {
4395
- accountId
4396
- })
4397
- }));
4398
- }
4399
4614
  /**
4400
4615
  * Find all workspace variables
4401
4616
  */
@@ -4440,7 +4655,7 @@ export function workspaceVariableV2ControllerfindAll({ workspaceId, accountId, p
4440
4655
  /**
4441
4656
  * Get plugins applied to a workspace's shared infrastructure.
4442
4657
  */
4443
- export function sharedInfrastructureV2ControllergetAppliedPlugins({ workspaceId, sharedInfraId, environmentId }: {
4658
+ export function workspaceSharedInfrastructureV2ControllergetAppliedPlugins({ workspaceId, sharedInfraId, environmentId }: {
4444
4659
  workspaceId: string;
4445
4660
  sharedInfraId: string;
4446
4661
  environmentId: string;
@@ -4530,7 +4745,7 @@ export function availableConnectionInterfaceV2ControllergetAvailableConnectionIn
4530
4745
  /**
4531
4746
  * Get plugins applied to a workspace's application.
4532
4747
  */
4533
- export function applicationV2ControllergetAppliedPlugins({ workspaceId, applicationId, environmentId }: {
4748
+ export function workspaceApplicationV2ControllergetAppliedPlugins({ workspaceId, applicationId, environmentId }: {
4534
4749
  workspaceId: string;
4535
4750
  applicationId: string;
4536
4751
  environmentId: string;
@@ -4790,7 +5005,7 @@ export function workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType(
4790
5005
  /**
4791
5006
  * Get plugins applied to a workspace's shared infrastructure.
4792
5007
  */
4793
- export function sharedInfrastructureControllergetAppliedPlugins({ workspaceId, sharedInfraId, environmentId, $type }: {
5008
+ export function workspaceSharedInfrastructureControllergetAppliedPlugins({ workspaceId, sharedInfraId, environmentId, $type }: {
4794
5009
  workspaceId: string;
4795
5010
  sharedInfraId: string;
4796
5011
  environmentId: string;
@@ -4820,7 +5035,7 @@ export function sharedInfrastructureControllergetAppliedPlugins({ workspaceId, s
4820
5035
  /**
4821
5036
  * List shared infrastructure's activities.
4822
5037
  */
4823
- export function sharedInfrastructureControllerlistActivities({ workspaceId, sharedInfraId, environmentId, $type, page, size }: {
5038
+ export function workspaceSharedInfrastructureControllerlistActivities({ workspaceId, sharedInfraId, environmentId, $type, page, size }: {
4824
5039
  workspaceId: string;
4825
5040
  sharedInfraId: string;
4826
5041
  environmentId: string;
@@ -4854,7 +5069,7 @@ export function sharedInfrastructureControllerlistActivities({ workspaceId, shar
4854
5069
  /**
4855
5070
  * Get all in use connection interface dependencies from the shared infra.
4856
5071
  */
4857
- export function sharedInfrastructureControllergetDependencyTree({ workspaceId, sharedInfraId }: {
5072
+ export function workspaceSharedInfrastructureControllergetDependencyTree({ workspaceId, sharedInfraId }: {
4858
5073
  workspaceId: string;
4859
5074
  sharedInfraId: string;
4860
5075
  }, opts?: Oazapfts.RequestOpts) {
@@ -4880,7 +5095,7 @@ export function sharedInfrastructureControllergetDependencyTree({ workspaceId, s
4880
5095
  /**
4881
5096
  * Get stack version in use by shared infra in a workspace
4882
5097
  */
4883
- export function sharedInfrastructureControllergetStackVersionsInUse({ workspaceId }: {
5098
+ export function workspaceSharedInfrastructureControllergetStackVersionsInUse({ workspaceId }: {
4884
5099
  workspaceId: string;
4885
5100
  }, opts?: Oazapfts.RequestOpts) {
4886
5101
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -5047,7 +5262,7 @@ export function availableConnectionInterfaceControllergetAvailableConnectionInte
5047
5262
  /**
5048
5263
  * Get plugins applied to a workspace's application.
5049
5264
  */
5050
- export function applicationControllergetAppliedPlugins({ workspaceId, applicationId, environmentId, $type }: {
5265
+ export function workspaceApplicationControllergetAppliedPlugins({ workspaceId, applicationId, environmentId, $type }: {
5051
5266
  workspaceId: string;
5052
5267
  applicationId: string;
5053
5268
  environmentId: string;
@@ -5074,7 +5289,7 @@ export function applicationControllergetAppliedPlugins({ workspaceId, applicatio
5074
5289
  ...opts
5075
5290
  }));
5076
5291
  }
5077
- export function applicationControllergetAppDeployInfo({ workspaceId, applicationId, environmentId, accountId, tenant }: {
5292
+ export function workspaceApplicationControllergetAppDeployInfo({ workspaceId, applicationId, environmentId, accountId, tenant }: {
5078
5293
  workspaceId: string;
5079
5294
  applicationId: string;
5080
5295
  environmentId: string;
@@ -5095,7 +5310,7 @@ export function applicationControllergetAppDeployInfo({ workspaceId, application
5095
5310
  /**
5096
5311
  * List application's activities.
5097
5312
  */
5098
- export function applicationControllerlistActivities({ workspaceId, applicationId, environmentId, $type, page, size }: {
5313
+ export function workspaceApplicationControllerlistActivities({ workspaceId, applicationId, environmentId, $type, page, size }: {
5099
5314
  workspaceId: string;
5100
5315
  applicationId: string;
5101
5316
  environmentId: string;
@@ -5129,7 +5344,7 @@ export function applicationControllerlistActivities({ workspaceId, applicationId
5129
5344
  /**
5130
5345
  * Get all in use connection interface dependencies from the application.
5131
5346
  */
5132
- export function applicationControllergetDependencyTree({ workspaceId, applicationId }: {
5347
+ export function workspaceApplicationControllergetDependencyTree({ workspaceId, applicationId }: {
5133
5348
  workspaceId: string;
5134
5349
  applicationId: string;
5135
5350
  }, opts?: Oazapfts.RequestOpts) {
@@ -5155,7 +5370,7 @@ export function applicationControllergetDependencyTree({ workspaceId, applicatio
5155
5370
  /**
5156
5371
  * Can the application be destroyed?
5157
5372
  */
5158
- export function applicationControllercanBeDeleted({ workspaceId, applicationId, accountId, tenant }: {
5373
+ export function workspaceApplicationControllercanBeDeleted({ workspaceId, applicationId, accountId, tenant }: {
5159
5374
  workspaceId: string;
5160
5375
  applicationId: string;
5161
5376
  accountId: string;
@@ -5190,7 +5405,7 @@ export function applicationControllercanBeDeleted({ workspaceId, applicationId,
5190
5405
  /**
5191
5406
  * Get stack version in use by applications in a workspace
5192
5407
  */
5193
- export function applicationControllergetStackVersionsInUse({ workspaceId }: {
5408
+ export function workspaceApplicationControllergetStackVersionsInUse({ workspaceId }: {
5194
5409
  workspaceId: string;
5195
5410
  }, opts?: Oazapfts.RequestOpts) {
5196
5411
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -5232,7 +5447,7 @@ export function workspaceControllergetWorkspacesFromUserPermission({ resource, a
5232
5447
  /**
5233
5448
  * Get shared infrastructure information by id.
5234
5449
  */
5235
- export function getSharedInfraControllergetSharedInfra({ id }: {
5450
+ export function accountSharedInfrastructureControllergetSharedInfra({ id }: {
5236
5451
  id: string;
5237
5452
  }, opts?: Oazapfts.RequestOpts) {
5238
5453
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -5273,20 +5488,28 @@ export function pluginInUseControllercheckPluginInUse({ pluginVersionId }: {
5273
5488
  /**
5274
5489
  * Check availability of connection slug in account.
5275
5490
  */
5276
- export function checkConnectionSlugAvailabilityControllercheckConnectionSlugAvailability({ slug }: {
5491
+ export function checkConnectionSlugAvailabilityControllercheckConnectionSlugAvailability({ slug, applicationId, sharedInfraId }: {
5277
5492
  slug: string;
5493
+ applicationId?: string;
5494
+ sharedInfraId?: string;
5278
5495
  }, opts?: Oazapfts.RequestOpts) {
5279
5496
  return oazapfts.ok(oazapfts.fetchJson<{
5280
5497
  status: 200;
5281
5498
  data: CheckConnectionSlugAvailabilityResponse;
5282
- }>(`/v1/connection-interfaces/${encodeURIComponent(slug)}/availability`, {
5499
+ } | {
5500
+ status: 404;
5501
+ data: CheckConnectionSlugAvailabilityResponse;
5502
+ }>(`/v1/connection-interfaces/${encodeURIComponent(slug)}/availability${QS.query(QS.explode({
5503
+ applicationId,
5504
+ sharedInfraId
5505
+ }))}`, {
5283
5506
  ...opts
5284
5507
  }));
5285
5508
  }
5286
5509
  /**
5287
5510
  * Get an application list by repo url.
5288
5511
  */
5289
- export function getApplicationControllergetApplicationsByUrl({ accountId, repoUrl }: {
5512
+ export function accountApplicationControllergetApplicationsByUrl({ accountId, repoUrl }: {
5290
5513
  accountId: string;
5291
5514
  repoUrl: string;
5292
5515
  }, opts?: Oazapfts.RequestOpts) {
@@ -5314,7 +5537,7 @@ export function getApplicationControllergetApplicationsByUrl({ accountId, repoUr
5314
5537
  /**
5315
5538
  * Get application information by id.
5316
5539
  */
5317
- export function getApplicationControllergetApplication({ id }: {
5540
+ export function accountApplicationControllergetApplication({ id }: {
5318
5541
  id: string;
5319
5542
  }, opts?: Oazapfts.RequestOpts) {
5320
5543
  return oazapfts.ok(oazapfts.fetchJson<{
@@ -5538,6 +5761,31 @@ export function accountStackControllerlistStacksWithWorkflow(opts?: Oazapfts.Req
5538
5761
  ...opts
5539
5762
  }));
5540
5763
  }
5764
+ /**
5765
+ * List all stacks that are most commonly used by applications and shared infrastructure.
5766
+ */
5767
+ export function accountStackControllerlistMostUsedStacks({ accountId }: {
5768
+ accountId: string;
5769
+ }, opts?: Oazapfts.RequestOpts) {
5770
+ return oazapfts.ok(oazapfts.fetchJson<{
5771
+ status: 200;
5772
+ data: string[];
5773
+ } | {
5774
+ status: 400;
5775
+ data: ErrorResponse;
5776
+ } | {
5777
+ status: 403;
5778
+ data: ErrorResponse;
5779
+ } | {
5780
+ status: 500;
5781
+ data: ErrorResponse;
5782
+ }>("/v1/account/stacks/most-used", {
5783
+ ...opts,
5784
+ headers: oazapfts.mergeHeaders(opts?.headers, {
5785
+ accountId
5786
+ })
5787
+ }));
5788
+ }
5541
5789
  /**
5542
5790
  * List all default workflows of an account.
5543
5791
  */