@stack-spot/portal-network 0.27.2 → 0.28.0-beta

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/api/apiManagement.d.ts +289 -0
  3. package/dist/api/apiManagement.d.ts.map +1 -0
  4. package/dist/api/apiManagement.js +143 -0
  5. package/dist/api/apiManagement.js.map +1 -0
  6. package/dist/api/workspace.d.ts +320 -216
  7. package/dist/api/workspace.d.ts.map +1 -1
  8. package/dist/api/workspace.js +255 -184
  9. package/dist/api/workspace.js.map +1 -1
  10. package/dist/api/workspaceManager.d.ts +320 -218
  11. package/dist/api/workspaceManager.d.ts.map +1 -1
  12. package/dist/api/workspaceManager.js +68 -20
  13. package/dist/api/workspaceManager.js.map +1 -1
  14. package/dist/apis.json +8 -8
  15. package/dist/client/content.d.ts +52 -0
  16. package/dist/client/content.d.ts.map +1 -1
  17. package/dist/client/content.js +64 -1
  18. package/dist/client/content.js.map +1 -1
  19. package/dist/client/notification.d.ts +1 -1
  20. package/dist/client/types.d.ts +29 -0
  21. package/dist/client/types.d.ts.map +1 -1
  22. package/dist/client/workspace-manager.d.ts +121 -0
  23. package/dist/client/workspace-manager.d.ts.map +1 -0
  24. package/dist/client/workspace-manager.js +204 -0
  25. package/dist/client/workspace-manager.js.map +1 -0
  26. package/dist/client/workspace.d.ts +105 -22
  27. package/dist/client/workspace.d.ts.map +1 -1
  28. package/dist/client/workspace.js +156 -74
  29. package/dist/client/workspace.js.map +1 -1
  30. package/dist/index.d.ts +1 -0
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +1 -0
  33. package/dist/index.js.map +1 -1
  34. package/dist/network/ManualOperation.js +1 -1
  35. package/package.json +1 -1
  36. package/src/api/apiManagement.ts +498 -0
  37. package/src/api/workspace.ts +497 -288
  38. package/src/api/workspaceManager.ts +402 -234
  39. package/src/apis.json +8 -8
  40. package/src/client/content.ts +42 -2
  41. package/src/client/types.ts +38 -0
  42. package/src/client/workspace-manager.ts +171 -0
  43. package/src/client/workspace.ts +180 -123
  44. package/src/index.ts +1 -1
  45. package/src/network/ManualOperation.ts +1 -1
@@ -1,66 +1,83 @@
1
+ /* eslint-disable max-len */
1
2
  import { HttpError } from '@oazapfts/runtime'
2
3
  import {
3
- checkConnectionSlugAvailability,
4
- save5 as createEmbeddedLink,
4
+ accountVariableControllercreate,
5
+ accountVariableControllerdelete,
6
+ accountVariableControllerfindAll,
7
+ accountVariableControllerfindByName,
8
+ accountVariableControllerupdate,
9
+ accountVariableControllerusage,
10
+ applicationControllergetApplication,
11
+ applicationControllergetApplications,
12
+ applicationControllergetDependencyTree,
13
+ applicationControllerupdate,
14
+ applicationEmbeddedLinkControllerdelete,
15
+ applicationEmbeddedLinkControllergetEmbeddedLink,
16
+ applicationEmbeddedLinkControllergetEmbeddedLinks,
17
+ applicationEmbeddedLinkControllersave,
18
+ applicationEmbeddedLinkControllerupdate,
19
+ applicationEmbeddedLinkControllerupsertBatch,
20
+ applicationLinkControllerdelete,
21
+ applicationLinkControllergetApplicationLink,
22
+ applicationLinkControllersave,
23
+ applicationLinkControllerupdate,
24
+ applicationLinkControllerupdateLinksVisibility,
25
+ availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAnApplication,
26
+ availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAWorkspace,
27
+ checkConnectionSlugAvailabilityControllercheckConnectionSlugAvailability,
28
+ connectionInterfaceControllerdeleteConnectionInterfaceAttributesFromEnvironment,
29
+ connectionInterfaceControllerdeleteConnectionInterfaceFromAllEnvironments,
30
+ connectionInterfaceControllergetConnectionInterface,
31
+ connectionInterfaceControllergetConnectionInterfaces,
32
+ connectionInterfaceControllerupdateConnectionInterfaceAttributes,
33
+ connectionInterfaceControllerupdateConnectionInterfaceVisibility,
34
+ contextControlleraddTypedContextInAccount,
35
+ contextControlleraddTypedContextInWorkspace,
36
+ contextControllerlistAccountContext,
37
+ contextControllerlistConsolidatedContext,
5
38
  defaults,
6
- delete1,
7
- delete2,
8
- delete3,
9
- delete5,
10
- deleteAccountWorkflow,
11
- delete6 as deleteApplicationEmbeddedLinks,
12
- deleteConnectionInterfaceAttributesFromEnvironment, deleteConnectionInterfaceFromAllEnvironments,
13
- delete4 as deleteEmbeddedLink,
14
- findAll,
15
- getEmbeddedLinks1 as getAllApplicationEmbeddedLinks,
16
- getAllSharedInfrastructure,
17
- getApplication,
18
- getEmbeddedLink1 as getApplicationEmbeddedLinks,
19
- getApplicationLink,
20
- getApplications,
21
- getAvailableConnectionInterfaceForAnApplication,
22
- getAvailableConnectionInterfaceForAWorkspace,
23
- getConnectionInterface, getConnectionInterfaces,
24
- getDependencyTree,
25
- getDependencyTree1,
26
- getEmbeddedLink, getEmbeddedLinks, getEnvironment, getEnvironments,
27
- getSharedInfraLink,
28
- getSharedInfrastructure,
29
- getV1WorkspacesByWorkspaceIdVariablesAndName,
30
- getWorkspaceForId,
31
- getWorkspaceLinks,
32
- getWorkspaces,
33
- getWorkspacesFromUserPermission,
34
- listAccountWorkflows,
35
- listWorkflowByStackIdAndWorkflowType,
36
- save,
37
- save1,
38
- save3,
39
- save4,
40
- save7,
41
- save8 as saveApplicationEmbeddedLinks,
42
- save9 as saveEnvironment,
43
- update,
44
- update1,
45
- update2,
46
- update3,
47
- update6,
48
- update7,
49
- upsertBatch2 as updateAllApplicationEmbeddedLinks,
50
- upsertBatch1 as updateAllEmbeddedLink,
51
- update8 as updateApplicationEmbeddedLinks,
52
- updateConnectionInterfaceAttributes,
53
- updateConnectionInterfaceVisibility,
54
- update5 as updateEmbeddedLink,
55
- update9 as updateEnvironment,
56
- updateLinksVisibility,
57
- updateLinksVisibility1,
39
+ environmentControllergetEnvironment,
40
+ environmentControllergetEnvironments,
41
+ environmentControllersave,
42
+ environmentControllerupdate,
43
+ sharedInfraLinkControllerdelete,
44
+ sharedInfraLinkControllergetSharedInfraLink,
45
+ sharedInfraLinkControllersave,
46
+ sharedInfraLinkControllerupdate,
47
+ sharedInfraLinkControllerupdateLinksVisibility,
48
+ sharedInfrastructureControllergetAllSharedInfrastructure,
49
+ sharedInfrastructureControllergetDependencyTree,
50
+ sharedInfrastructureControllergetSharedInfrastructure,
51
+ sharedInfrastructureControllerupdate,
52
+ workflowAccountControllerdeleteAccountWorkflow,
53
+ workflowAccountControllerlistAccountWorkflows,
54
+ workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType,
55
+ workspaceControllergetWorkspaceForId,
56
+ workspaceControllergetWorkspaces,
57
+ workspaceControllergetWorkspacesFromUserPermission,
58
+ workspaceControllersave,
59
+ workspaceControllerupdate,
60
+ workspaceEmbeddedLinkControllerdelete,
61
+ workspaceEmbeddedLinkControllergetEmbeddedLink,
62
+ workspaceEmbeddedLinkControllergetEmbeddedLinks,
63
+ workspaceEmbeddedLinkControllersave,
64
+ workspaceEmbeddedLinkControllerupdate,
65
+ workspaceEmbeddedLinkControllerupsertBatch,
66
+ workspaceLinkControllerdelete,
67
+ workspaceLinkControllergetWorkspaceLinks,
68
+ workspaceLinkControllersave,
69
+ workspaceStackControllergetStacks,
70
+ workspaceVariableV2ControllerfindAll,
71
+ workspaceVariableV2ControllerfindByName,
72
+ workspaceVariableV2Controllerupsert,
58
73
  } from '../api/workspace'
74
+
59
75
  import apis from '../apis.json'
60
76
  import { DefaultAPIError } from '../error/DefaultAPIError'
61
77
  import { workspaceDictionary } from '../error/dictionary/workspace'
62
78
  import { StackspotAPIError } from '../error/StackspotAPIError'
63
79
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
80
+ import { OperationObject } from '../network/types'
64
81
 
65
82
  class WorkspaceClient extends ReactQueryNetworkClient {
66
83
  constructor() {
@@ -70,284 +87,324 @@ class WorkspaceClient extends ReactQueryNetworkClient {
70
87
  protected buildStackSpotError(error: HttpError): StackspotAPIError {
71
88
  return new DefaultAPIError(error.data, error.status, workspaceDictionary, error.headers)
72
89
  }
73
-
90
+
74
91
  /**
75
92
  * Gets all connection interfaces from a workspace
76
93
  */
77
- allConnectionInterfaces = this.query(getConnectionInterfaces)
94
+ allConnectionInterfaces = this.query(connectionInterfaceControllergetConnectionInterfaces)
78
95
 
79
96
  /**
80
97
  * Gets a connection interface from a workspace
81
98
  */
82
- connectionInterface = this.query(getConnectionInterface)
99
+ connectionInterface = this.query(connectionInterfaceControllergetConnectionInterface)
83
100
  /**
84
101
  * Get available connection interface for a workspace by connection interface slug
85
102
  */
86
- workspaceAvailableConnInterfaceBySlug = this.query(getAvailableConnectionInterfaceForAWorkspace)
103
+ workspaceAvailableConnInterfaceBySlug = this.query(availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAWorkspace)
87
104
  /**
88
105
  * Get available connection interface for an application by connection interface slug
89
106
  */
90
- applicationAvailableConnInterface = this.query(getAvailableConnectionInterfaceForAnApplication)
107
+ applicationAvailableConnInterface = this.query(availableConnectionInterfaceV2ControllergetAvailableConnectionInterfaceForAnApplication)
91
108
  /**
92
109
  * Updates the visibility of a connection interface
93
110
  */
94
- updateConnectionInterfaceVisibility = this.mutation(updateConnectionInterfaceVisibility)
111
+ updateConnectionInterfaceVisibility = this.mutation(connectionInterfaceControllerupdateConnectionInterfaceVisibility)
95
112
 
96
113
  /**
97
114
  * Removes a connection interface
98
115
  */
99
- deleteConnectionInterface = this.mutation(deleteConnectionInterfaceFromAllEnvironments)
116
+ deleteConnectionInterface = this.mutation(connectionInterfaceControllerdeleteConnectionInterfaceFromAllEnvironments)
100
117
 
101
118
  /**
102
119
  * Removes connection interface attributes by environment
103
120
  */
104
- deleteConnectionInterfaceAttributesFromEnvironment = this.mutation(deleteConnectionInterfaceAttributesFromEnvironment)
121
+ deleteConnectionInterfaceAttributesFromEnvironment = this.mutation(connectionInterfaceControllerdeleteConnectionInterfaceAttributesFromEnvironment)
105
122
 
106
123
  /**
107
124
  * Updates the attributes of a connection interface
108
125
  */
109
- updateConnectionInterfaceAttributes = this.mutation(updateConnectionInterfaceAttributes)
126
+ updateConnectionInterfaceAttributes = this.mutation(connectionInterfaceControllerupdateConnectionInterfaceAttributes)
110
127
  /**
111
128
  * Checks the availability of a connection interface slug.
112
129
  */
113
- checkConnectionInterfaceAvailability = this.query(checkConnectionSlugAvailability)
130
+ checkConnectionInterfaceAvailability = this.query(checkConnectionSlugAvailabilityControllercheckConnectionSlugAvailability)
114
131
 
115
132
  /**
116
133
  * Gets all environments
117
134
  */
118
- environments = this.query(getEnvironments)
135
+ environments = this.query(environmentControllergetEnvironments)
119
136
 
120
137
  /**
121
138
  * Gets environment by Id
122
139
  */
123
- environment = this.query(getEnvironment)
140
+ environment = this.query(environmentControllergetEnvironment)
124
141
 
125
142
  /**
126
143
  * Creates an environment
127
144
  */
128
- createEnvironment = this.mutation(saveEnvironment)
145
+ createEnvironment = this.mutation(environmentControllersave)
129
146
 
130
147
  /**
131
148
  * Updates environment data
132
149
  */
133
- updateEnvironment = this.mutation(updateEnvironment)
150
+ updateEnvironment = this.mutation(environmentControllerupdate)
134
151
 
135
152
  /**
136
153
  * Gets embedded link by id
137
154
  */
138
- embeddedLinkInWorkspace = this.query(getEmbeddedLink)
155
+ embeddedLinkInWorkspace = this.query(workspaceEmbeddedLinkControllergetEmbeddedLink)
139
156
 
140
157
  /**
141
158
  * Gets all embedded links from a workspace
142
159
  */
143
- allEmbeddedLinksInWorkspace = this.query(getEmbeddedLinks)
160
+ allEmbeddedLinksInWorkspace = this.query(workspaceEmbeddedLinkControllergetEmbeddedLinks)
144
161
 
145
162
  /**
146
163
  * Creates an embedded link in a workspace
147
164
  */
148
- createEmbeddedLinkInWorkspace = this.mutation(createEmbeddedLink)
165
+ createEmbeddedLinkInWorkspace = this.mutation(workspaceEmbeddedLinkControllersave)
149
166
 
150
167
  /**
151
168
  * Deletes an embedded link from a workspace
152
169
  */
153
- deleteEmbeddedLinkFromWorkspace = this.mutation(deleteEmbeddedLink)
170
+ deleteEmbeddedLinkFromWorkspace = this.mutation(workspaceEmbeddedLinkControllerdelete)
154
171
 
155
172
  /**
156
173
  * Updates an embedded link from a workspace
157
174
  */
158
- updateEmbeddedLinkInWorkspace = this.mutation(updateEmbeddedLink)
175
+ updateEmbeddedLinkInWorkspace = this.mutation(workspaceEmbeddedLinkControllerupdate)
159
176
 
160
177
  /**
161
178
  * Updates all embedded links from a workspace
162
179
  */
163
- updateAllEmbeddedLinksInWorkspace = this.mutation(updateAllEmbeddedLink)
180
+ updateAllEmbeddedLinksInWorkspace = this.mutation(workspaceEmbeddedLinkControllerupsertBatch)
164
181
 
165
182
  /**
166
183
  * Gets an embedded link from an application
167
184
  */
168
- embeddedLinkInApplication = this.query(getApplicationEmbeddedLinks)
185
+ embeddedLinkInApplication = this.query(applicationEmbeddedLinkControllergetEmbeddedLink)
169
186
 
170
187
  /**
171
188
  * Gets all embedded links from an application
172
189
  */
173
- allEmbeddedLinksInApplication = this.query(getAllApplicationEmbeddedLinks)
190
+ allEmbeddedLinksInApplication = this.query(applicationEmbeddedLinkControllergetEmbeddedLinks)
174
191
 
175
192
  /**
176
193
  * Creates an embedded link in an application
177
194
  */
178
- createEmbeddedLinkInApplication = this.mutation(saveApplicationEmbeddedLinks)
195
+ createEmbeddedLinkInApplication = this.mutation(applicationEmbeddedLinkControllersave)
179
196
 
180
197
  /**
181
198
  * Deletes an embedded link from an application
182
199
  */
183
- deleteEmbeddedLinkFromApplication = this.mutation(deleteApplicationEmbeddedLinks)
200
+ deleteEmbeddedLinkFromApplication = this.mutation(applicationEmbeddedLinkControllerdelete)
184
201
 
185
202
  /**
186
203
  * Updates an embedded link in an application
187
204
  */
188
- updateEmbeddedLinkInApplication = this.mutation(updateApplicationEmbeddedLinks)
205
+ updateEmbeddedLinkInApplication = this.mutation(applicationEmbeddedLinkControllerupdate)
189
206
 
190
207
  /**
191
208
  * Updates all embedded links in an application
192
209
  */
193
- updateAllEmbeddedLinksInApplication = this.mutation(updateAllApplicationEmbeddedLinks)
210
+ updateAllEmbeddedLinksInApplication = this.mutation(applicationEmbeddedLinkControllerupsertBatch)
194
211
 
195
212
  /**
196
213
  * Gets all workspaces
197
214
  */
198
- workspaces = this.query(getWorkspaces)
215
+ workspaces = this.query(workspaceControllergetWorkspaces)
199
216
 
200
217
  /**
201
218
  * Gets a workspace
202
219
  */
203
- workspace = this.query(getWorkspaceForId)
220
+ workspace = this.query(workspaceControllergetWorkspaceForId)
204
221
  /**
205
222
  * Get workspaces within user permission
206
223
  */
207
- workspacesFromUserPermission = this.query(getWorkspacesFromUserPermission)
224
+ workspacesFromUserPermission = this.query(workspaceControllergetWorkspacesFromUserPermission)
208
225
 
209
226
  /**
210
227
  * Creates a workspace
211
228
  */
212
- createWorkspace = this.mutation(save)
229
+ createWorkspace = this.mutation(workspaceControllersave)
213
230
 
214
231
  /**
215
232
  * Updates a workspace
216
233
  */
217
- updateWorkspace = this.mutation(update1)
234
+ updateWorkspace = this.mutation(workspaceControllerupdate)
218
235
 
219
236
  //App and infra
220
237
  /**
221
238
  * Gets all applications in a Workspace
222
239
  */
223
- applications = this.query(getApplications)
240
+ applications = this.query(applicationControllergetApplications)
224
241
  /**
225
242
  * Gets an application
226
243
  */
227
- application = this.query(getApplication)
244
+ application = this.query(applicationControllergetApplication)
228
245
 
229
246
  /**
230
247
  * Gets the dependencies of an application
231
248
  */
232
- applicationDependencies = this.query(getDependencyTree1)
249
+ applicationDependencies = this.query(applicationControllergetDependencyTree)
233
250
  /**
234
251
  * Gets all shared infra in a Workspace
235
252
  */
236
- allSharedInfra = this.query(getAllSharedInfrastructure)
253
+ allSharedInfra = this.query(sharedInfrastructureControllergetAllSharedInfrastructure)
237
254
  /**
238
255
  * Gets a shared infra
239
256
  */
240
- sharedInfra = this.query(getSharedInfrastructure)
257
+ sharedInfra = this.query(sharedInfrastructureControllergetSharedInfrastructure)
241
258
 
242
259
  /**
243
260
  * Gets the dependencies of a shared infra
244
261
  */
245
- sharedInfraDependencies = this.query(getDependencyTree)
262
+ sharedInfraDependencies = this.query(sharedInfrastructureControllergetDependencyTree)
246
263
 
247
264
  /**
248
265
  * Updates an application
249
266
  */
250
- updateApplication = this.mutation(update6)
267
+ updateApplication = this.mutation(applicationControllerupdate)
251
268
 
252
269
  /**
253
270
  * Updates a shared infra
254
271
  */
255
- updateInfra = this.mutation(update2)
272
+ updateInfra = this.mutation(sharedInfrastructureControllerupdate)
256
273
 
257
274
  // Workflow
258
275
  /**
259
276
  * Gets a workflow by stack id
260
277
  */
261
- workflowsByStackId = this.query(listWorkflowByStackIdAndWorkflowType)
278
+ workflowsByStackId = this.query(workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType)
262
279
  /**
263
280
  * Gets account workflows
264
281
  */
265
- accountWorkflows = this.query(listAccountWorkflows)
282
+ accountWorkflows = this.query(workflowAccountControllerlistAccountWorkflows)
266
283
  /**
267
284
  * Gets workflows from a stack
268
285
  */
269
- stackWorkflows = this.query(listWorkflowByStackIdAndWorkflowType)
286
+ stackWorkflows = this.query(workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType)
270
287
  /**
271
288
  * Removes account workflow
272
289
  */
273
- deleteAccountWorkflow = this.mutation(deleteAccountWorkflow)
290
+ deleteAccountWorkflow = this.mutation(workflowAccountControllerdeleteAccountWorkflow)
274
291
 
275
- // Variable
292
+ // Variables Account
293
+
294
+ /**
295
+ * Find all account variables
296
+ */
297
+ accountVariables = this.query(accountVariableControllerfindAll)
276
298
  /**
277
- * Gets all workspace variables
299
+ * Get an account variable by name
278
300
  */
279
- variables = this.query(findAll)
301
+ getAccountVariable = this.query(accountVariableControllerfindByName)
280
302
  /**
281
- * Creates a workspace variable
303
+ * Get account variable usage
282
304
  */
283
- createVariable = this.mutation(save1)
305
+ accountVariableUsage = this.query(accountVariableControllerusage)
284
306
  /**
285
- * Gets a variable by name
307
+ * Create account variable
286
308
  */
287
- variable = this.query(getV1WorkspacesByWorkspaceIdVariablesAndName)
309
+ createAccountVariable = this.mutation(accountVariableControllercreate)
288
310
  /**
289
- * Updates a workspace variable
311
+ * Update account variable
290
312
  */
291
- updateVariable = this.mutation(update)
313
+ updateAccountVariable = this.mutation(accountVariableControllerupdate)
292
314
  /**
293
- * Deletes a workspace variable
315
+ * Delete account variable
294
316
  */
295
- deleteVariable = this.mutation(delete1)
317
+ deleteAccountVariable = this.mutation(accountVariableControllerdelete)
296
318
 
319
+ // Variables Workspace
320
+
321
+ /**
322
+ * Find all workspace variables
323
+ */
324
+ workspaceVariables = this.query(workspaceVariableV2ControllerfindAll)
325
+ /**
326
+ * Get a workspace variable by name
327
+ */
328
+ getWorkspaceVariable = this.query(workspaceVariableV2ControllerfindByName)
329
+ /**
330
+ * Upsert workspace variable based on existing account variable
331
+ */
332
+ updateWorkspaceVariable = this.mutation(workspaceVariableV2Controllerupsert)
333
+
297
334
  //Links
298
335
  /**
299
336
  * Gets shared infra links
300
337
  */
301
- linksInWorkspace = this.query(getWorkspaceLinks)
338
+ linksInWorkspace = this.query(workspaceLinkControllergetWorkspaceLinks)
302
339
  /**
303
340
  * Adds a link to a workspace
304
341
  */
305
- addLinkInWorkspace = this.mutation(save4)
342
+ addLinkInWorkspace = this.mutation(workspaceLinkControllersave)
306
343
  /**
307
344
  * Deletes a link from a workspace
308
345
  */
309
- removeLinkFromWorkspace = this.mutation(delete3)
346
+ removeLinkFromWorkspace = this.mutation(workspaceLinkControllerdelete)
310
347
  /**
311
348
  * Gets application link
312
349
  */
313
- linkInApplication = this.query(getApplicationLink)
350
+ linkInApplication = this.query(applicationLinkControllergetApplicationLink)
314
351
  /**
315
352
  * Adds a link to an application
316
353
  */
317
- addLinkInApplication = this.mutation(save7)
354
+ addLinkInApplication = this.mutation(applicationLinkControllersave)
318
355
  /**
319
356
  * Deletes a link from an application
320
357
  */
321
- removeLinkFromApplication = this.mutation(delete5)
358
+ removeLinkFromApplication = this.mutation(applicationLinkControllerdelete)
322
359
  /**
323
360
  * Updates a link from an application
324
361
  */
325
- updateLinkInApplication = this.mutation(update7)
362
+ updateLinkInApplication = this.mutation(applicationLinkControllerupdate)
326
363
  /**
327
364
  * Updates application links visibility
328
365
  */
329
- updateLinkVisibilityInApplication = this.mutation(updateLinksVisibility1)
366
+ updateLinkVisibilityInApplication = this.mutation(applicationLinkControllerupdateLinksVisibility)
330
367
  /**
331
368
  * Gets shared infra link
332
369
  */
333
- linkInInfra = this.query(getSharedInfraLink)
370
+ linkInInfra = this.query(sharedInfraLinkControllergetSharedInfraLink)
334
371
  /**
335
372
  * Adds a link to an infra
336
373
  */
337
- addLinkInInfra = this.mutation(save3)
374
+ addLinkInInfra = this.mutation(sharedInfraLinkControllersave)
338
375
  /**
339
376
  * Deletes a link from an infra
340
377
  */
341
- removeLinkFromInfra = this.mutation(delete2)
378
+ removeLinkFromInfra = this.mutation(sharedInfraLinkControllerdelete)
342
379
  /**
343
380
  * Updates a link from an infra
344
381
  */
345
- updateLinkInInfra = this.mutation(update3)
382
+ updateLinkInInfra = this.mutation(sharedInfraLinkControllerupdate)
346
383
  /**
347
- * Updates infra links visibility
348
- */
349
- updateLinkVisibilityInInfra = this.mutation(updateLinksVisibility)
384
+ * Updates infra links visibility
385
+ */
386
+ updateLinkVisibilityInInfra = this.mutation(sharedInfraLinkControllerupdateLinksVisibility)
350
387
 
388
+ /**
389
+ * Gets stacks in a workspace. This fn is only used for permission purposes.
390
+ */
391
+ stacks = this.query(workspaceStackControllergetStacks) as OperationObject<Parameters<typeof workspaceStackControllergetStacks>[0]>
392
+ /**
393
+ * List workspace context inputs for a plugin or action in a stack. This fn is only used for permission purposes.
394
+ */
395
+ listConsolidatedWorkspaceContext = this.query(contextControllerlistConsolidatedContext) as OperationObject<Parameters<typeof contextControllerlistConsolidatedContext>[0]>
396
+ /**
397
+ * List account context inputs for a plugin or action in a stack. This fn is only used for permission purposes.
398
+ */
399
+ listConsolidatedContext = this.query(contextControllerlistAccountContext) as OperationObject<Parameters<typeof contextControllerlistAccountContext>[0]>
400
+ /**
401
+ * Save workspace context inputs for a plugin or action in a stack. This fn is only used for permission purposes.
402
+ */
403
+ saveContextInWorkspace = this.query(contextControlleraddTypedContextInWorkspace) as OperationObject<Parameters<typeof contextControlleraddTypedContextInWorkspace>[0]>
404
+ /**
405
+ * Save workspace context inputs for a plugin or action in a stack. This fn is only used for permission purposes.
406
+ */
407
+ saveContextInAccount = this.query(contextControlleraddTypedContextInAccount) as OperationObject<Parameters<typeof contextControlleraddTypedContextInAccount>[0]>
351
408
  }
352
409
 
353
410
  export const workspaceClient = new WorkspaceClient()
package/src/index.ts CHANGED
@@ -9,6 +9,7 @@ export { secretsClient } from './client/secrets'
9
9
  export * from './client/types'
10
10
  export { workflowClient } from './client/workflow'
11
11
  export { workspaceClient } from './client/workspace'
12
+ export { workspaceManagerClient } from './client/workspace-manager'
12
13
  export { workspaceSearchClient } from './client/workspace-search'
13
14
  export { DefaultAPIError } from './error/DefaultAPIError'
14
15
  export { StackspotAPIError } from './error/StackspotAPIError'
@@ -16,4 +17,3 @@ export { NetworkClient } from './network/NetworkClient'
16
17
  export { queryClient } from './network/react-query-client'
17
18
  export { OperationResult, OperationVariables, UseQueryObjectOptions } from './network/types'
18
19
  export { useExtendedList } from './utils/use-extended-list'
19
-
@@ -39,7 +39,7 @@ export abstract class ManualOperation<Variables extends Record<string, any> | vo
39
39
  its arity is zero. We can use this information to determine what the type of `args` actually is at runtime. If variables are accepted,
40
40
  than the 1st argument is the variables and the 2nd is the query options, otherwise, it has a single argument, which is the query
41
41
  options. */
42
- const [variables, options] = this.config.permission.length === 2 ? args : [undefined, args[0]]
42
+ const [variables, options] = this.config.permission.length === 1 ? args : [undefined, args[0]]
43
43
  const result = useQuery({
44
44
  ...options,
45
45
  queryKey: this.getPermissionKey(variables as Variables),