@stack-spot/portal-network 0.184.0 → 0.185.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 +2419 -2412
- package/dist/api/account.js +1 -1
- package/dist/api/agent-tools.js +1 -1
- package/dist/api/agent.js +1 -1
- package/dist/api/ai.js +1 -1
- package/dist/api/apiManagement.js +1 -1
- package/dist/api/apiRuntime.js +1 -1
- package/dist/api/cloudAccount.js +1 -1
- package/dist/api/cloudPlatform.js +1 -1
- package/dist/api/cloudPlatformHorizon.js +1 -1
- package/dist/api/cloudRuntimes.js +1 -1
- package/dist/api/cloudServices.js +1 -1
- package/dist/api/codeShift.d.ts +63 -4
- package/dist/api/codeShift.d.ts.map +1 -1
- package/dist/api/codeShift.js +14 -1
- package/dist/api/codeShift.js.map +1 -1
- package/dist/api/content.js +1 -1
- package/dist/api/dataIntegration.js +1 -1
- package/dist/api/discover.js +1 -1
- package/dist/api/genAiInference.js +1 -1
- package/dist/api/insights.js +1 -1
- package/dist/api/notification.js +1 -1
- package/dist/api/secrets.js +1 -1
- package/dist/api/serviceCatalog.js +1 -1
- package/dist/api/workspace-ai.js +1 -1
- package/dist/api/workspace.js +1 -1
- package/dist/api/workspaceManager.js +1 -1
- package/dist/api/workspaceSearchEngine.js +1 -1
- package/dist/client/code-shift.d.ts +22 -0
- package/dist/client/code-shift.d.ts.map +1 -1
- package/dist/client/code-shift.js +28 -1
- package/dist/client/code-shift.js.map +1 -1
- package/package.json +6 -6
- package/scripts/generate-apis.ts +134 -134
- package/src/api/account.ts +8367 -8367
- package/src/api/agent-tools.ts +2169 -2169
- package/src/api/agent.ts +1083 -1083
- package/src/api/ai.ts +3388 -3388
- package/src/api/apiManagement.ts +570 -570
- package/src/api/apiRuntime.ts +2103 -2103
- package/src/api/cloudAccount.ts +1239 -1239
- package/src/api/cloudPlatform.ts +927 -927
- package/src/api/cloudPlatformHorizon.ts +2655 -2655
- package/src/api/cloudRuntimes.ts +2043 -2043
- package/src/api/cloudServices.ts +1445 -1445
- package/src/api/codeShift.ts +3567 -3481
- package/src/api/content.ts +9785 -9785
- package/src/api/dataIntegration.ts +1657 -1657
- package/src/api/discover.ts +435 -435
- package/src/api/eventBus.ts +171 -171
- package/src/api/genAiInference.ts +603 -603
- package/src/api/insights.ts +310 -310
- package/src/api/notification.ts +334 -334
- package/src/api/secrets.ts +342 -342
- package/src/api/serviceCatalog.ts +2908 -2908
- package/src/api/workflows.ts +1669 -1669
- package/src/api/workspace-ai.ts +677 -677
- package/src/api/workspace.ts +5889 -5889
- package/src/api/workspaceManager.ts +2951 -2951
- package/src/api/workspaceSearchEngine.ts +153 -153
- package/src/api-addresses.ts +120 -120
- package/src/apis-itau.json +225 -225
- package/src/apis.json +225 -225
- package/src/client/account.ts +902 -902
- package/src/client/agent-tools.ts +210 -210
- package/src/client/agent.ts +81 -81
- package/src/client/ai.ts +395 -395
- package/src/client/api-management.ts +40 -40
- package/src/client/cloud-account.ts +70 -70
- package/src/client/cloud-platform-horizon.ts +113 -113
- package/src/client/cloud-platform.ts +163 -163
- package/src/client/cloud-runtimes.ts +129 -129
- package/src/client/cloud-services.ts +94 -94
- package/src/client/code-shift.ts +364 -349
- package/src/client/content.ts +538 -538
- package/src/client/data-integration.ts +191 -191
- package/src/client/discover.ts +89 -89
- package/src/client/event-bus.ts +84 -84
- package/src/client/gen-ai-inference.ts +65 -65
- package/src/client/insights.ts +28 -28
- package/src/client/notification.ts +32 -32
- package/src/client/runtime-manager.ts +76 -76
- package/src/client/secrets.ts +60 -60
- package/src/client/types.ts +377 -377
- package/src/client/workflow.ts +83 -83
- package/src/client/workspace-ai.ts +191 -191
- package/src/client/workspace-manager.ts +564 -564
- package/src/client/workspace-search.ts +39 -39
- package/src/client/workspace.ts +480 -480
- package/src/error/DefaultAPIError.ts +151 -151
- package/src/error/FileUploadError.ts +18 -18
- package/src/error/IgnoredErrorCodes.ts +3 -3
- package/src/error/StackspotAPIError.ts +101 -101
- package/src/error/StreamCanceledError.ts +10 -10
- package/src/error/StreamError.ts +7 -7
- package/src/error/StreamJsonError.ts +10 -10
- package/src/error/dictionary/account.ts +58 -58
- package/src/error/dictionary/action-details.ts +20 -20
- package/src/error/dictionary/action.ts +211 -211
- package/src/error/dictionary/agent-tools.ts +75 -75
- package/src/error/dictionary/ai-inference.ts +28 -28
- package/src/error/dictionary/base.ts +22 -22
- package/src/error/dictionary/cloud-platform.ts +82 -82
- package/src/error/dictionary/cnt-fields.ts +14 -14
- package/src/error/dictionary/cnt.ts +103 -103
- package/src/error/dictionary/code-shift.ts +12 -12
- package/src/error/dictionary/rte.ts +24 -24
- package/src/error/dictionary/rtm.ts +10 -10
- package/src/error/dictionary/secrets.ts +14 -14
- package/src/error/dictionary/workspace-ai.ts +10 -10
- package/src/error/dictionary/workspace-details.ts +15 -15
- package/src/error/dictionary/workspace-fields.ts +10 -10
- package/src/error/dictionary/workspace.ts +209 -209
- package/src/error/types.ts +21 -21
- package/src/index.ts +43 -43
- package/src/network/AutoInfiniteQuery.ts +115 -115
- package/src/network/AutoMutation.ts +27 -27
- package/src/network/AutoOperation.ts +73 -73
- package/src/network/AutoQuery.ts +75 -75
- package/src/network/ManualInfiniteQuery.ts +95 -95
- package/src/network/ManualMutation.ts +40 -40
- package/src/network/ManualOperation.ts +52 -52
- package/src/network/ManualQuery.ts +82 -82
- package/src/network/NetworkClient.ts +167 -167
- package/src/network/ReactQueryNetworkClient.ts +312 -312
- package/src/network/react-query-client.ts +14 -14
- package/src/network/types.ts +294 -294
- package/src/types.ts +1 -1
- package/src/utils/StreamedArray.tsx +146 -146
- package/src/utils/StreamedJson.tsx +166 -166
- package/src/utils/remove-authorization-param.ts +6 -6
- package/src/utils/string.ts +19 -19
- package/src/utils/use-extended-list.ts +80 -80
- package/src/utils/use-streamed-array.ts +17 -17
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +10 -10
package/src/client/workspace.ts
CHANGED
|
@@ -1,480 +1,480 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
import { HttpError } from '@oazapfts/runtime'
|
|
3
|
-
import {
|
|
4
|
-
accountVariableControllercreate,
|
|
5
|
-
accountVariableControllerdelete,
|
|
6
|
-
accountVariableControllerfindAll,
|
|
7
|
-
accountVariableControllerfindByName,
|
|
8
|
-
accountVariableControllerupdate,
|
|
9
|
-
accountVariableControllerusage,
|
|
10
|
-
applicationEmbeddedLinkControllerdelete,
|
|
11
|
-
applicationEmbeddedLinkControllergetEmbeddedLink,
|
|
12
|
-
applicationEmbeddedLinkControllergetEmbeddedLinks,
|
|
13
|
-
applicationEmbeddedLinkControllersave,
|
|
14
|
-
applicationEmbeddedLinkControllerupdate,
|
|
15
|
-
applicationEmbeddedLinkControllerupsertBatch,
|
|
16
|
-
applicationLinkControllerdelete,
|
|
17
|
-
applicationLinkControllergetApplicationLink,
|
|
18
|
-
applicationLinkControllersave,
|
|
19
|
-
applicationLinkControllerupdate,
|
|
20
|
-
applicationLinkControllerupdateLinksVisibility,
|
|
21
|
-
availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAnApplication,
|
|
22
|
-
availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAWorkspace,
|
|
23
|
-
checkConnectionSlugAvailabilityControllercheckConnectionSlugAvailability,
|
|
24
|
-
connectionInterfaceControllerdeleteConnectionInterfaceAttributesFromEnvironment,
|
|
25
|
-
connectionInterfaceControllerdeleteConnectionInterfaceFromAllEnvironments,
|
|
26
|
-
connectionInterfaceControllergetConnectionInterface,
|
|
27
|
-
connectionInterfaceControllergetConnectionInterfaces,
|
|
28
|
-
connectionInterfaceControllerupdateConnectionInterfaceAttributes,
|
|
29
|
-
connectionInterfaceControllerupdateConnectionInterfaceVisibility,
|
|
30
|
-
contextControllerlistAccountContext,
|
|
31
|
-
contextControllerlistConsolidatedContext,
|
|
32
|
-
contextControllerlistStackVersionsWithAccountContext,
|
|
33
|
-
contextV2ControlleraddTypedContextInAccount,
|
|
34
|
-
contextV2ControlleraddTypedContextInWorkspace,
|
|
35
|
-
contextV2ControllerimportContextInAccount,
|
|
36
|
-
contextV2ControllerimportContextInWorkspace,
|
|
37
|
-
defaults,
|
|
38
|
-
environmentControllergetEnvironment,
|
|
39
|
-
environmentControllergetEnvironments,
|
|
40
|
-
environmentControllersave,
|
|
41
|
-
environmentControllerupdate,
|
|
42
|
-
sharedInfraLinkControllerdelete,
|
|
43
|
-
sharedInfraLinkControllergetSharedInfraLink,
|
|
44
|
-
sharedInfraLinkControllersave,
|
|
45
|
-
sharedInfraLinkControllerupdate,
|
|
46
|
-
sharedInfraLinkControllerupdateLinksVisibility,
|
|
47
|
-
workflowAccountControllerdeleteAccountWorkflow,
|
|
48
|
-
workflowAccountControllerlistAccountWorkflows,
|
|
49
|
-
workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType,
|
|
50
|
-
workspaceApplicationControllerdeleteApplication,
|
|
51
|
-
workspaceApplicationControllergetApplication,
|
|
52
|
-
workspaceApplicationControllergetApplications,
|
|
53
|
-
workspaceApplicationControllergetDependencyTree,
|
|
54
|
-
workspaceApplicationControllerupdate,
|
|
55
|
-
workspaceControllerdelete,
|
|
56
|
-
workspaceControllergetWorkspaceForId,
|
|
57
|
-
workspaceControllergetWorkspaces,
|
|
58
|
-
workspaceControllergetWorkspacesFromUserPermission,
|
|
59
|
-
workspaceControllersave,
|
|
60
|
-
workspaceControllerupdate,
|
|
61
|
-
workspaceEmbeddedLinkControllerdelete,
|
|
62
|
-
workspaceEmbeddedLinkControllergetEmbeddedLink,
|
|
63
|
-
workspaceEmbeddedLinkControllergetEmbeddedLinks,
|
|
64
|
-
workspaceEmbeddedLinkControllersave,
|
|
65
|
-
workspaceEmbeddedLinkControllerupdate,
|
|
66
|
-
workspaceEmbeddedLinkControllerupsertBatch,
|
|
67
|
-
workspaceLinkControllerdelete,
|
|
68
|
-
workspaceLinkControllergetWorkspaceLinks,
|
|
69
|
-
workspaceLinkControllersave,
|
|
70
|
-
workspaceSharedInfrastructureControllerdeleteSharedInfra,
|
|
71
|
-
workspaceSharedInfrastructureControllergetAllSharedInfrastructure,
|
|
72
|
-
workspaceSharedInfrastructureControllergetDependencyTree,
|
|
73
|
-
workspaceSharedInfrastructureControllergetSharedInfrastructure,
|
|
74
|
-
workspaceSharedInfrastructureControllerupdate,
|
|
75
|
-
workspaceStackControlleraddStack,
|
|
76
|
-
workspaceStackControllerdeleteStack,
|
|
77
|
-
workspaceStackControllergetStackById,
|
|
78
|
-
workspaceStackControllergetStacks,
|
|
79
|
-
workspaceV2ControllergetWorkspacesWithoutStackFilter,
|
|
80
|
-
workspaceVariableV2ControllerfindAll,
|
|
81
|
-
workspaceVariableV2ControllerfindByName,
|
|
82
|
-
workspaceVariableV2Controllerupsert,
|
|
83
|
-
} from '../api/workspace'
|
|
84
|
-
|
|
85
|
-
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
86
|
-
import { workspaceDictionary } from '../error/dictionary/workspace'
|
|
87
|
-
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
88
|
-
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
89
|
-
import { OperationObject } from '../network/types'
|
|
90
|
-
import { getApiAddresses } from '../api-addresses'
|
|
91
|
-
|
|
92
|
-
class WorkspaceClient extends ReactQueryNetworkClient {
|
|
93
|
-
constructor() {
|
|
94
|
-
super(getApiAddresses().workspace.url, defaults)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
98
|
-
return new DefaultAPIError(error.data, error.status, workspaceDictionary, error.headers)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Gets all connection interfaces from a workspace
|
|
103
|
-
*/
|
|
104
|
-
allConnectionInterfaces = this.query(connectionInterfaceControllergetConnectionInterfaces)
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Gets a connection interface from a workspace
|
|
108
|
-
*/
|
|
109
|
-
connectionInterface = this.query(connectionInterfaceControllergetConnectionInterface)
|
|
110
|
-
/**
|
|
111
|
-
* Get available connection interface for a workspace by connection interface slug
|
|
112
|
-
*/
|
|
113
|
-
workspaceAvailableConnInterfaceBySlug = this.query(availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAWorkspace)
|
|
114
|
-
/**
|
|
115
|
-
* Get available connection interface for an application by connection interface slug
|
|
116
|
-
*/
|
|
117
|
-
applicationAvailableConnInterface = this.query(availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAnApplication)
|
|
118
|
-
/**
|
|
119
|
-
* Updates the visibility of a connection interface
|
|
120
|
-
*/
|
|
121
|
-
updateConnectionInterfaceVisibility = this.mutation(connectionInterfaceControllerupdateConnectionInterfaceVisibility)
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Removes a connection interface
|
|
125
|
-
*/
|
|
126
|
-
deleteConnectionInterface = this.mutation(connectionInterfaceControllerdeleteConnectionInterfaceFromAllEnvironments)
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Removes connection interface attributes by environment
|
|
130
|
-
*/
|
|
131
|
-
deleteConnectionInterfaceAttributesFromEnvironment = this.mutation(connectionInterfaceControllerdeleteConnectionInterfaceAttributesFromEnvironment)
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Updates the attributes of a connection interface
|
|
135
|
-
*/
|
|
136
|
-
updateConnectionInterfaceAttributes = this.mutation(connectionInterfaceControllerupdateConnectionInterfaceAttributes)
|
|
137
|
-
/**
|
|
138
|
-
* Checks the availability of a connection interface slug.
|
|
139
|
-
*/
|
|
140
|
-
checkConnectionInterfaceAvailability = this.query(checkConnectionSlugAvailabilityControllercheckConnectionSlugAvailability)
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Gets all environments
|
|
144
|
-
*/
|
|
145
|
-
environments = this.query(environmentControllergetEnvironments)
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Gets environment by Id
|
|
149
|
-
*/
|
|
150
|
-
environment = this.query(environmentControllergetEnvironment)
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Creates an environment
|
|
154
|
-
*/
|
|
155
|
-
createEnvironment = this.mutation(environmentControllersave)
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Updates environment data
|
|
159
|
-
*/
|
|
160
|
-
updateEnvironment = this.mutation(environmentControllerupdate)
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Gets embedded link by id
|
|
164
|
-
*/
|
|
165
|
-
embeddedLinkInWorkspace = this.query(workspaceEmbeddedLinkControllergetEmbeddedLink)
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Gets all embedded links from a workspace
|
|
169
|
-
*/
|
|
170
|
-
allEmbeddedLinksInWorkspace = this.query(workspaceEmbeddedLinkControllergetEmbeddedLinks)
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Creates an embedded link in a workspace
|
|
174
|
-
*/
|
|
175
|
-
createEmbeddedLinkInWorkspace = this.mutation(workspaceEmbeddedLinkControllersave)
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Deletes an embedded link from a workspace
|
|
179
|
-
*/
|
|
180
|
-
deleteEmbeddedLinkFromWorkspace = this.mutation(workspaceEmbeddedLinkControllerdelete)
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Updates an embedded link from a workspace
|
|
184
|
-
*/
|
|
185
|
-
updateEmbeddedLinkInWorkspace = this.mutation(workspaceEmbeddedLinkControllerupdate)
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Updates all embedded links from a workspace
|
|
189
|
-
*/
|
|
190
|
-
updateAllEmbeddedLinksInWorkspace = this.mutation(workspaceEmbeddedLinkControllerupsertBatch)
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Gets an embedded link from an application
|
|
194
|
-
*/
|
|
195
|
-
embeddedLinkInApplication = this.query(applicationEmbeddedLinkControllergetEmbeddedLink)
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Gets all embedded links from an application
|
|
199
|
-
*/
|
|
200
|
-
allEmbeddedLinksInApplication = this.query(applicationEmbeddedLinkControllergetEmbeddedLinks)
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Creates an embedded link in an application
|
|
204
|
-
*/
|
|
205
|
-
createEmbeddedLinkInApplication = this.mutation(applicationEmbeddedLinkControllersave)
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Deletes an embedded link from an application
|
|
209
|
-
*/
|
|
210
|
-
deleteEmbeddedLinkFromApplication = this.mutation(applicationEmbeddedLinkControllerdelete)
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Updates an embedded link in an application
|
|
214
|
-
*/
|
|
215
|
-
updateEmbeddedLinkInApplication = this.mutation(applicationEmbeddedLinkControllerupdate)
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Updates all embedded links in an application
|
|
219
|
-
*/
|
|
220
|
-
updateAllEmbeddedLinksInApplication = this.mutation(applicationEmbeddedLinkControllerupsertBatch)
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Gets all workspaces
|
|
224
|
-
*/
|
|
225
|
-
workspaces = this.query(workspaceControllergetWorkspaces)
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Gets a workspace
|
|
229
|
-
*/
|
|
230
|
-
workspace = this.query(workspaceControllergetWorkspaceForId)
|
|
231
|
-
/**
|
|
232
|
-
* Get workspaces within user permission
|
|
233
|
-
*/
|
|
234
|
-
workspacesFromUserPermission = this.query(workspaceControllergetWorkspacesFromUserPermission)
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Creates a workspace
|
|
238
|
-
*/
|
|
239
|
-
createWorkspace = this.mutation(workspaceControllersave)
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* Updates a workspace
|
|
243
|
-
*/
|
|
244
|
-
updateWorkspace = this.mutation(workspaceControllerupdate)
|
|
245
|
-
|
|
246
|
-
//App and infra
|
|
247
|
-
/**
|
|
248
|
-
* Gets all applications in a Workspace
|
|
249
|
-
*/
|
|
250
|
-
applications = this.query(workspaceApplicationControllergetApplications)
|
|
251
|
-
/**
|
|
252
|
-
* Gets an application
|
|
253
|
-
*/
|
|
254
|
-
application = this.query(workspaceApplicationControllergetApplication)
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Gets the dependencies of an application
|
|
258
|
-
*/
|
|
259
|
-
applicationDependencies = this.query(workspaceApplicationControllergetDependencyTree)
|
|
260
|
-
/**
|
|
261
|
-
* Gets all shared infra in a Workspace
|
|
262
|
-
*/
|
|
263
|
-
allSharedInfra = this.query(workspaceSharedInfrastructureControllergetAllSharedInfrastructure)
|
|
264
|
-
/**
|
|
265
|
-
* Gets a shared infra
|
|
266
|
-
*/
|
|
267
|
-
sharedInfra = this.query(workspaceSharedInfrastructureControllergetSharedInfrastructure)
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Gets the dependencies of a shared infra
|
|
271
|
-
*/
|
|
272
|
-
sharedInfraDependencies = this.query(workspaceSharedInfrastructureControllergetDependencyTree)
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Updates an application
|
|
276
|
-
*/
|
|
277
|
-
updateApplication = this.mutation(workspaceApplicationControllerupdate)
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Updates a shared infra
|
|
281
|
-
*/
|
|
282
|
-
updateInfra = this.mutation(workspaceSharedInfrastructureControllerupdate)
|
|
283
|
-
|
|
284
|
-
// Workflow
|
|
285
|
-
/**
|
|
286
|
-
* Gets a workflow by stack id
|
|
287
|
-
*/
|
|
288
|
-
workflowsByStackId = this.query(workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType)
|
|
289
|
-
/**
|
|
290
|
-
* Gets account workflows
|
|
291
|
-
*/
|
|
292
|
-
accountWorkflows = this.query(workflowAccountControllerlistAccountWorkflows)
|
|
293
|
-
/**
|
|
294
|
-
* Gets workflows from a stack
|
|
295
|
-
*/
|
|
296
|
-
stackWorkflows = this.query(workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType)
|
|
297
|
-
/**
|
|
298
|
-
* Removes account workflow
|
|
299
|
-
*/
|
|
300
|
-
deleteAccountWorkflow = this.mutation(workflowAccountControllerdeleteAccountWorkflow)
|
|
301
|
-
|
|
302
|
-
// Variables Account
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
* Find all account variables
|
|
306
|
-
* @deprecated consume from Workspace Manager API
|
|
307
|
-
*/
|
|
308
|
-
accountVariables = this.query(accountVariableControllerfindAll)
|
|
309
|
-
/**
|
|
310
|
-
* Get an account variable by name
|
|
311
|
-
* @deprecated consume from Workspace Manager API
|
|
312
|
-
*/
|
|
313
|
-
getAccountVariable = this.query(accountVariableControllerfindByName)
|
|
314
|
-
/**
|
|
315
|
-
* Get account variable usage
|
|
316
|
-
* @deprecated consume from Workspace Manager API
|
|
317
|
-
*/
|
|
318
|
-
accountVariableUsage = this.query(accountVariableControllerusage)
|
|
319
|
-
/**
|
|
320
|
-
* Create account variable
|
|
321
|
-
* @deprecated consume from Workspace Manager API
|
|
322
|
-
*/
|
|
323
|
-
createAccountVariable = this.mutation(accountVariableControllercreate)
|
|
324
|
-
/**
|
|
325
|
-
* Update account variable
|
|
326
|
-
* @deprecated consume from Workspace Manager API
|
|
327
|
-
*/
|
|
328
|
-
updateAccountVariable = this.mutation(accountVariableControllerupdate)
|
|
329
|
-
/**
|
|
330
|
-
* Delete account variable
|
|
331
|
-
* @deprecated consume from Workspace Manager API
|
|
332
|
-
*/
|
|
333
|
-
deleteAccountVariable = this.mutation(accountVariableControllerdelete)
|
|
334
|
-
|
|
335
|
-
// Variables Workspace
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Find all workspace variables
|
|
339
|
-
* @deprecated consume from Workspace Manager API
|
|
340
|
-
*/
|
|
341
|
-
workspaceVariables = this.query(workspaceVariableV2ControllerfindAll)
|
|
342
|
-
/**
|
|
343
|
-
* Get a workspace variable by name
|
|
344
|
-
* @deprecated consume from Workspace Manager API
|
|
345
|
-
*/
|
|
346
|
-
getWorkspaceVariable = this.query(workspaceVariableV2ControllerfindByName)
|
|
347
|
-
/**
|
|
348
|
-
* Updates workspace variable based on existing account variable
|
|
349
|
-
* @deprecated consume from Workspace Manager API
|
|
350
|
-
*/
|
|
351
|
-
updateWorkspaceVariable = this.mutation(workspaceVariableV2Controllerupsert)
|
|
352
|
-
|
|
353
|
-
//Links
|
|
354
|
-
/**
|
|
355
|
-
* Gets shared infra links
|
|
356
|
-
*/
|
|
357
|
-
linksInWorkspace = this.query(workspaceLinkControllergetWorkspaceLinks)
|
|
358
|
-
/**
|
|
359
|
-
* Adds a link to a workspace
|
|
360
|
-
*/
|
|
361
|
-
addLinkInWorkspace = this.mutation(workspaceLinkControllersave)
|
|
362
|
-
/**
|
|
363
|
-
* Deletes a link from a workspace
|
|
364
|
-
*/
|
|
365
|
-
removeLinkFromWorkspace = this.mutation(workspaceLinkControllerdelete)
|
|
366
|
-
/**
|
|
367
|
-
* Gets application link
|
|
368
|
-
*/
|
|
369
|
-
linkInApplication = this.query(applicationLinkControllergetApplicationLink)
|
|
370
|
-
/**
|
|
371
|
-
* Adds a link to an application
|
|
372
|
-
*/
|
|
373
|
-
addLinkInApplication = this.mutation(applicationLinkControllersave)
|
|
374
|
-
/**
|
|
375
|
-
* Deletes a link from an application
|
|
376
|
-
*/
|
|
377
|
-
removeLinkFromApplication = this.mutation(applicationLinkControllerdelete)
|
|
378
|
-
/**
|
|
379
|
-
* Updates a link from an application
|
|
380
|
-
*/
|
|
381
|
-
updateLinkInApplication = this.mutation(applicationLinkControllerupdate)
|
|
382
|
-
/**
|
|
383
|
-
* Updates application links visibility
|
|
384
|
-
*/
|
|
385
|
-
updateLinkVisibilityInApplication = this.mutation(applicationLinkControllerupdateLinksVisibility)
|
|
386
|
-
/**
|
|
387
|
-
* Gets shared infra link
|
|
388
|
-
*/
|
|
389
|
-
linkInInfra = this.query(sharedInfraLinkControllergetSharedInfraLink)
|
|
390
|
-
/**
|
|
391
|
-
* Adds a link to an infra
|
|
392
|
-
*/
|
|
393
|
-
addLinkInInfra = this.mutation(sharedInfraLinkControllersave)
|
|
394
|
-
/**
|
|
395
|
-
* Deletes a link from an infra
|
|
396
|
-
*/
|
|
397
|
-
removeLinkFromInfra = this.mutation(sharedInfraLinkControllerdelete)
|
|
398
|
-
/**
|
|
399
|
-
* Updates a link from an infra
|
|
400
|
-
*/
|
|
401
|
-
updateLinkInInfra = this.mutation(sharedInfraLinkControllerupdate)
|
|
402
|
-
/**
|
|
403
|
-
* Updates infra links visibility
|
|
404
|
-
*/
|
|
405
|
-
updateLinkVisibilityInInfra = this.mutation(sharedInfraLinkControllerupdateLinksVisibility)
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* Gets stacks in a workspace. This fn is only used for permission purposes.
|
|
409
|
-
*/
|
|
410
|
-
stacks = this.query(workspaceStackControllergetStacks) as OperationObject<Parameters<typeof workspaceStackControllergetStacks>[0]>
|
|
411
|
-
/**
|
|
412
|
-
* List workspace context inputs for a plugin or action in a stack. This fn is only used for permission purposes.
|
|
413
|
-
*/
|
|
414
|
-
listConsolidatedWorkspaceContext = this.query(contextControllerlistConsolidatedContext) as OperationObject<Parameters<typeof contextControllerlistConsolidatedContext>[0]>
|
|
415
|
-
/**
|
|
416
|
-
* List account context inputs for a plugin or action in a stack. This fn is only used for permission purposes.
|
|
417
|
-
*/
|
|
418
|
-
listConsolidatedContext = this.query(contextControllerlistAccountContext) as OperationObject<Parameters<typeof contextControllerlistAccountContext>[0]>
|
|
419
|
-
/**
|
|
420
|
-
* Save workspace context inputs for a plugin or action in a stack. This fn is only used for permission purposes.
|
|
421
|
-
*/
|
|
422
|
-
saveContextInWorkspace = this.query(contextV2ControlleraddTypedContextInWorkspace) as OperationObject<Parameters<typeof contextV2ControlleraddTypedContextInWorkspace>[0]>
|
|
423
|
-
/**
|
|
424
|
-
* Save workspace context inputs for a plugin or action in the account. This fn is only used for permission purposes.
|
|
425
|
-
*/
|
|
426
|
-
saveContextInAccount = this.query(contextV2ControlleraddTypedContextInAccount) as OperationObject<Parameters<typeof contextV2ControlleraddTypedContextInAccount>[0]>
|
|
427
|
-
/**
|
|
428
|
-
* Add stack to workspace. This fn is only used for permission purposes.
|
|
429
|
-
*/
|
|
430
|
-
addStackInWorkspace = this.query(workspaceStackControlleraddStack) as OperationObject<Parameters<typeof workspaceStackControlleraddStack>[0]>
|
|
431
|
-
/**
|
|
432
|
-
* Removes a stack from a workspace. This fn is only used for permission purposes.
|
|
433
|
-
*/
|
|
434
|
-
removeStackFromWorkspace = this.query(workspaceStackControllerdeleteStack) as OperationObject<Parameters<typeof workspaceStackControllerdeleteStack>[0]>
|
|
435
|
-
/**
|
|
436
|
-
* Gets a stack in a workspace . This fn is only used for permission purposes.
|
|
437
|
-
*/
|
|
438
|
-
stackInWorkspace = this.query(workspaceStackControllergetStackById) as OperationObject<Parameters<typeof workspaceStackControllergetStackById>[0]>
|
|
439
|
-
/**
|
|
440
|
-
* Deletes a workspace . This fn is only used for permission purposes.
|
|
441
|
-
*/
|
|
442
|
-
deleteWorkspace = this.query(workspaceControllerdelete) as OperationObject<Parameters<typeof workspaceControllerdelete>[0]>
|
|
443
|
-
/**
|
|
444
|
-
* Deletes an application. This fn is only used for permission purposes.
|
|
445
|
-
*/
|
|
446
|
-
deleteApplication = this.query(workspaceApplicationControllerdeleteApplication) as OperationObject<Parameters<typeof workspaceApplicationControllerdeleteApplication>[0]>
|
|
447
|
-
/**
|
|
448
|
-
* Deletes an infra. This fn is only used for permission purposes.
|
|
449
|
-
*/
|
|
450
|
-
deleteInfra = this.query(workspaceSharedInfrastructureControllerdeleteSharedInfra) as OperationObject<Parameters<typeof workspaceSharedInfrastructureControllerdeleteSharedInfra>[0]>
|
|
451
|
-
/**
|
|
452
|
-
* Gets the detail of an application. This fn is only used for permission purposes.
|
|
453
|
-
*/
|
|
454
|
-
applicationDetail = this.query(workspaceApplicationControllergetApplication) as OperationObject<Parameters<typeof workspaceApplicationControllergetApplication>[0]>
|
|
455
|
-
/**
|
|
456
|
-
* Gets the detail of an infra. This fn is only used for permission purposes.
|
|
457
|
-
*/
|
|
458
|
-
infraDetail = this.query(workspaceSharedInfrastructureControllergetSharedInfrastructure) as OperationObject<Parameters<typeof workspaceSharedInfrastructureControllergetSharedInfrastructure>[0]>
|
|
459
|
-
/**
|
|
460
|
-
* Get all workspaces without stack version and favorites filter
|
|
461
|
-
*/
|
|
462
|
-
getWorkspacesWithoutStackFilter = this.query(workspaceV2ControllergetWorkspacesWithoutStackFilter)
|
|
463
|
-
/**
|
|
464
|
-
* List all stacks with context for given account and given stackVersionId list.
|
|
465
|
-
*/
|
|
466
|
-
stacksVersionWithContext = this.mutation(contextControllerlistStackVersionsWithAccountContext)
|
|
467
|
-
/**
|
|
468
|
-
* import context of stack in workspace
|
|
469
|
-
* used to control permission
|
|
470
|
-
*/
|
|
471
|
-
importStackContextInWorkspace = this.mutation(contextV2ControllerimportContextInWorkspace)
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* import context of stack in account
|
|
475
|
-
* used to control permission
|
|
476
|
-
*/
|
|
477
|
-
importStackContextInAccount = this.mutation(contextV2ControllerimportContextInAccount)
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
export const workspaceClient = new WorkspaceClient()
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
3
|
+
import {
|
|
4
|
+
accountVariableControllercreate,
|
|
5
|
+
accountVariableControllerdelete,
|
|
6
|
+
accountVariableControllerfindAll,
|
|
7
|
+
accountVariableControllerfindByName,
|
|
8
|
+
accountVariableControllerupdate,
|
|
9
|
+
accountVariableControllerusage,
|
|
10
|
+
applicationEmbeddedLinkControllerdelete,
|
|
11
|
+
applicationEmbeddedLinkControllergetEmbeddedLink,
|
|
12
|
+
applicationEmbeddedLinkControllergetEmbeddedLinks,
|
|
13
|
+
applicationEmbeddedLinkControllersave,
|
|
14
|
+
applicationEmbeddedLinkControllerupdate,
|
|
15
|
+
applicationEmbeddedLinkControllerupsertBatch,
|
|
16
|
+
applicationLinkControllerdelete,
|
|
17
|
+
applicationLinkControllergetApplicationLink,
|
|
18
|
+
applicationLinkControllersave,
|
|
19
|
+
applicationLinkControllerupdate,
|
|
20
|
+
applicationLinkControllerupdateLinksVisibility,
|
|
21
|
+
availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAnApplication,
|
|
22
|
+
availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAWorkspace,
|
|
23
|
+
checkConnectionSlugAvailabilityControllercheckConnectionSlugAvailability,
|
|
24
|
+
connectionInterfaceControllerdeleteConnectionInterfaceAttributesFromEnvironment,
|
|
25
|
+
connectionInterfaceControllerdeleteConnectionInterfaceFromAllEnvironments,
|
|
26
|
+
connectionInterfaceControllergetConnectionInterface,
|
|
27
|
+
connectionInterfaceControllergetConnectionInterfaces,
|
|
28
|
+
connectionInterfaceControllerupdateConnectionInterfaceAttributes,
|
|
29
|
+
connectionInterfaceControllerupdateConnectionInterfaceVisibility,
|
|
30
|
+
contextControllerlistAccountContext,
|
|
31
|
+
contextControllerlistConsolidatedContext,
|
|
32
|
+
contextControllerlistStackVersionsWithAccountContext,
|
|
33
|
+
contextV2ControlleraddTypedContextInAccount,
|
|
34
|
+
contextV2ControlleraddTypedContextInWorkspace,
|
|
35
|
+
contextV2ControllerimportContextInAccount,
|
|
36
|
+
contextV2ControllerimportContextInWorkspace,
|
|
37
|
+
defaults,
|
|
38
|
+
environmentControllergetEnvironment,
|
|
39
|
+
environmentControllergetEnvironments,
|
|
40
|
+
environmentControllersave,
|
|
41
|
+
environmentControllerupdate,
|
|
42
|
+
sharedInfraLinkControllerdelete,
|
|
43
|
+
sharedInfraLinkControllergetSharedInfraLink,
|
|
44
|
+
sharedInfraLinkControllersave,
|
|
45
|
+
sharedInfraLinkControllerupdate,
|
|
46
|
+
sharedInfraLinkControllerupdateLinksVisibility,
|
|
47
|
+
workflowAccountControllerdeleteAccountWorkflow,
|
|
48
|
+
workflowAccountControllerlistAccountWorkflows,
|
|
49
|
+
workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType,
|
|
50
|
+
workspaceApplicationControllerdeleteApplication,
|
|
51
|
+
workspaceApplicationControllergetApplication,
|
|
52
|
+
workspaceApplicationControllergetApplications,
|
|
53
|
+
workspaceApplicationControllergetDependencyTree,
|
|
54
|
+
workspaceApplicationControllerupdate,
|
|
55
|
+
workspaceControllerdelete,
|
|
56
|
+
workspaceControllergetWorkspaceForId,
|
|
57
|
+
workspaceControllergetWorkspaces,
|
|
58
|
+
workspaceControllergetWorkspacesFromUserPermission,
|
|
59
|
+
workspaceControllersave,
|
|
60
|
+
workspaceControllerupdate,
|
|
61
|
+
workspaceEmbeddedLinkControllerdelete,
|
|
62
|
+
workspaceEmbeddedLinkControllergetEmbeddedLink,
|
|
63
|
+
workspaceEmbeddedLinkControllergetEmbeddedLinks,
|
|
64
|
+
workspaceEmbeddedLinkControllersave,
|
|
65
|
+
workspaceEmbeddedLinkControllerupdate,
|
|
66
|
+
workspaceEmbeddedLinkControllerupsertBatch,
|
|
67
|
+
workspaceLinkControllerdelete,
|
|
68
|
+
workspaceLinkControllergetWorkspaceLinks,
|
|
69
|
+
workspaceLinkControllersave,
|
|
70
|
+
workspaceSharedInfrastructureControllerdeleteSharedInfra,
|
|
71
|
+
workspaceSharedInfrastructureControllergetAllSharedInfrastructure,
|
|
72
|
+
workspaceSharedInfrastructureControllergetDependencyTree,
|
|
73
|
+
workspaceSharedInfrastructureControllergetSharedInfrastructure,
|
|
74
|
+
workspaceSharedInfrastructureControllerupdate,
|
|
75
|
+
workspaceStackControlleraddStack,
|
|
76
|
+
workspaceStackControllerdeleteStack,
|
|
77
|
+
workspaceStackControllergetStackById,
|
|
78
|
+
workspaceStackControllergetStacks,
|
|
79
|
+
workspaceV2ControllergetWorkspacesWithoutStackFilter,
|
|
80
|
+
workspaceVariableV2ControllerfindAll,
|
|
81
|
+
workspaceVariableV2ControllerfindByName,
|
|
82
|
+
workspaceVariableV2Controllerupsert,
|
|
83
|
+
} from '../api/workspace'
|
|
84
|
+
|
|
85
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
86
|
+
import { workspaceDictionary } from '../error/dictionary/workspace'
|
|
87
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
88
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
89
|
+
import { OperationObject } from '../network/types'
|
|
90
|
+
import { getApiAddresses } from '../api-addresses'
|
|
91
|
+
|
|
92
|
+
class WorkspaceClient extends ReactQueryNetworkClient {
|
|
93
|
+
constructor() {
|
|
94
|
+
super(getApiAddresses().workspace.url, defaults)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
98
|
+
return new DefaultAPIError(error.data, error.status, workspaceDictionary, error.headers)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Gets all connection interfaces from a workspace
|
|
103
|
+
*/
|
|
104
|
+
allConnectionInterfaces = this.query(connectionInterfaceControllergetConnectionInterfaces)
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Gets a connection interface from a workspace
|
|
108
|
+
*/
|
|
109
|
+
connectionInterface = this.query(connectionInterfaceControllergetConnectionInterface)
|
|
110
|
+
/**
|
|
111
|
+
* Get available connection interface for a workspace by connection interface slug
|
|
112
|
+
*/
|
|
113
|
+
workspaceAvailableConnInterfaceBySlug = this.query(availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAWorkspace)
|
|
114
|
+
/**
|
|
115
|
+
* Get available connection interface for an application by connection interface slug
|
|
116
|
+
*/
|
|
117
|
+
applicationAvailableConnInterface = this.query(availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAnApplication)
|
|
118
|
+
/**
|
|
119
|
+
* Updates the visibility of a connection interface
|
|
120
|
+
*/
|
|
121
|
+
updateConnectionInterfaceVisibility = this.mutation(connectionInterfaceControllerupdateConnectionInterfaceVisibility)
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Removes a connection interface
|
|
125
|
+
*/
|
|
126
|
+
deleteConnectionInterface = this.mutation(connectionInterfaceControllerdeleteConnectionInterfaceFromAllEnvironments)
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Removes connection interface attributes by environment
|
|
130
|
+
*/
|
|
131
|
+
deleteConnectionInterfaceAttributesFromEnvironment = this.mutation(connectionInterfaceControllerdeleteConnectionInterfaceAttributesFromEnvironment)
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Updates the attributes of a connection interface
|
|
135
|
+
*/
|
|
136
|
+
updateConnectionInterfaceAttributes = this.mutation(connectionInterfaceControllerupdateConnectionInterfaceAttributes)
|
|
137
|
+
/**
|
|
138
|
+
* Checks the availability of a connection interface slug.
|
|
139
|
+
*/
|
|
140
|
+
checkConnectionInterfaceAvailability = this.query(checkConnectionSlugAvailabilityControllercheckConnectionSlugAvailability)
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Gets all environments
|
|
144
|
+
*/
|
|
145
|
+
environments = this.query(environmentControllergetEnvironments)
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Gets environment by Id
|
|
149
|
+
*/
|
|
150
|
+
environment = this.query(environmentControllergetEnvironment)
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Creates an environment
|
|
154
|
+
*/
|
|
155
|
+
createEnvironment = this.mutation(environmentControllersave)
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Updates environment data
|
|
159
|
+
*/
|
|
160
|
+
updateEnvironment = this.mutation(environmentControllerupdate)
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Gets embedded link by id
|
|
164
|
+
*/
|
|
165
|
+
embeddedLinkInWorkspace = this.query(workspaceEmbeddedLinkControllergetEmbeddedLink)
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Gets all embedded links from a workspace
|
|
169
|
+
*/
|
|
170
|
+
allEmbeddedLinksInWorkspace = this.query(workspaceEmbeddedLinkControllergetEmbeddedLinks)
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Creates an embedded link in a workspace
|
|
174
|
+
*/
|
|
175
|
+
createEmbeddedLinkInWorkspace = this.mutation(workspaceEmbeddedLinkControllersave)
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Deletes an embedded link from a workspace
|
|
179
|
+
*/
|
|
180
|
+
deleteEmbeddedLinkFromWorkspace = this.mutation(workspaceEmbeddedLinkControllerdelete)
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Updates an embedded link from a workspace
|
|
184
|
+
*/
|
|
185
|
+
updateEmbeddedLinkInWorkspace = this.mutation(workspaceEmbeddedLinkControllerupdate)
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Updates all embedded links from a workspace
|
|
189
|
+
*/
|
|
190
|
+
updateAllEmbeddedLinksInWorkspace = this.mutation(workspaceEmbeddedLinkControllerupsertBatch)
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Gets an embedded link from an application
|
|
194
|
+
*/
|
|
195
|
+
embeddedLinkInApplication = this.query(applicationEmbeddedLinkControllergetEmbeddedLink)
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Gets all embedded links from an application
|
|
199
|
+
*/
|
|
200
|
+
allEmbeddedLinksInApplication = this.query(applicationEmbeddedLinkControllergetEmbeddedLinks)
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Creates an embedded link in an application
|
|
204
|
+
*/
|
|
205
|
+
createEmbeddedLinkInApplication = this.mutation(applicationEmbeddedLinkControllersave)
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Deletes an embedded link from an application
|
|
209
|
+
*/
|
|
210
|
+
deleteEmbeddedLinkFromApplication = this.mutation(applicationEmbeddedLinkControllerdelete)
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Updates an embedded link in an application
|
|
214
|
+
*/
|
|
215
|
+
updateEmbeddedLinkInApplication = this.mutation(applicationEmbeddedLinkControllerupdate)
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Updates all embedded links in an application
|
|
219
|
+
*/
|
|
220
|
+
updateAllEmbeddedLinksInApplication = this.mutation(applicationEmbeddedLinkControllerupsertBatch)
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Gets all workspaces
|
|
224
|
+
*/
|
|
225
|
+
workspaces = this.query(workspaceControllergetWorkspaces)
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Gets a workspace
|
|
229
|
+
*/
|
|
230
|
+
workspace = this.query(workspaceControllergetWorkspaceForId)
|
|
231
|
+
/**
|
|
232
|
+
* Get workspaces within user permission
|
|
233
|
+
*/
|
|
234
|
+
workspacesFromUserPermission = this.query(workspaceControllergetWorkspacesFromUserPermission)
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Creates a workspace
|
|
238
|
+
*/
|
|
239
|
+
createWorkspace = this.mutation(workspaceControllersave)
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Updates a workspace
|
|
243
|
+
*/
|
|
244
|
+
updateWorkspace = this.mutation(workspaceControllerupdate)
|
|
245
|
+
|
|
246
|
+
//App and infra
|
|
247
|
+
/**
|
|
248
|
+
* Gets all applications in a Workspace
|
|
249
|
+
*/
|
|
250
|
+
applications = this.query(workspaceApplicationControllergetApplications)
|
|
251
|
+
/**
|
|
252
|
+
* Gets an application
|
|
253
|
+
*/
|
|
254
|
+
application = this.query(workspaceApplicationControllergetApplication)
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Gets the dependencies of an application
|
|
258
|
+
*/
|
|
259
|
+
applicationDependencies = this.query(workspaceApplicationControllergetDependencyTree)
|
|
260
|
+
/**
|
|
261
|
+
* Gets all shared infra in a Workspace
|
|
262
|
+
*/
|
|
263
|
+
allSharedInfra = this.query(workspaceSharedInfrastructureControllergetAllSharedInfrastructure)
|
|
264
|
+
/**
|
|
265
|
+
* Gets a shared infra
|
|
266
|
+
*/
|
|
267
|
+
sharedInfra = this.query(workspaceSharedInfrastructureControllergetSharedInfrastructure)
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Gets the dependencies of a shared infra
|
|
271
|
+
*/
|
|
272
|
+
sharedInfraDependencies = this.query(workspaceSharedInfrastructureControllergetDependencyTree)
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Updates an application
|
|
276
|
+
*/
|
|
277
|
+
updateApplication = this.mutation(workspaceApplicationControllerupdate)
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Updates a shared infra
|
|
281
|
+
*/
|
|
282
|
+
updateInfra = this.mutation(workspaceSharedInfrastructureControllerupdate)
|
|
283
|
+
|
|
284
|
+
// Workflow
|
|
285
|
+
/**
|
|
286
|
+
* Gets a workflow by stack id
|
|
287
|
+
*/
|
|
288
|
+
workflowsByStackId = this.query(workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType)
|
|
289
|
+
/**
|
|
290
|
+
* Gets account workflows
|
|
291
|
+
*/
|
|
292
|
+
accountWorkflows = this.query(workflowAccountControllerlistAccountWorkflows)
|
|
293
|
+
/**
|
|
294
|
+
* Gets workflows from a stack
|
|
295
|
+
*/
|
|
296
|
+
stackWorkflows = this.query(workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType)
|
|
297
|
+
/**
|
|
298
|
+
* Removes account workflow
|
|
299
|
+
*/
|
|
300
|
+
deleteAccountWorkflow = this.mutation(workflowAccountControllerdeleteAccountWorkflow)
|
|
301
|
+
|
|
302
|
+
// Variables Account
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Find all account variables
|
|
306
|
+
* @deprecated consume from Workspace Manager API
|
|
307
|
+
*/
|
|
308
|
+
accountVariables = this.query(accountVariableControllerfindAll)
|
|
309
|
+
/**
|
|
310
|
+
* Get an account variable by name
|
|
311
|
+
* @deprecated consume from Workspace Manager API
|
|
312
|
+
*/
|
|
313
|
+
getAccountVariable = this.query(accountVariableControllerfindByName)
|
|
314
|
+
/**
|
|
315
|
+
* Get account variable usage
|
|
316
|
+
* @deprecated consume from Workspace Manager API
|
|
317
|
+
*/
|
|
318
|
+
accountVariableUsage = this.query(accountVariableControllerusage)
|
|
319
|
+
/**
|
|
320
|
+
* Create account variable
|
|
321
|
+
* @deprecated consume from Workspace Manager API
|
|
322
|
+
*/
|
|
323
|
+
createAccountVariable = this.mutation(accountVariableControllercreate)
|
|
324
|
+
/**
|
|
325
|
+
* Update account variable
|
|
326
|
+
* @deprecated consume from Workspace Manager API
|
|
327
|
+
*/
|
|
328
|
+
updateAccountVariable = this.mutation(accountVariableControllerupdate)
|
|
329
|
+
/**
|
|
330
|
+
* Delete account variable
|
|
331
|
+
* @deprecated consume from Workspace Manager API
|
|
332
|
+
*/
|
|
333
|
+
deleteAccountVariable = this.mutation(accountVariableControllerdelete)
|
|
334
|
+
|
|
335
|
+
// Variables Workspace
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Find all workspace variables
|
|
339
|
+
* @deprecated consume from Workspace Manager API
|
|
340
|
+
*/
|
|
341
|
+
workspaceVariables = this.query(workspaceVariableV2ControllerfindAll)
|
|
342
|
+
/**
|
|
343
|
+
* Get a workspace variable by name
|
|
344
|
+
* @deprecated consume from Workspace Manager API
|
|
345
|
+
*/
|
|
346
|
+
getWorkspaceVariable = this.query(workspaceVariableV2ControllerfindByName)
|
|
347
|
+
/**
|
|
348
|
+
* Updates workspace variable based on existing account variable
|
|
349
|
+
* @deprecated consume from Workspace Manager API
|
|
350
|
+
*/
|
|
351
|
+
updateWorkspaceVariable = this.mutation(workspaceVariableV2Controllerupsert)
|
|
352
|
+
|
|
353
|
+
//Links
|
|
354
|
+
/**
|
|
355
|
+
* Gets shared infra links
|
|
356
|
+
*/
|
|
357
|
+
linksInWorkspace = this.query(workspaceLinkControllergetWorkspaceLinks)
|
|
358
|
+
/**
|
|
359
|
+
* Adds a link to a workspace
|
|
360
|
+
*/
|
|
361
|
+
addLinkInWorkspace = this.mutation(workspaceLinkControllersave)
|
|
362
|
+
/**
|
|
363
|
+
* Deletes a link from a workspace
|
|
364
|
+
*/
|
|
365
|
+
removeLinkFromWorkspace = this.mutation(workspaceLinkControllerdelete)
|
|
366
|
+
/**
|
|
367
|
+
* Gets application link
|
|
368
|
+
*/
|
|
369
|
+
linkInApplication = this.query(applicationLinkControllergetApplicationLink)
|
|
370
|
+
/**
|
|
371
|
+
* Adds a link to an application
|
|
372
|
+
*/
|
|
373
|
+
addLinkInApplication = this.mutation(applicationLinkControllersave)
|
|
374
|
+
/**
|
|
375
|
+
* Deletes a link from an application
|
|
376
|
+
*/
|
|
377
|
+
removeLinkFromApplication = this.mutation(applicationLinkControllerdelete)
|
|
378
|
+
/**
|
|
379
|
+
* Updates a link from an application
|
|
380
|
+
*/
|
|
381
|
+
updateLinkInApplication = this.mutation(applicationLinkControllerupdate)
|
|
382
|
+
/**
|
|
383
|
+
* Updates application links visibility
|
|
384
|
+
*/
|
|
385
|
+
updateLinkVisibilityInApplication = this.mutation(applicationLinkControllerupdateLinksVisibility)
|
|
386
|
+
/**
|
|
387
|
+
* Gets shared infra link
|
|
388
|
+
*/
|
|
389
|
+
linkInInfra = this.query(sharedInfraLinkControllergetSharedInfraLink)
|
|
390
|
+
/**
|
|
391
|
+
* Adds a link to an infra
|
|
392
|
+
*/
|
|
393
|
+
addLinkInInfra = this.mutation(sharedInfraLinkControllersave)
|
|
394
|
+
/**
|
|
395
|
+
* Deletes a link from an infra
|
|
396
|
+
*/
|
|
397
|
+
removeLinkFromInfra = this.mutation(sharedInfraLinkControllerdelete)
|
|
398
|
+
/**
|
|
399
|
+
* Updates a link from an infra
|
|
400
|
+
*/
|
|
401
|
+
updateLinkInInfra = this.mutation(sharedInfraLinkControllerupdate)
|
|
402
|
+
/**
|
|
403
|
+
* Updates infra links visibility
|
|
404
|
+
*/
|
|
405
|
+
updateLinkVisibilityInInfra = this.mutation(sharedInfraLinkControllerupdateLinksVisibility)
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Gets stacks in a workspace. This fn is only used for permission purposes.
|
|
409
|
+
*/
|
|
410
|
+
stacks = this.query(workspaceStackControllergetStacks) as OperationObject<Parameters<typeof workspaceStackControllergetStacks>[0]>
|
|
411
|
+
/**
|
|
412
|
+
* List workspace context inputs for a plugin or action in a stack. This fn is only used for permission purposes.
|
|
413
|
+
*/
|
|
414
|
+
listConsolidatedWorkspaceContext = this.query(contextControllerlistConsolidatedContext) as OperationObject<Parameters<typeof contextControllerlistConsolidatedContext>[0]>
|
|
415
|
+
/**
|
|
416
|
+
* List account context inputs for a plugin or action in a stack. This fn is only used for permission purposes.
|
|
417
|
+
*/
|
|
418
|
+
listConsolidatedContext = this.query(contextControllerlistAccountContext) as OperationObject<Parameters<typeof contextControllerlistAccountContext>[0]>
|
|
419
|
+
/**
|
|
420
|
+
* Save workspace context inputs for a plugin or action in a stack. This fn is only used for permission purposes.
|
|
421
|
+
*/
|
|
422
|
+
saveContextInWorkspace = this.query(contextV2ControlleraddTypedContextInWorkspace) as OperationObject<Parameters<typeof contextV2ControlleraddTypedContextInWorkspace>[0]>
|
|
423
|
+
/**
|
|
424
|
+
* Save workspace context inputs for a plugin or action in the account. This fn is only used for permission purposes.
|
|
425
|
+
*/
|
|
426
|
+
saveContextInAccount = this.query(contextV2ControlleraddTypedContextInAccount) as OperationObject<Parameters<typeof contextV2ControlleraddTypedContextInAccount>[0]>
|
|
427
|
+
/**
|
|
428
|
+
* Add stack to workspace. This fn is only used for permission purposes.
|
|
429
|
+
*/
|
|
430
|
+
addStackInWorkspace = this.query(workspaceStackControlleraddStack) as OperationObject<Parameters<typeof workspaceStackControlleraddStack>[0]>
|
|
431
|
+
/**
|
|
432
|
+
* Removes a stack from a workspace. This fn is only used for permission purposes.
|
|
433
|
+
*/
|
|
434
|
+
removeStackFromWorkspace = this.query(workspaceStackControllerdeleteStack) as OperationObject<Parameters<typeof workspaceStackControllerdeleteStack>[0]>
|
|
435
|
+
/**
|
|
436
|
+
* Gets a stack in a workspace . This fn is only used for permission purposes.
|
|
437
|
+
*/
|
|
438
|
+
stackInWorkspace = this.query(workspaceStackControllergetStackById) as OperationObject<Parameters<typeof workspaceStackControllergetStackById>[0]>
|
|
439
|
+
/**
|
|
440
|
+
* Deletes a workspace . This fn is only used for permission purposes.
|
|
441
|
+
*/
|
|
442
|
+
deleteWorkspace = this.query(workspaceControllerdelete) as OperationObject<Parameters<typeof workspaceControllerdelete>[0]>
|
|
443
|
+
/**
|
|
444
|
+
* Deletes an application. This fn is only used for permission purposes.
|
|
445
|
+
*/
|
|
446
|
+
deleteApplication = this.query(workspaceApplicationControllerdeleteApplication) as OperationObject<Parameters<typeof workspaceApplicationControllerdeleteApplication>[0]>
|
|
447
|
+
/**
|
|
448
|
+
* Deletes an infra. This fn is only used for permission purposes.
|
|
449
|
+
*/
|
|
450
|
+
deleteInfra = this.query(workspaceSharedInfrastructureControllerdeleteSharedInfra) as OperationObject<Parameters<typeof workspaceSharedInfrastructureControllerdeleteSharedInfra>[0]>
|
|
451
|
+
/**
|
|
452
|
+
* Gets the detail of an application. This fn is only used for permission purposes.
|
|
453
|
+
*/
|
|
454
|
+
applicationDetail = this.query(workspaceApplicationControllergetApplication) as OperationObject<Parameters<typeof workspaceApplicationControllergetApplication>[0]>
|
|
455
|
+
/**
|
|
456
|
+
* Gets the detail of an infra. This fn is only used for permission purposes.
|
|
457
|
+
*/
|
|
458
|
+
infraDetail = this.query(workspaceSharedInfrastructureControllergetSharedInfrastructure) as OperationObject<Parameters<typeof workspaceSharedInfrastructureControllergetSharedInfrastructure>[0]>
|
|
459
|
+
/**
|
|
460
|
+
* Get all workspaces without stack version and favorites filter
|
|
461
|
+
*/
|
|
462
|
+
getWorkspacesWithoutStackFilter = this.query(workspaceV2ControllergetWorkspacesWithoutStackFilter)
|
|
463
|
+
/**
|
|
464
|
+
* List all stacks with context for given account and given stackVersionId list.
|
|
465
|
+
*/
|
|
466
|
+
stacksVersionWithContext = this.mutation(contextControllerlistStackVersionsWithAccountContext)
|
|
467
|
+
/**
|
|
468
|
+
* import context of stack in workspace
|
|
469
|
+
* used to control permission
|
|
470
|
+
*/
|
|
471
|
+
importStackContextInWorkspace = this.mutation(contextV2ControllerimportContextInWorkspace)
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* import context of stack in account
|
|
475
|
+
* used to control permission
|
|
476
|
+
*/
|
|
477
|
+
importStackContextInAccount = this.mutation(contextV2ControllerimportContextInAccount)
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export const workspaceClient = new WorkspaceClient()
|