@stack-spot/portal-network 0.28.0 → 0.30.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 +20 -0
- package/dist/api/workspace.d.ts +320 -216
- package/dist/api/workspace.d.ts.map +1 -1
- package/dist/api/workspace.js +255 -184
- package/dist/api/workspace.js.map +1 -1
- package/dist/client/content.d.ts +139 -16
- package/dist/client/content.d.ts.map +1 -1
- package/dist/client/content.js +151 -16
- package/dist/client/content.js.map +1 -1
- package/dist/client/workspace-manager.d.ts +30 -0
- package/dist/client/workspace-manager.d.ts.map +1 -1
- package/dist/client/workspace-manager.js +37 -1
- package/dist/client/workspace-manager.js.map +1 -1
- package/dist/client/workspace.d.ts +76 -24
- package/dist/client/workspace.d.ts.map +1 -1
- package/dist/client/workspace.js +136 -81
- package/dist/client/workspace.js.map +1 -1
- package/package.json +1 -1
- package/src/api/workspace.ts +497 -288
- package/src/client/content.ts +77 -29
- package/src/client/workspace-manager.ts +20 -1
- package/src/client/workspace.ts +187 -145
package/src/client/content.ts
CHANGED
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import {
|
|
3
|
-
addLink, addWorkspace, changeVisibility, createStudio, defaults, deleteLink, deleteStudio, delWorkspace,
|
|
4
|
-
getStackVersionListByIds, getStudioByIdOrSlug, getStudios1, getStudiosToCreateButton, getStudioTabs,
|
|
5
|
-
listConnectionInterfaceTypes, listLinksByStackVersion, listPluginVersionByIdsController, listReasons,
|
|
6
|
-
listWorkspaces, stackModalViewSummary, getListOfInputs, updateStudio, updateStudioTabs, deleteV1StacksVersionsByStackVersionId,
|
|
7
|
-
getStackWorkspaces, getStackWorkspaceDetailView, getUnusedStackVersions, getPluginModalView, getStackUsesPlugin,
|
|
8
|
-
getGetPluginView, getPluginInfrastructureView, getApplicationsUsesPlugin, getStarterUsesPlugin, getPluginVersionsNotInUse,
|
|
9
|
-
getPluginVersions, getDependentPluginsVersions, getStarterStackVersionsAndPluginsVersions, getInfrastructureEnvironmentsUsesPlugin,
|
|
10
|
-
getApplicationDetailsView, stackVersionUsageSummary, deprecateStackVersionBy, getPluginVersionUsageSummary, deprecatePluginVersion,
|
|
11
|
-
deletePluginVersion, patchStarterV2, listPlugins,
|
|
12
|
-
getActionsVersions, listStarters,
|
|
13
|
-
} from '../api/content'
|
|
2
|
+
import { addAction, addLink, addWorkspace, associateActionToPlugin, changeVisibility, createStudio, defaults, deleteAction, deleteActionVersion, deleteLink, deletePluginVersion, deleteStudio, deleteV1StacksVersionsByStackVersionId, delWorkspace, deprecateActionVersion, deprecatePluginVersion, deprecateStackVersionBy, downloadAction, getActionBySlug, getActionsVersions, getActionVersionById, getAllActionVersions, getApplicationDetailsView, getApplicationsUsesPlugin, getAvailableActionVersionsByActionSlug, getDependentPluginsVersions, getGetPluginView, getInfrastructureEnvironmentsUsesPlugin, getListOfInputs, getPluginInfrastructureView, getPluginModalView, getPluginVersions, getPluginVersionsNotInUse, getPluginVersionUsageSummary, getStackUsesPlugin, getStackVersionListByIds, getStackWorkspaceDetailView, getStackWorkspaces, getStarterStackVersionsAndPluginsVersions, getStarterUsesPlugin, getStudioByIdOrSlug, getStudios1, getStudiosToCreateButton, getStudioTabs, getUnusedStackVersions, listActions, listActions1, listActionsByFilters1, listConnectionInterfaceTypes, listLinksByStackVersion, listPlugins, listPluginVersionByIdsController, listReasons, listStacksByFilters, listStarters, listWorkspaces, patchStarterV2, removeActionFromPlugin, stackModalViewSummary, stackVersionUsageSummary, updateStudio, updateStudioTabs } from '../api/content'
|
|
14
3
|
import apis from '../apis.json'
|
|
15
4
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
16
5
|
import { cntDictionary } from '../error/dictionary/cnt'
|
|
17
6
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
18
7
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
19
|
-
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
20
8
|
import { OperationObject } from '../network/types'
|
|
9
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
21
10
|
|
|
22
11
|
class ContentClient extends ReactQueryNetworkClient {
|
|
23
12
|
constructor() {
|
|
@@ -95,21 +84,24 @@ class ContentClient extends ReactQueryNetworkClient {
|
|
|
95
84
|
* Gets content deprecation reasons
|
|
96
85
|
*/
|
|
97
86
|
deprecationReasons = this.query(listReasons)
|
|
98
|
-
|
|
99
87
|
/**
|
|
100
|
-
*
|
|
88
|
+
* Gets stacks from a given studio
|
|
89
|
+
*/
|
|
90
|
+
stacksFromStudios = this.query(listStacksByFilters)
|
|
91
|
+
/**
|
|
92
|
+
* Gets usage summary of stack
|
|
101
93
|
*/
|
|
102
94
|
stackUsageSummary = this.query(stackModalViewSummary)
|
|
103
95
|
/**
|
|
104
|
-
*
|
|
96
|
+
* Gets list of Workspaces using the Stack
|
|
105
97
|
*/
|
|
106
98
|
workspacesUsingStack = this.query(getStackWorkspaces)
|
|
107
99
|
/**
|
|
108
|
-
*
|
|
100
|
+
* Gets list StackVersions used by Workspace
|
|
109
101
|
*/
|
|
110
102
|
stackVersionsUsedByWorkspace = this.query(getStackWorkspaceDetailView)
|
|
111
103
|
/**
|
|
112
|
-
*
|
|
104
|
+
* Gets list of StackVersions not used by any Content
|
|
113
105
|
*/
|
|
114
106
|
stackVersionsNotInUse = this.query(getUnusedStackVersions)
|
|
115
107
|
/**
|
|
@@ -117,47 +109,47 @@ class ContentClient extends ReactQueryNetworkClient {
|
|
|
117
109
|
*/
|
|
118
110
|
pluginUsageSummary = this.query(getPluginModalView)
|
|
119
111
|
/**
|
|
120
|
-
*
|
|
112
|
+
* Gets list of Stacks using the plugin
|
|
121
113
|
*/
|
|
122
114
|
stacksUsingPlugin = this.query(getStackUsesPlugin)
|
|
123
115
|
/**
|
|
124
|
-
*
|
|
116
|
+
* Gets list of PluginVersions used by Stack
|
|
125
117
|
*/
|
|
126
118
|
pluginVersionsUsedByStack = this.query(getPluginVersions)
|
|
127
119
|
/**
|
|
128
|
-
*
|
|
120
|
+
* Gets list of Plugin that requires the plugin
|
|
129
121
|
*/
|
|
130
122
|
pluginsRequiresPlugin = this.query(getGetPluginView)
|
|
131
123
|
/**
|
|
132
|
-
*
|
|
124
|
+
* Gets list of PluginVersions used by Plugin
|
|
133
125
|
*/
|
|
134
126
|
pluginVersionsUsedByPlugin = this.query(getDependentPluginsVersions)
|
|
135
127
|
/**
|
|
136
|
-
*
|
|
128
|
+
* Gets list of Starter using the plugin
|
|
137
129
|
*/
|
|
138
130
|
starterUsingPlugin = this.query(getStarterUsesPlugin)
|
|
139
131
|
/**
|
|
140
|
-
*
|
|
132
|
+
* Gets list of PluginVersions used by Starter
|
|
141
133
|
*/
|
|
142
134
|
pluginVersionsUsedByStarter = this.query(getStarterStackVersionsAndPluginsVersions)
|
|
143
135
|
/**
|
|
144
|
-
*
|
|
136
|
+
* Gets list of Infrastructure using the plugin
|
|
145
137
|
*/
|
|
146
138
|
infrastructureUsingPlugin = this.query(getPluginInfrastructureView)
|
|
147
139
|
/**
|
|
148
|
-
*
|
|
140
|
+
* Gets list of PluginVersions used by Infrastructure
|
|
149
141
|
*/
|
|
150
142
|
pluginVersionsUsedByInfrastructure = this.query(getInfrastructureEnvironmentsUsesPlugin)
|
|
151
143
|
/**
|
|
152
|
-
*
|
|
144
|
+
* Gets list of Application using the plugin
|
|
153
145
|
*/
|
|
154
146
|
applicationUsingPlugin = this.query(getApplicationsUsesPlugin)
|
|
155
147
|
/**
|
|
156
|
-
*
|
|
148
|
+
* Gets list of PluginVersions used by Applications
|
|
157
149
|
*/
|
|
158
150
|
pluginVersionsUsedByApplication = this.query(getApplicationDetailsView)
|
|
159
151
|
/**
|
|
160
|
-
*
|
|
152
|
+
* Gets list of PluginVersions not used by any Content
|
|
161
153
|
*/
|
|
162
154
|
pluginVersionsNotInUse = this.query(getPluginVersionsNotInUse)
|
|
163
155
|
/**
|
|
@@ -185,6 +177,62 @@ class ContentClient extends ReactQueryNetworkClient {
|
|
|
185
177
|
*/
|
|
186
178
|
deletePluginVersion = this.mutation(deletePluginVersion)
|
|
187
179
|
/**
|
|
180
|
+
* Gets Action by Slug and Studio
|
|
181
|
+
*/
|
|
182
|
+
action = this.query(getActionBySlug)
|
|
183
|
+
/**
|
|
184
|
+
* Gets all Versions of Action
|
|
185
|
+
*/
|
|
186
|
+
actionVersions = this.query(getAllActionVersions)
|
|
187
|
+
/**
|
|
188
|
+
* Gets Action by Action Version Id
|
|
189
|
+
*/
|
|
190
|
+
actionByActionVersionId = this.query(getActionVersionById)
|
|
191
|
+
/**
|
|
192
|
+
* Gets list of Actions
|
|
193
|
+
*/
|
|
194
|
+
actions = this.query(listActions1)
|
|
195
|
+
/**
|
|
196
|
+
* Get list of Actions in Stack
|
|
197
|
+
*/
|
|
198
|
+
actionsInStack = this.query(listActions)
|
|
199
|
+
/**
|
|
200
|
+
* Add Action to Stack Version
|
|
201
|
+
*/
|
|
202
|
+
addActionsToStackVersion = this.mutation(addAction)
|
|
203
|
+
/**
|
|
204
|
+
* Add Action to Plugin Version
|
|
205
|
+
*/
|
|
206
|
+
addActionsToPluginVersion = this.mutation(associateActionToPlugin)
|
|
207
|
+
/**
|
|
208
|
+
* Remove Action Version from Stack
|
|
209
|
+
*/
|
|
210
|
+
removeActionVersionFromStack = this.mutation(deleteAction)
|
|
211
|
+
/**
|
|
212
|
+
* Remove Action Version from Plugin
|
|
213
|
+
*/
|
|
214
|
+
removeActionVersionFromPlugin = this.mutation(removeActionFromPlugin)
|
|
215
|
+
/**
|
|
216
|
+
* Delete Action Version
|
|
217
|
+
*/
|
|
218
|
+
deleteActionVersion = this.mutation(deleteActionVersion)
|
|
219
|
+
/**
|
|
220
|
+
* Deprecate Action Version
|
|
221
|
+
*/
|
|
222
|
+
deprecateActionVersion = this.mutation(deprecateActionVersion)
|
|
223
|
+
/**
|
|
224
|
+
* Download Action Version
|
|
225
|
+
*/
|
|
226
|
+
downloadActionVersion = this.query(downloadAction)
|
|
227
|
+
/**
|
|
228
|
+
* Get Action Version range by Action Slug
|
|
229
|
+
*/
|
|
230
|
+
actionVersionRange = this.mutation(getAvailableActionVersionsByActionSlug)
|
|
231
|
+
/**
|
|
232
|
+
* Get Actions from Stack
|
|
233
|
+
*/
|
|
234
|
+
actionsFromStack = this.query(listActionsByFilters1)
|
|
235
|
+
/*
|
|
188
236
|
* Update starter
|
|
189
237
|
*/
|
|
190
238
|
updateStarter = this.mutation(patchStarterV2)
|
|
@@ -15,6 +15,10 @@ import {
|
|
|
15
15
|
upsertPluginAccountContext,
|
|
16
16
|
getConsolidatedPluginInputsWithConnectionInterfaces,
|
|
17
17
|
listWorkflowByStackIdAndWorkflowType,
|
|
18
|
+
getApplicationLinks,
|
|
19
|
+
getApplicationLinks1,
|
|
20
|
+
addStacksInWorkspace,
|
|
21
|
+
deleteStacksInWorkspace,
|
|
18
22
|
} from '../api/workspaceManager'
|
|
19
23
|
import apis from '../apis.json'
|
|
20
24
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
@@ -46,6 +50,14 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
46
50
|
return workspaceStacksPermission && contentStacksPermission
|
|
47
51
|
},
|
|
48
52
|
})
|
|
53
|
+
/**
|
|
54
|
+
* Add a stack in a workspace
|
|
55
|
+
*/
|
|
56
|
+
addStackToWorkspace = this.mutation(addStacksInWorkspace)
|
|
57
|
+
/**
|
|
58
|
+
* Removes a stack from a workspace
|
|
59
|
+
*/
|
|
60
|
+
removeStackFromWorkspace = this.mutation(deleteStacksInWorkspace)
|
|
49
61
|
/**
|
|
50
62
|
* Gets inputs from a plugin in a workspace stack
|
|
51
63
|
*/
|
|
@@ -98,7 +110,14 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
98
110
|
permission: async ({ stackVersionId, pluginVersionId }: Parameters<typeof upsertPluginAccountContext>[0]) =>
|
|
99
111
|
workspaceClient.saveContextInAccount.isAllowed({ $type: 'plugin', stackVersionId, externalId: pluginVersionId }),
|
|
100
112
|
})
|
|
101
|
-
|
|
113
|
+
/**
|
|
114
|
+
* Gets links in a shared infra for a given env
|
|
115
|
+
*/
|
|
116
|
+
sharedInfraLinks = this.query(getApplicationLinks)
|
|
117
|
+
/**
|
|
118
|
+
* Gets links in an application for a given env
|
|
119
|
+
*/
|
|
120
|
+
applicationLinks = this.query(getApplicationLinks1)
|
|
102
121
|
/**
|
|
103
122
|
* Gets applied plugins in shared infra
|
|
104
123
|
*/
|