@stack-spot/portal-network 0.56.2 → 0.58.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.
@@ -18,6 +18,7 @@ import {
18
18
  deleteMember,
19
19
  deletePartner, deleteResourceFromGroup, deleteRole, deleteSso, deleteV1GroupsByGroupId, disablePersonalAccessTokenGeneration,
20
20
  disassociateGroupToServiceCredential, enableFidoCredentials,
21
+ getAccess,
21
22
  getAccountMembers1,
22
23
  getAccountSso,
23
24
  getAllAccountSso,
@@ -504,6 +505,26 @@ class AccountClient extends ReactQueryNetworkClient {
504
505
  * Updates the attributes in a SSO.
505
506
  */
506
507
  updateSSOAttributes = this.mutation(ssoAddAttributes)
508
+ /**
509
+ * Validate permission access
510
+ */
511
+ validatePermissionAccess = this.query({
512
+ name: 'account.getAccess',
513
+ request: async (signal,
514
+ { resourceType, resource, action, attribute }: {
515
+ resourceType: string,
516
+ resource: string,
517
+ action: string,
518
+ attribute?: string,
519
+ }) => {
520
+ try {
521
+ await getAccess({ action, resource, resourceType, attribute }, { signal })
522
+ return true
523
+ } catch {
524
+ return false
525
+ }
526
+ },
527
+ })
507
528
  }
508
529
 
509
530
  export const accountClient = new AccountClient()
@@ -1,6 +1,6 @@
1
1
  import { HttpError } from '@oazapfts/runtime'
2
2
  import {
3
- addAction, addLink, addWorkspace, associateActionToPlugin, changeVisibility, createStudio, defaults,
3
+ addAction, addLink, addWorkflow, addWorkspace, associateActionToPlugin, changeVisibility, createStudio, defaults,
4
4
  deleteAction, deleteActionVersion, deleteLink, deletePluginVersion, deleteStudio, deleteV1StacksVersionsByStackVersionId,
5
5
  delWorkspace, deprecateActionVersion, deprecatePluginVersion, deprecateStackVersionBy, downloadAction, getActionBySlug,
6
6
  getActionsVersions, getActionVersionById, getAllActionVersions, getApplicationDetailsView, getApplicationsUsesPlugin,
@@ -10,10 +10,12 @@ import {
10
10
  getPluginVersionUsageSummary, getStackUsesPlugin, getStackVersionById, getStackVersionListByIds, getStackWorkspaceDetailView,
11
11
  getStackWorkspaces, getStarterStackVersionsAndPluginsVersions, getStarterUsesPlugin, getStudioByIdOrSlug, getStudios, getStudios1,
12
12
  getStudiosToCreateButton, getStudioTabs, getUnusedStackVersions, getWorkflow, getWorkflowByStudioSlug, getWorkflowDoc,
13
- listActions, listActions1,
13
+ listActions1,
14
+ listActions2,
14
15
  listActionsByFilters1, listConnectionInterfaceTypes, listLinksByStackVersion, listPlugins, listPluginVersionByIdsController,
15
- listReasons, listStacks, listStacksByFilters, listStarters, listWorkflowVersion,
16
- listWorkspaces, patchStarterV2, removeActionFromPlugin, stackModalViewSummary,
16
+ listReasons,
17
+ listStacks1, listStacksByFilters, listStarters, listWorkflows, listWorkflowVersion,
18
+ listWorkspaces, patchStarterV2, removeActionFromPlugin, removeStackWorkflow, stackModalViewSummary,
17
19
  stackVersionUsageSummary, updateStudio, updateStudioTabs,
18
20
  } from '../api/content'
19
21
  import apis from '../apis.json'
@@ -126,6 +128,18 @@ class ContentClient extends ReactQueryNetworkClient {
126
128
  * Gets all the versions of a workflow
127
129
  */
128
130
  workflowVersions = this.query(listWorkflowVersion)
131
+ /**
132
+ * Gets workflows of a stack version
133
+ */
134
+ workflowsFromStackVersion = this.query(listWorkflows)
135
+ /**
136
+ * Removes a workflow from a stack version
137
+ */
138
+ removeWorkflowsFromStack = this.mutation(removeStackWorkflow)
139
+ /**
140
+ * Adds a workflow from a stack version
141
+ */
142
+ addWorkflowToStack = this.mutation(addWorkflow)
129
143
  /**
130
144
  * Gets usage summary of stack
131
145
  */
@@ -229,11 +243,11 @@ class ContentClient extends ReactQueryNetworkClient {
229
243
  /**
230
244
  * Gets list of Actions
231
245
  */
232
- actions = this.query(listActions1)
246
+ actions = this.query(listActions2)
233
247
  /**
234
248
  * Get list of Actions in Stack
235
249
  */
236
- actionsInStack = this.query(listActions)
250
+ actionsInStack = this.query(listActions1)
237
251
  /**
238
252
  * Add Action to Stack Version
239
253
  */
@@ -306,7 +320,7 @@ class ContentClient extends ReactQueryNetworkClient {
306
320
  /**
307
321
  * View all stacks by account
308
322
  */
309
- getAllStacks = this.query(listStacks)
323
+ getAllStacks = this.query(listStacks1)
310
324
  }
311
325
 
312
326
  export const contentClient = new ContentClient()