@stack-spot/portal-network 0.24.0 → 0.26.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.
@@ -279,10 +279,12 @@ export type WorkspaceRequest = {
279
279
  export type CreateWorkflowExecutionRequest = {
280
280
  workspace: WorkspaceRequest;
281
281
  };
282
+ export type WorkflowExecutionStatus = "pending" | "in_progress" | "completed" | "suspended";
283
+ export type WorkflowExecutionConclusion = "error" | "success" | "skipped" | "canceled";
282
284
  export type WorkflowExecutionResponse = {
283
285
  id: string;
284
- status: ExecutionStatus;
285
- conclusion: ConclusionStatus | null;
286
+ status: WorkflowExecutionStatus;
287
+ conclusion: WorkflowExecutionConclusion | null;
286
288
  };
287
289
  export type WorkflowType = "starter" | "deploy" | "rollback" | "destroy";
288
290
  export type StepWorkflowRequest = {
@@ -307,19 +309,29 @@ export type StepPluginRequest = {
307
309
  [key: string]: any | null;
308
310
  };
309
311
  };
312
+ export type StepSuspendRequest = {
313
+ "type": "suspend";
314
+ };
310
315
  export type StepRequest = {
311
316
  id: string;
312
317
  label: string;
313
- when: string;
314
- "type": StepWorkflowRequest | StepActionRequest | StepPluginRequest;
318
+ "type": StepWorkflowRequest | StepActionRequest | StepPluginRequest | StepSuspendRequest;
315
319
  };
316
320
  export type JobRequest = {
317
321
  id: string;
318
322
  label: string;
319
- when: string;
320
323
  dependsOn?: string[];
321
324
  steps: StepRequest[];
322
325
  };
326
+ export type TargetType = "app" | "infra";
327
+ export type TargetRequest = {
328
+ id: string;
329
+ "type": TargetType;
330
+ };
331
+ export type EnvRequest = {
332
+ id: string;
333
+ slug: string;
334
+ };
323
335
  export type CreateWorkflowExecutionWorkflowRequest = {
324
336
  name: string;
325
337
  label: string;
@@ -328,9 +340,9 @@ export type CreateWorkflowExecutionWorkflowRequest = {
328
340
  [key: string]: any | null;
329
341
  };
330
342
  jobs: JobRequest[];
343
+ targets: TargetRequest[];
344
+ env?: EnvRequest | null;
331
345
  };
332
- export type WorkflowExecutionStatus = "pending" | "in_progress" | "completed" | "suspended";
333
- export type WorkflowExecutionConclusion = "error" | "success" | "skipped" | "canceled";
334
346
  export type PutWorkflowExecutionWorkflowStepRequest = {
335
347
  reference: string;
336
348
  status: WorkflowExecutionStatus;
@@ -346,6 +358,7 @@ export type JobResponse2 = {
346
358
  conclusion: WorkflowExecutionConclusion | null;
347
359
  startedAt?: string | null;
348
360
  completedAt?: string | null;
361
+ suspendMessage?: string | null;
349
362
  };
350
363
  export type WorkflowResponse2 = {
351
364
  name: string;
@@ -386,13 +399,13 @@ export type StepPluginRequest2 = {
386
399
  [key: string]: any | null;
387
400
  };
388
401
  };
389
- export type StepSuspendRequest = {};
402
+ export type StepSuspendRequest2 = {};
390
403
  export type StepResponse2 = {
391
404
  label: string;
392
405
  status: WorkflowExecutionStatus;
393
406
  conclusion: WorkflowExecutionConclusion | null;
394
407
  log?: string | null;
395
- "type": StepWorkflowRequest2 | StepActionRequest2 | StepPluginRequest2 | StepSuspendRequest;
408
+ "type": StepWorkflowRequest2 | StepActionRequest2 | StepPluginRequest2 | StepSuspendRequest2;
396
409
  startedAt?: string | null;
397
410
  completedAt?: string | null;
398
411
  };
@@ -1,5 +1,5 @@
1
1
  import { HttpError } from '@oazapfts/runtime'
2
- import { addLink, addWorkspace, changeVisibility, createStudio, defaults, deleteLink, deleteStudio, delWorkspace, getStackVersionListByIds, getStudioByIdOrSlug, getStudios1, getStudiosToCreateButton, getStudioTabs, listLinksByStackVersion, listReasons, listWorkspaces, updateStudio, updateStudioTabs } from '../api/content'
2
+ import { addLink, addWorkspace, changeVisibility, createStudio, defaults, deleteLink, deleteStudio, delWorkspace, getStackVersionListByIds, getStudioByIdOrSlug, getStudios1, getStudiosToCreateButton, getStudioTabs, listLinksByStackVersion, listReasons, listWorkspaces, stackModalViewSummary, updateStudio, updateStudioTabs, deleteV1StacksVersionsByStackVersionId, getStackWorkspaces, getStackWorkspaceDetailView, getUnusedStackVersions, getPluginModalView, getStackUsesPlugin, getGetPluginView, getPluginInfrastructureView, getApplicationsUsesPlugin, getStarterUsesPlugin, getPluginVersionsNotInUse, getPluginVersions, getDependentPluginsVersions, getStarterStackVersionsAndPluginsVersions, getInfrastructureEnvironmentsUsesPlugin, getApplicationDetailsView, stackVersionUsageSummary, deprecateStackVersionBy, getPluginVersionUsageSummary, deprecatePluginVersion, deletePluginVersion } from '../api/content'
3
3
  import apis from '../apis.json'
4
4
  import { DefaultAPIError } from '../error/DefaultAPIError'
5
5
  import { cntDictionary } from '../error/dictionary/cnt'
@@ -83,6 +83,95 @@ class ContentClient extends ReactQueryNetworkClient {
83
83
  * Gets content deprecation reasons
84
84
  */
85
85
  deprecationReasons = this.query(listReasons)
86
+
87
+ /**
88
+ * Get usage summary of stack
89
+ */
90
+ stackUsageSummary = this.query(stackModalViewSummary)
91
+ /**
92
+ * List of Workspaces using the Stack
93
+ */
94
+ workspacesUsingStack = this.query(getStackWorkspaces)
95
+ /**
96
+ * List StackVersions used by Workspace
97
+ */
98
+ stackVersionsUsedByWorkspace = this.query(getStackWorkspaceDetailView)
99
+ /**
100
+ * List of StackVersions not used by any Content
101
+ */
102
+ stackVersionsNotInUse = this.query(getUnusedStackVersions)
103
+ /**
104
+ * Get usage summary of plugin
105
+ */
106
+ pluginUsageSummary = this.query(getPluginModalView)
107
+ /**
108
+ * List of Stacks using the plugin
109
+ */
110
+ stacksUsingPlugin = this.query(getStackUsesPlugin)
111
+ /**
112
+ * List of PluginVersions used by Stack
113
+ */
114
+ pluginVersionsUsedByStack = this.query(getPluginVersions)
115
+ /**
116
+ * List of Plugin that requires the plugin
117
+ */
118
+ pluginsRequiresPlugin = this.query(getGetPluginView)
119
+ /**
120
+ * List of PluginVersions used by Plugin
121
+ */
122
+ pluginVersionsUsedByPlugin = this.query(getDependentPluginsVersions)
123
+ /**
124
+ * List of Starter using the plugin
125
+ */
126
+ starterUsingPlugin = this.query(getStarterUsesPlugin)
127
+ /**
128
+ * List of PluginVersions used by Starter
129
+ */
130
+ pluginVersionsUsedByStarter = this.query(getStarterStackVersionsAndPluginsVersions)
131
+ /**
132
+ * List of Infrastructure using the plugin
133
+ */
134
+ infrastructureUsingPlugin = this.query(getPluginInfrastructureView)
135
+ /**
136
+ * List of PluginVersions used by Infrastructure
137
+ */
138
+ pluginVersionsUsedByInfrastructure = this.query(getInfrastructureEnvironmentsUsesPlugin)
139
+ /**
140
+ * List of Application using the plugin
141
+ */
142
+ applicationUsingPlugin = this.query(getApplicationsUsesPlugin)
143
+ /**
144
+ * List of PluginVersions used by Applications
145
+ */
146
+ pluginVersionsUsedByApplication = this.query(getApplicationDetailsView)
147
+ /**
148
+ * List of PluginVersions not used by any Content
149
+ */
150
+ pluginVersionsNotInUse = this.query(getPluginVersionsNotInUse)
151
+ /**
152
+ * Get Stack Version Usage Summary
153
+ */
154
+ stackVersionsUsageSummary = this.query(stackVersionUsageSummary)
155
+ /**
156
+ * Get Plugin Version Usage Summary
157
+ */
158
+ pluginVersionUsageSummary = this.query(getPluginVersionUsageSummary)
159
+ /**
160
+ * Deprecate a stack version
161
+ */
162
+ deprecateStackVersion = this.mutation(removeAuthorizationParam(deprecateStackVersionBy))
163
+ /**
164
+ * Delete a stack version of type draft or unpublish
165
+ */
166
+ deleteStackVersion = this.mutation(deleteV1StacksVersionsByStackVersionId)
167
+ /**
168
+ * Deprecate a plugin version
169
+ */
170
+ deprecatePluginVersion = this.mutation(removeAuthorizationParam(deprecatePluginVersion))
171
+ /**
172
+ * Delete a Plugin version of type draft or unpublish
173
+ */
174
+ deletePluginVersion = this.mutation(deletePluginVersion)
86
175
  }
87
176
 
88
177
  export const contentClient = new ContentClient()