@stack-spot/portal-network 0.61.0 → 0.62.0

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.
@@ -4,8 +4,8 @@
4
4
  * DO NOT MODIFY - This file has been generated using oazapfts.
5
5
  * See https://www.npmjs.com/package/oazapfts
6
6
  */
7
- import * as Oazapfts from "@oazapfts/runtime"
8
- import * as QS from "@oazapfts/runtime/query"
7
+ import * as Oazapfts from "@oazapfts/runtime";
8
+ import * as QS from "@oazapfts/runtime/query";
9
9
  export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
10
  headers: {},
11
11
  baseUrl: "https://workspace-workspace-manager.dev.stackspot.com",
@@ -962,6 +962,25 @@ export type AccountSharedInfraPageResponse = {
962
962
  totalPages: number;
963
963
  items: AccountSharedInfraSimplesResponse[];
964
964
  };
965
+ export type WorkflowVersionInfoResponse = {
966
+ id: string;
967
+ displayName: string;
968
+ label: string;
969
+ description: string;
970
+ semanticVersion: string;
971
+ targetApp: boolean;
972
+ targetInfra: boolean;
973
+ createdAt: string;
974
+ };
975
+ export type WorkflowForCreationResponse = {
976
+ id: string;
977
+ slug: string;
978
+ "type": string;
979
+ inputs: InputValuesContextResponse[];
980
+ computedInputs: ComputedInputResponse[];
981
+ globalComputedInputs: ComputedInputResponse[];
982
+ versionInfo?: WorkflowVersionInfoResponse;
983
+ };
965
984
  export type StackActionInputValuesByEnvInWorkspaceContextResponseValueByEnvWorkspaceResponse = {
966
985
  envName: string;
967
986
  value: object;
@@ -1804,7 +1823,7 @@ export function accountSharedInfraControllergetAccountSharedInfraPage({ page, si
1804
1823
  ...opts
1805
1824
  }));
1806
1825
  }
1807
- export function accountSharedInfraControllergetAccountApplicationsFilters(opts?: Oazapfts.RequestOpts) {
1826
+ export function accountSharedInfraControllergetAccountSharedInfraFilters(opts?: Oazapfts.RequestOpts) {
1808
1827
  return oazapfts.ok(oazapfts.fetchJson<{
1809
1828
  status: 200;
1810
1829
  data: StackFilterResponse;
@@ -1812,6 +1831,33 @@ export function accountSharedInfraControllergetAccountApplicationsFilters(opts?:
1812
1831
  ...opts
1813
1832
  }));
1814
1833
  }
1834
+ export function contextWorkflowControllergetConsolidatedWorkflowInputs({ workspaceId, stackVersionId, workflowVersionId }: {
1835
+ workspaceId: string;
1836
+ stackVersionId: string;
1837
+ workflowVersionId: string;
1838
+ }, opts?: Oazapfts.RequestOpts) {
1839
+ return oazapfts.ok(oazapfts.fetchJson<{
1840
+ status: 200;
1841
+ data: WorkflowForCreationResponse;
1842
+ }>(`/v1/contexts/workspaces/${encodeURIComponent(workspaceId)}/stacks/${encodeURIComponent(stackVersionId)}/workflows/${encodeURIComponent(workflowVersionId)}`, {
1843
+ ...opts
1844
+ }));
1845
+ }
1846
+ export function contextWorkflowControllergetWorkspaceWorkflowInputs({ workspaceId, stackVersionId, workflowVersionId, envName }: {
1847
+ workspaceId: string;
1848
+ stackVersionId: string;
1849
+ workflowVersionId: string;
1850
+ envName?: string;
1851
+ }, opts?: Oazapfts.RequestOpts) {
1852
+ return oazapfts.ok(oazapfts.fetchJson<{
1853
+ status: 200;
1854
+ data: FullInputContextResponse;
1855
+ }>(`/v1/contexts/workspaces/${encodeURIComponent(workspaceId)}/stacks/${encodeURIComponent(stackVersionId)}/workflows/${encodeURIComponent(workflowVersionId)}/inputs${QS.query(QS.explode({
1856
+ envName
1857
+ }))}`, {
1858
+ ...opts
1859
+ }));
1860
+ }
1815
1861
  export function contextControllergetStackActionInputsInWorkspaceContext({ workspaceId, stackVersionId, actionsVersionId, envName }: {
1816
1862
  workspaceId: string;
1817
1863
  stackVersionId: string;
@@ -1827,6 +1873,20 @@ export function contextControllergetStackActionInputsInWorkspaceContext({ worksp
1827
1873
  ...opts
1828
1874
  }));
1829
1875
  }
1876
+ export function contextWorkflowControllergetAccountWorkflowInputs({ stackVersionId, workflowVersionId, envName }: {
1877
+ stackVersionId: string;
1878
+ workflowVersionId: string;
1879
+ envName?: string;
1880
+ }, opts?: Oazapfts.RequestOpts) {
1881
+ return oazapfts.ok(oazapfts.fetchJson<{
1882
+ status: 200;
1883
+ data: FullInputContextResponse;
1884
+ }>(`/v1/contexts/account/stacks/${encodeURIComponent(stackVersionId)}/workflows/${encodeURIComponent(workflowVersionId)}/inputs${QS.query(QS.explode({
1885
+ envName
1886
+ }))}`, {
1887
+ ...opts
1888
+ }));
1889
+ }
1830
1890
  export function contextControllergetStackActionInputsInAccountContext({ stackVersionId, actionsVersionId, envName }: {
1831
1891
  stackVersionId: string;
1832
1892
  actionsVersionId: string;
@@ -8,6 +8,7 @@ import
8
8
  createDnsZone,
9
9
  createFolder,
10
10
  createFoundation,
11
+ createProject,
11
12
  defaults,
12
13
  getApplication,
13
14
  getApplicationHistory,
@@ -18,6 +19,7 @@ import
18
19
  getDeploymentStatus,
19
20
  getFolder,
20
21
  getFoundation,
22
+ getProject,
21
23
  getRepositoryImages,
22
24
  listApplications,
23
25
  listCertificates,
@@ -148,6 +150,14 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
148
150
  * Create a certificate
149
151
  */
150
152
  createCertificate = this.mutation(removeAuthorizationParam(createCertificate))
153
+ /**
154
+ * Create a project
155
+ */
156
+ createProject = this.mutation(removeAuthorizationParam(createProject))
157
+ /**
158
+ * Get a project by id
159
+ */
160
+ getProjectById = this.query(removeAuthorizationParam(getProject))
151
161
  }
152
162
 
153
163
  export const cloudPlatformClient = new CloudPlatformClient()
@@ -3,7 +3,7 @@ import { AccountScmInfoSaveRequest, AccountScmInfoUpdateRequest, AccountScmStatu
3
3
  import { ChatRequest2, ChatResponse3, ConversationHistoryResponse, ConversationResponse } from '../api/ai'
4
4
  import { ConnectAccountRequestV2, ManagedAccountProvisionRequest } from '../api/cloudAccount'
5
5
  import { AllocationCostRequest, AllocationCostResponse, ChargePeriod, getAllocationCostFilters, ManagedService, ServiceResource } from '../api/cloudServices'
6
- import { ActivityResponse, FullInputContextResponse, InputConditionResponse, InputValuesContextResponse, PaginatedActivityResponse, PluginForAppCreationV2Response, PluginInputValuesInConsolidatedContextResponse, ValueByEnvResponse } from '../api/workspaceManager'
6
+ import { ActivityResponse, FullInputContextResponse, InputConditionResponse, InputValuesContextResponse, PaginatedActivityResponse, PluginForAppCreationV2Response, PluginInputValuesInConsolidatedContextResponse, ValueByEnvResponse, WorkflowForCreationResponse } from '../api/workspaceManager'
7
7
 
8
8
  interface BaseSMCStatus {
9
9
  /**
@@ -146,6 +146,9 @@ export interface FixedInputValuesContextResponse extends Omit<InputValuesContext
146
146
  export interface FixedFullInputContextResponse extends Omit<FullInputContextResponse, 'inputs'> {
147
147
  inputs: FixedInputValuesContextResponse[],
148
148
  }
149
+ export interface FixedWorkflowForCreationResponse extends Omit<WorkflowForCreationResponse, 'inputs'> {
150
+ inputs: FixedInputValuesContextResponse[],
151
+ }
149
152
 
150
153
  export interface FixedPluginInputValuesInConsolidatedContextResponse extends
151
154
  Omit<PluginInputValuesInConsolidatedContextResponse, 'inputs' | 'input' | 'type' | 'default' | 'condition'> {
@@ -35,7 +35,8 @@ import {
35
35
  workspaceStackControllerlistStacks,
36
36
  workspaceStackControllerrefreshStacksInWorkspace,
37
37
  accountApplicationControllergetAccountApplicationsFilters,
38
- accountSharedInfraControllergetAccountApplicationsFilters,
38
+ accountSharedInfraControllergetAccountSharedInfraFilters,
39
+ contextWorkflowControllergetConsolidatedWorkflowInputs,
39
40
  } from '../api/workspaceManager'
40
41
  import apis from '../apis.json'
41
42
  import { DefaultAPIError } from '../error/DefaultAPIError'
@@ -43,7 +44,7 @@ import { workspaceDictionary } from '../error/dictionary/workspace'
43
44
  import { StackspotAPIError } from '../error/StackspotAPIError'
44
45
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
45
46
  import { contentClient } from './content'
46
- import { FixedFullInputContextResponse, FixedPaginatedActivityResponse, FixedPluginForAppCreationV2Response, ReplaceResult } from './types'
47
+ import { FixedFullInputContextResponse, FixedPaginatedActivityResponse, FixedPluginForAppCreationV2Response, FixedWorkflowForCreationResponse, ReplaceResult } from './types'
47
48
  import { workspaceClient } from './workspace'
48
49
 
49
50
  class WorkspaceManagerClient extends ReactQueryNetworkClient {
@@ -113,6 +114,11 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
113
114
  return canViewContext && canGetConnectionInterfaceTypes && canGetPluginVersions
114
115
  },
115
116
  })
117
+ /**
118
+ * Gets workflow in a workspace stack
119
+ */
120
+ workflowDataWithInputsInWorkspace = this.query(contextWorkflowControllergetConsolidatedWorkflowInputs as
121
+ unknown as ReplaceResult<typeof contextWorkflowControllergetConsolidatedWorkflowInputs, FixedWorkflowForCreationResponse>)
116
122
  /**
117
123
  * Gets inputs from a plugin in account context
118
124
  */
@@ -314,7 +320,7 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
314
320
  getAccountApplicationsFilters = this.query(accountApplicationControllergetAccountApplicationsFilters)
315
321
 
316
322
  /** * Gets filters for shared infrastructures associated with an account. */
317
- getAccountSharedInfraFilters = this.query(accountSharedInfraControllergetAccountApplicationsFilters)
323
+ getAccountSharedInfraFilters = this.query(accountSharedInfraControllergetAccountSharedInfraFilters)
318
324
  }
319
325
 
320
326
  export const workspaceManagerClient = new WorkspaceManagerClient()