@stack-spot/portal-network 0.82.2 → 0.83.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 +14 -0
- package/dist/api/workspace-ai.d.ts +17 -15
- package/dist/api/workspace-ai.d.ts.map +1 -1
- package/dist/api/workspace-ai.js +14 -12
- package/dist/api/workspace-ai.js.map +1 -1
- package/dist/api/workspaceManager.d.ts +68 -27
- package/dist/api/workspaceManager.d.ts.map +1 -1
- package/dist/api/workspaceManager.js +19 -5
- package/dist/api/workspaceManager.js.map +1 -1
- package/dist/client/workspace-ai.d.ts +13 -12
- package/dist/client/workspace-ai.d.ts.map +1 -1
- package/dist/client/workspace-ai.js +12 -12
- package/dist/client/workspace-ai.js.map +1 -1
- package/dist/client/workspace-manager.d.ts +46 -0
- package/dist/client/workspace-manager.d.ts.map +1 -1
- package/dist/client/workspace-manager.js +59 -4
- package/dist/client/workspace-manager.js.map +1 -1
- package/package.json +1 -1
- package/src/api/workspace-ai.ts +24 -20
- package/src/api/workspaceManager.ts +82 -29
- package/src/client/workspace-ai.ts +23 -23
- package/src/client/workspace-manager.ts +45 -6
|
@@ -3,17 +3,17 @@ import { AgentResponse } from '../api/agent'
|
|
|
3
3
|
import { GetAiStackResponse, KnowledgeSourceItemResponse, QuickCommandResponse } from '../api/ai'
|
|
4
4
|
import {
|
|
5
5
|
addPermissionV1WorkspacesWorkspaceIdPermissionsPatch,
|
|
6
|
-
|
|
6
|
+
addContentV1WorkspacesWorkspaceIdContentTypePost,
|
|
7
7
|
createWorkspaceV1WorkspacesPost,
|
|
8
8
|
defaults,
|
|
9
9
|
deleteWorkspaceV1WorkspacesWorkspaceIdDelete,
|
|
10
10
|
getWorkspaceByIdV1WorkspacesIdGet,
|
|
11
11
|
HttpValidationError,
|
|
12
|
-
|
|
12
|
+
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet,
|
|
13
13
|
listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet,
|
|
14
14
|
listWorkspacesV1WorkspacesGet,
|
|
15
15
|
removePermissionV1WorkspacesWorkspaceIdPermissionsDelete,
|
|
16
|
-
|
|
16
|
+
removeContentV1WorkspacesWorkspaceIdContentTypeContentIdDelete,
|
|
17
17
|
updateWorkspaceV1WorkspacesWorkspaceIdPatch,
|
|
18
18
|
} from '../api/workspace-ai'
|
|
19
19
|
import apis from '../apis.json'
|
|
@@ -46,63 +46,63 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
46
46
|
name: 'addResourceTypeToWorkspaceAi',
|
|
47
47
|
request: (
|
|
48
48
|
signal,
|
|
49
|
-
variables: Omit<Parameters<typeof
|
|
49
|
+
variables: Omit<Parameters<typeof addContentV1WorkspacesWorkspaceIdContentTypePost>[0], 'authorization'>,
|
|
50
50
|
) =>
|
|
51
|
-
|
|
51
|
+
addContentV1WorkspacesWorkspaceIdContentTypePost({ ...variables, authorization: '' },
|
|
52
52
|
{ signal }) as unknown as Promise<FixedAddResourceToWorkspaceAi>,
|
|
53
|
-
permission: this.createPermissionFunctionFor(
|
|
53
|
+
permission: this.createPermissionFunctionFor(addContentV1WorkspacesWorkspaceIdContentTypePost),
|
|
54
54
|
})
|
|
55
55
|
|
|
56
56
|
getKSFromWorkspaceAi = this.query({
|
|
57
57
|
name: 'KsWorkspaceAi',
|
|
58
58
|
request: (
|
|
59
59
|
signal,
|
|
60
|
-
variables: Omit<Parameters<typeof
|
|
61
|
-
'authorization' | '
|
|
60
|
+
variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
|
|
61
|
+
'authorization' | 'contentType'>,
|
|
62
62
|
) =>
|
|
63
|
-
|
|
63
|
+
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'knowledge_source', authorization: '' },
|
|
64
64
|
{ signal }) as unknown as Promise<KnowledgeSourceItemResponse[]>,
|
|
65
|
-
permission: this.createPermissionFunctionFor(
|
|
65
|
+
permission: this.createPermissionFunctionFor(listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet),
|
|
66
66
|
})
|
|
67
67
|
|
|
68
68
|
getStackFromWorkspaceAi = this.query({
|
|
69
69
|
name: 'StackWorkspaceAi',
|
|
70
70
|
request: (
|
|
71
71
|
signal,
|
|
72
|
-
variables: Omit<Parameters<typeof
|
|
73
|
-
'authorization' | '
|
|
72
|
+
variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
|
|
73
|
+
'authorization' | 'contentType'>,
|
|
74
74
|
) =>
|
|
75
|
-
|
|
75
|
+
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'stack', authorization: '' },
|
|
76
76
|
{ signal }) as unknown as Promise<GetAiStackResponse[]>,
|
|
77
|
-
permission: this.createPermissionFunctionFor(
|
|
77
|
+
permission: this.createPermissionFunctionFor(listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet),
|
|
78
78
|
})
|
|
79
79
|
|
|
80
80
|
getQCFromWorkspaceAi = this.query({
|
|
81
81
|
name: 'QcWorkspaceAi',
|
|
82
82
|
request: (
|
|
83
83
|
signal,
|
|
84
|
-
variables: Omit<Parameters<typeof
|
|
85
|
-
'authorization' | '
|
|
84
|
+
variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
|
|
85
|
+
'authorization' | 'contentType'>,
|
|
86
86
|
) =>
|
|
87
|
-
|
|
87
|
+
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'quick_command', authorization: '' },
|
|
88
88
|
{ signal }) as unknown as Promise<QuickCommandResponse[]>,
|
|
89
|
-
permission: this.createPermissionFunctionFor(
|
|
89
|
+
permission: this.createPermissionFunctionFor(listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet),
|
|
90
90
|
})
|
|
91
91
|
|
|
92
92
|
getAgentFromWorkspaceAi = this.query({
|
|
93
93
|
name: 'AgentWorkspaceAi',
|
|
94
94
|
request: (
|
|
95
95
|
signal,
|
|
96
|
-
variables: Omit<Parameters<typeof
|
|
97
|
-
'authorization' | '
|
|
96
|
+
variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
|
|
97
|
+
'authorization' | 'contentType'>,
|
|
98
98
|
) =>
|
|
99
|
-
|
|
99
|
+
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'agent', authorization: '' },
|
|
100
100
|
{ signal }) as unknown as Promise<AgentResponse[]>,
|
|
101
|
-
permission: this.createPermissionFunctionFor(
|
|
101
|
+
permission: this.createPermissionFunctionFor(listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet),
|
|
102
102
|
})
|
|
103
103
|
|
|
104
104
|
deleteResourceTypeFromWorkspaceAi = this.mutation(removeAuthorizationParam(
|
|
105
|
-
|
|
105
|
+
removeContentV1WorkspacesWorkspaceIdContentTypeContentIdDelete))
|
|
106
106
|
addPermissionToWorkspaceAi = this.mutation(removeAuthorizationParam(addPermissionV1WorkspacesWorkspaceIdPermissionsPatch))
|
|
107
107
|
removePermissionToWorkspaceAi = this.mutation(removeAuthorizationParam(removePermissionV1WorkspacesWorkspaceIdPermissionsDelete))
|
|
108
108
|
// eslint-disable-next-line max-len
|
|
@@ -39,6 +39,12 @@ import {
|
|
|
39
39
|
sharedInfraControllergetSharedInfra,
|
|
40
40
|
sharedInfraControllergetSharedInfraAppliedPlugins,
|
|
41
41
|
sharedInfraControllergetSharedInfraFilters,
|
|
42
|
+
updateInfrastructureControllergetApplicationBranches,
|
|
43
|
+
updateInfrastructureControllergetApplicationInfraPlugins,
|
|
44
|
+
updateInfrastructureControllergetSharedInfraBranches,
|
|
45
|
+
updateInfrastructureControllergetSharedInfraInfraPlugins,
|
|
46
|
+
updateInfrastructureControllerupdateInfraPluginsAndCreatePullRequestByApplication,
|
|
47
|
+
updateInfrastructureControllerupdateInfraPluginsAndCreatePullRequestBySharedInfra,
|
|
42
48
|
workflowWorkspaceControllerlistWorkflowByStackIdAndWorkflowType,
|
|
43
49
|
workspaceControllerdelete,
|
|
44
50
|
workspaceControllergetWorkspaces,
|
|
@@ -46,9 +52,9 @@ import {
|
|
|
46
52
|
workspaceStackControllerdeleteStacksInWorkspace,
|
|
47
53
|
workspaceStackControllerlistStacks,
|
|
48
54
|
workspaceStackControllerrefreshStacksInWorkspace,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
workspaceVariableControllerfindAll,
|
|
56
|
+
workspaceVariableControllerfindByName,
|
|
57
|
+
workspaceVariableControllerupsert,
|
|
52
58
|
} from '../api/workspaceManager'
|
|
53
59
|
import apis from '../apis.json'
|
|
54
60
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
@@ -379,15 +385,48 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
|
|
|
379
385
|
/**
|
|
380
386
|
* Find all workspace variables
|
|
381
387
|
*/
|
|
382
|
-
workspaceVariables = this.query(
|
|
388
|
+
workspaceVariables = this.query(workspaceVariableControllerfindAll)
|
|
383
389
|
/**
|
|
384
390
|
* Get a workspace variable by name
|
|
385
391
|
*/
|
|
386
|
-
getWorkspaceVariable = this.query(
|
|
392
|
+
getWorkspaceVariable = this.query(workspaceVariableControllerfindByName)
|
|
387
393
|
/**
|
|
388
394
|
* Updates workspace variable based on existing account variable
|
|
389
395
|
*/
|
|
390
|
-
updateWorkspaceVariable = this.mutation(
|
|
396
|
+
updateWorkspaceVariable = this.mutation(workspaceVariableControllerupsert)
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
// Update Infra Plugins
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Get available branches on the App repo.
|
|
403
|
+
*/
|
|
404
|
+
getAppAvailableBranches = this.query(updateInfrastructureControllergetApplicationBranches)
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Get available branches on the Infra repo.
|
|
408
|
+
*/
|
|
409
|
+
getInfraAvailableBranches = this.query(updateInfrastructureControllergetSharedInfraBranches)
|
|
410
|
+
/**
|
|
411
|
+
* Get current branch App infra plugins state
|
|
412
|
+
*/
|
|
413
|
+
getAppInfraPluginsToUpdate = this.query(updateInfrastructureControllergetApplicationInfraPlugins)
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Get current branch Infra plugins state
|
|
417
|
+
*/
|
|
418
|
+
getInfraPluginsToUpdate = this.query(updateInfrastructureControllergetSharedInfraInfraPlugins)
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Updates plugins within an Infra
|
|
422
|
+
*/
|
|
423
|
+
updateInfraPlugins = this.mutation(updateInfrastructureControllerupdateInfraPluginsAndCreatePullRequestBySharedInfra)
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Updates infra plugins within an App
|
|
427
|
+
*/
|
|
428
|
+
updateAppInfraPlugins = this.mutation(updateInfrastructureControllerupdateInfraPluginsAndCreatePullRequestByApplication)
|
|
429
|
+
|
|
391
430
|
}
|
|
392
431
|
|
|
393
432
|
export const workspaceManagerClient = new WorkspaceManagerClient()
|