@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.
@@ -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
- addResourceV1WorkspacesWorkspaceIdResourceTypePost,
6
+ addContentV1WorkspacesWorkspaceIdContentTypePost,
7
7
  createWorkspaceV1WorkspacesPost,
8
8
  defaults,
9
9
  deleteWorkspaceV1WorkspacesWorkspaceIdDelete,
10
10
  getWorkspaceByIdV1WorkspacesIdGet,
11
11
  HttpValidationError,
12
- listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet,
12
+ listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet,
13
13
  listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet,
14
14
  listWorkspacesV1WorkspacesGet,
15
15
  removePermissionV1WorkspacesWorkspaceIdPermissionsDelete,
16
- removeResourceV1WorkspacesWorkspaceIdResourceTypeResourceIdDelete,
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 addResourceV1WorkspacesWorkspaceIdResourceTypePost>[0], 'authorization'>,
49
+ variables: Omit<Parameters<typeof addContentV1WorkspacesWorkspaceIdContentTypePost>[0], 'authorization'>,
50
50
  ) =>
51
- addResourceV1WorkspacesWorkspaceIdResourceTypePost({ ...variables, authorization: '' },
51
+ addContentV1WorkspacesWorkspaceIdContentTypePost({ ...variables, authorization: '' },
52
52
  { signal }) as unknown as Promise<FixedAddResourceToWorkspaceAi>,
53
- permission: this.createPermissionFunctionFor(addResourceV1WorkspacesWorkspaceIdResourceTypePost),
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 listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet>[0],
61
- 'authorization' | 'resourceType'>,
60
+ variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
61
+ 'authorization' | 'contentType'>,
62
62
  ) =>
63
- listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'knowledge_source', authorization: '' },
63
+ listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'knowledge_source', authorization: '' },
64
64
  { signal }) as unknown as Promise<KnowledgeSourceItemResponse[]>,
65
- permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
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 listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet>[0],
73
- 'authorization' | 'resourceType'>,
72
+ variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
73
+ 'authorization' | 'contentType'>,
74
74
  ) =>
75
- listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'stack', authorization: '' },
75
+ listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'stack', authorization: '' },
76
76
  { signal }) as unknown as Promise<GetAiStackResponse[]>,
77
- permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
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 listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet>[0],
85
- 'authorization' | 'resourceType'>,
84
+ variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
85
+ 'authorization' | 'contentType'>,
86
86
  ) =>
87
- listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'quick_command', authorization: '' },
87
+ listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'quick_command', authorization: '' },
88
88
  { signal }) as unknown as Promise<QuickCommandResponse[]>,
89
- permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
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 listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet>[0],
97
- 'authorization' | 'resourceType'>,
96
+ variables: Omit<Parameters<typeof listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet>[0],
97
+ 'authorization' | 'contentType'>,
98
98
  ) =>
99
- listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet({ ...variables, resourceType: 'agent', authorization: '' },
99
+ listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'agent', authorization: '' },
100
100
  { signal }) as unknown as Promise<AgentResponse[]>,
101
- permission: this.createPermissionFunctionFor(listAllByResourceTypeV1WorkspacesWorkspaceIdResourceTypeGet),
101
+ permission: this.createPermissionFunctionFor(listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet),
102
102
  })
103
103
 
104
104
  deleteResourceTypeFromWorkspaceAi = this.mutation(removeAuthorizationParam(
105
- removeResourceV1WorkspacesWorkspaceIdResourceTypeResourceIdDelete))
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
- workspaceVariableControllerV2FindAll,
50
- workspaceVariableControllerV2FindByName,
51
- workspaceVariableControllerV2Upsert,
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(workspaceVariableControllerV2FindAll)
388
+ workspaceVariables = this.query(workspaceVariableControllerfindAll)
383
389
  /**
384
390
  * Get a workspace variable by name
385
391
  */
386
- getWorkspaceVariable = this.query(workspaceVariableControllerV2FindByName)
392
+ getWorkspaceVariable = this.query(workspaceVariableControllerfindByName)
387
393
  /**
388
394
  * Updates workspace variable based on existing account variable
389
395
  */
390
- updateWorkspaceVariable = this.mutation(workspaceVariableControllerV2Upsert)
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()