@stack-spot/portal-network 0.44.0 → 0.45.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.
- package/CHANGELOG.md +7 -0
- package/dist/api/workspaceManager.d.ts +151 -11
- package/dist/api/workspaceManager.d.ts.map +1 -1
- package/dist/api/workspaceManager.js +101 -19
- package/dist/api/workspaceManager.js.map +1 -1
- package/dist/client/workspace-manager.d.ts +12 -0
- package/dist/client/workspace-manager.d.ts.map +1 -1
- package/dist/client/workspace-manager.js +13 -4
- package/dist/client/workspace-manager.js.map +1 -1
- package/package.json +1 -1
- package/src/api/workspaceManager.ts +257 -31
- package/src/client/workspace-manager.ts +15 -10
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
contextControllerupsertPluginAccountContext,
|
|
11
11
|
contextControllerupsertPluginWorkspaceContext,
|
|
12
12
|
contextControllerupsertWorkspaceActionsInputContext,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
contextPluginControllergetAccountPluginInputs,
|
|
14
|
+
contextPluginControllergetConsolidatedPluginInputs,
|
|
15
|
+
contextPluginControllergetConsolidatedPluginInputsWithConnectionInterfaces,
|
|
16
16
|
defaults,
|
|
17
17
|
managerRunControllerdeleteApplication,
|
|
18
18
|
managerRunControllerdeleteSharedInfra,
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
sharedInfraControllergetSharedInfraAppliedPlugins,
|
|
22
22
|
workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType,
|
|
23
23
|
workspaceControllerdelete,
|
|
24
|
+
workspaceControllergetWorkspaces,
|
|
24
25
|
workspaceStackControlleraddStacksInWorkspace,
|
|
25
26
|
workspaceStackControllerdeleteStacksInWorkspace,
|
|
26
27
|
workspaceStackControllerlistStacks,
|
|
@@ -91,11 +92,11 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
91
92
|
*/
|
|
92
93
|
pluginInputsInWorkspace = this.query({
|
|
93
94
|
name: 'pluginInputsInWorkspace',
|
|
94
|
-
request: async (signal, variables: Parameters<typeof
|
|
95
|
-
const data = await
|
|
95
|
+
request: async (signal, variables: Parameters<typeof contextPluginControllergetConsolidatedPluginInputs>[0]) => {
|
|
96
|
+
const data = await contextPluginControllergetConsolidatedPluginInputs(variables, { signal })
|
|
96
97
|
return data as FixedFullInputContextResponse
|
|
97
98
|
},
|
|
98
|
-
permission: async ({ workspaceId, stackVersionId }: Parameters<typeof
|
|
99
|
+
permission: async ({ workspaceId, stackVersionId }: Parameters<typeof contextPluginControllergetConsolidatedPluginInputs>[0]) => {
|
|
99
100
|
const canViewContext = await workspaceClient.listConsolidatedWorkspaceContext.isAllowed({ $type: 'plugin', workspaceId, stackVersionId })
|
|
100
101
|
const canGetConnectionInterfaceTypes = await contentClient.connectionInterfaceTypes.isAllowed()
|
|
101
102
|
const canGetPluginVersions = await contentClient.pluginVersionsByIds.isAllowed({})
|
|
@@ -107,11 +108,11 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
107
108
|
*/
|
|
108
109
|
pluginInputsAccount = this.query({
|
|
109
110
|
name: 'pluginInputsAccount',
|
|
110
|
-
request: async (signal, variables: Parameters<typeof
|
|
111
|
-
const data = await
|
|
111
|
+
request: async (signal, variables: Parameters<typeof contextPluginControllergetAccountPluginInputs>[0]) => {
|
|
112
|
+
const data = await contextPluginControllergetAccountPluginInputs(variables, { signal })
|
|
112
113
|
return data as FixedFullInputContextResponse
|
|
113
114
|
},
|
|
114
|
-
permission: async ({ stackVersionId }: Parameters<typeof
|
|
115
|
+
permission: async ({ stackVersionId }: Parameters<typeof contextPluginControllergetAccountPluginInputs>[0]) => {
|
|
115
116
|
const canViewContext = await workspaceClient.listConsolidatedContext.isAllowed({ $type: 'plugin', stackVersionId })
|
|
116
117
|
const canGetConnectionInterfaceTypes = await contentClient.connectionInterfaceTypes.isAllowed()
|
|
117
118
|
const canGetPluginVersions = await contentClient.pluginVersionsByIds.isAllowed({})
|
|
@@ -157,7 +158,7 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
157
158
|
/**
|
|
158
159
|
* Gets plugin inputs and connection interface from a plugin in a stack version in workspace
|
|
159
160
|
*/
|
|
160
|
-
pluginInputsWithConnectionInterfaces = this.query(
|
|
161
|
+
pluginInputsWithConnectionInterfaces = this.query(contextPluginControllergetConsolidatedPluginInputsWithConnectionInterfaces as unknown as ReplaceResult<typeof contextPluginControllergetConsolidatedPluginInputsWithConnectionInterfaces, FixedPluginForAppCreationV2Response>)
|
|
161
162
|
/**
|
|
162
163
|
* Gets workflows from a given stack and workflow type
|
|
163
164
|
*/
|
|
@@ -253,6 +254,10 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
253
254
|
* Updates Stacks To Latest Version By Workspace
|
|
254
255
|
*/
|
|
255
256
|
updateStacksToLatestVersionByWorkspace = this.mutation(workspaceStackControllerrefreshStacksInWorkspace)
|
|
257
|
+
/**
|
|
258
|
+
* Get all workspaces with pagination
|
|
259
|
+
*/
|
|
260
|
+
workspacesWithPagination = this.query(workspaceControllergetWorkspaces)
|
|
256
261
|
}
|
|
257
262
|
|
|
258
263
|
export const workspaceManagerClient = new WorkspaceManagerClient()
|