@stack-spot/portal-network 0.121.1 → 0.122.1

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.
@@ -30,6 +30,7 @@ import {
30
30
  getAvailableActionVersionsByActionSlug,
31
31
  getAvailableWorkflowVersionsByWorkflowSlug,
32
32
  getDependentPluginsVersions,
33
+ getDependentWorkflowVersions,
33
34
  getGetPluginView,
34
35
  getInfrastructureEnvironmentsUsesPlugin,
35
36
  getListOfInputs,
@@ -41,6 +42,7 @@ import {
41
42
  getPluginVersionUsageSummary,
42
43
  getStackBySlugV2,
43
44
  getStackUsesPlugin,
45
+ getStackUsesWorkflow,
44
46
  getStackVersionById,
45
47
  getStackVersionListByIds,
46
48
  getStackWorkspaceDetailView,
@@ -56,7 +58,12 @@ import {
56
58
  getWorkflow,
57
59
  getWorkflowByStudioSlug,
58
60
  getWorkflowDoc,
61
+ getWorkflowPluginUsage,
62
+ getWorkflowStackUsage,
63
+ getWorkflowsUsingPlugin,
64
+ getWorkflowUsageOfWorkflow,
59
65
  getWorkflowUsageSummary,
66
+ getWorkflowVersionsNotInUse,
60
67
  getWorkflowVersionUsageSummary,
61
68
  listAccountWorkflow,
62
69
  listActions,
@@ -208,6 +215,33 @@ class ContentClient extends ReactQueryNetworkClient {
208
215
  return lastPage.content && lastPage.content.length < size ? undefined : { page: parsedLastPageParam + 1 }
209
216
  },
210
217
  })
218
+
219
+ /**
220
+ * Gets list of Stacks using the workflow.
221
+ */
222
+ stacksUsesWorkflow = this.query(getStackUsesWorkflow)
223
+
224
+ /**
225
+ * Get list of workflow by stack.
226
+ */
227
+ workflowsFromStackUsage = this.query(getWorkflowStackUsage)
228
+
229
+ /**
230
+ * Gets list of workflow versions not used by any Content.
231
+ *
232
+ */
233
+ workflowVersionsNotInUse = this.query(getWorkflowVersionsNotInUse)
234
+
235
+ /**
236
+ * Gets list of workflow that are used by a specific workflow.
237
+ */
238
+ workflowsUsageOfWorkflow = this.query(getWorkflowUsageOfWorkflow)
239
+
240
+ /**
241
+ * Gets list of workflow versions that are used by a specific workflow.
242
+ */
243
+ workflowVersionsUsedByWorkflow = this.query(getDependentWorkflowVersions)
244
+
211
245
  /**
212
246
  * Gets all account workflows
213
247
  */
@@ -260,6 +294,12 @@ class ContentClient extends ReactQueryNetworkClient {
260
294
  * Get usage summary of plugin
261
295
  */
262
296
  pluginUsageSummary = this.query(getPluginModalView)
297
+
298
+ /**
299
+ * Gets list of Workflow versions using the plugin
300
+ */
301
+ workflowVersionsPluginUsage = this.query(getWorkflowPluginUsage)
302
+
263
303
  /**
264
304
  * Gets list of Stacks using the plugin
265
305
  */
@@ -296,6 +336,10 @@ class ContentClient extends ReactQueryNetworkClient {
296
336
  * Gets list of Application using the plugin
297
337
  */
298
338
  applicationUsingPlugin = this.query(getApplicationsUsesPlugin)
339
+ /**
340
+ * Gets list of workflow using the plugin
341
+ */
342
+ workflowsUsingPlugin = this.query(getWorkflowsUsingPlugin)
299
343
  /**
300
344
  * Gets list of PluginVersions used by Applications
301
345
  */
@@ -30,6 +30,8 @@ import {
30
30
  contextControllerupsertAccountActionsInputContext,
31
31
  contextControllerupsertPluginAccountContext,
32
32
  contextControllerupsertPluginWorkspaceContext,
33
+ contextControllerupsertWorkflowAccountContext,
34
+ contextControllerupsertWorkflowWorkspaceContext,
33
35
  contextControllerupsertWorkspaceActionsInputContext,
34
36
  contextWorkflowControllergetAccountWorkflowInputs,
35
37
  contextWorkflowControllergetConsolidatedWorkflowInputs,
@@ -499,6 +501,29 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
499
501
  * Destroys an application's infrastructure
500
502
  */
501
503
  destroyAppInfra = this.mutation(updateInfrastructureControllerremoveInfraPluginsAndCreatePullRequestByApplication)
504
+
505
+ /**
506
+ * Update context inputs from an workflow in workspace
507
+ */
508
+ updateInputContextWorkflowWorkspace = this.mutation({
509
+ name: 'updateInputContextWorkflowWorkspace',
510
+ request: async (signal, variables: Parameters<typeof contextControllerupsertWorkflowWorkspaceContext>[0]) =>
511
+ contextControllerupsertWorkflowWorkspaceContext(variables, { signal }),
512
+ permission: async ({ stackVersionId, workspaceId, workflowVersionId }: Parameters<typeof contextControllerupsertWorkflowWorkspaceContext>[0]) =>
513
+ workspaceClient.saveContextInWorkspace.isAllowed({ $type: 'workflow', workspaceId, stackVersionId, externalId: workflowVersionId }),
514
+ })
515
+ /**
516
+ * Update context inputs from an workflow in account
517
+ */
518
+ updateInputContextWorkflowAccount = this.mutation({
519
+ name: 'updateInputContextWorkflowAccount',
520
+ request: async (signal, variables: Parameters<typeof contextControllerupsertWorkflowAccountContext>[0]) =>
521
+ contextControllerupsertWorkflowAccountContext(variables, { signal }),
522
+ permission: async ({ stackVersionId, workflowVersionId }: Parameters<typeof contextControllerupsertWorkflowAccountContext>[0]) =>
523
+ workspaceClient.saveContextInAccount.isAllowed({ $type: 'workflow', stackVersionId, externalId: workflowVersionId }),
524
+ })
525
+
526
+
502
527
  }
503
528
 
504
529
  export const workspaceManagerClient = new WorkspaceManagerClient()