@stack-spot/portal-network 0.208.0 → 0.208.2

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.
@@ -101,9 +101,8 @@ import {
101
101
  isCreatedScmCredentials,
102
102
  isCreatedScmCredentials1,
103
103
  listAccountMemberFavorites,
104
- listExtensionLinks,
105
- listExtensions,
106
104
  listExtensionVersions,
105
+ listManageableExtensions,
107
106
  listMemberFavoritesByResource,
108
107
  listScmCredentials1,
109
108
  listScmCredentials2, partialUpdateSso, personalAccessTokenAuthorization,
@@ -145,8 +144,12 @@ import { DefaultAPIError } from '../error/DefaultAPIError'
145
144
  import { accountDictionary } from '../error/dictionary/account'
146
145
  import { StackspotAPIError } from '../error/StackspotAPIError'
147
146
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
147
+ import { removeAuthorizationParam } from '../utils/remove-authorization-param'
148
148
  import { CreateSCMRequest, SCMStatus, UpdateSCMRequest } from './types'
149
149
 
150
+ const listAllResourcesOfGroup = removeAuthorizationParam(getGroupResources)
151
+ const getsListAllResourcesOfGroup = removeAuthorizationParam(getResources)
152
+
150
153
  class AccountClient extends ReactQueryNetworkClient {
151
154
  constructor() {
152
155
  super(getApiAddresses().account.url, defaults)
@@ -324,9 +327,9 @@ class AccountClient extends ReactQueryNetworkClient {
324
327
  */
325
328
  removeRoleFromGroup = this.mutation(deleteRole)
326
329
  /**
327
- * Gets all resources of a group (paginated).
330
+ * Get all resources by groups with pagination.
328
331
  */
329
- groupResources = this.infiniteQuery(getGroupResources)
332
+ allResourcesByGroupWithPagination = this.infiniteQuery(listAllResourcesOfGroup, { accumulator: 'items' })
330
333
  /**
331
334
  * Adds several resources to a group.
332
335
  */
@@ -393,7 +396,7 @@ class AccountClient extends ReactQueryNetworkClient {
393
396
  /**
394
397
  * Gets all resources (paginated)
395
398
  */
396
- allResources = this.infiniteQuery(getResources)
399
+ allResources = this.infiniteQuery(getsListAllResourcesOfGroup, { accumulator: 'items' })
397
400
  /**
398
401
  * Gets all resource types (paginated)
399
402
  */
@@ -649,9 +652,9 @@ class AccountClient extends ReactQueryNetworkClient {
649
652
  */
650
653
  allRolesByGroupWithPagination = this.query(getRoles5)
651
654
  /**
652
- * Get all resources by groups with pagination
655
+ * Gets all resources of a group (paginated)
653
656
  */
654
- allResourcesByGroupWithPagination = this.query(getGroupResources1)
657
+ groupResources = this.query(getGroupResources1)
655
658
  /**
656
659
  * Get all roles account with pagination
657
660
  */
@@ -687,7 +690,7 @@ class AccountClient extends ReactQueryNetworkClient {
687
690
  /**
688
691
  * Lists all extensions.
689
692
  */
690
- extensions = this.query(listExtensions)
693
+ extensions = this.query(listManageableExtensions)
691
694
 
692
695
  /**
693
696
  * Lists all versions of an extension.
@@ -717,7 +720,7 @@ class AccountClient extends ReactQueryNetworkClient {
717
720
  /**
718
721
  * Lists all extension links.
719
722
  */
720
- extensionLinks = this.query(listExtensionLinks)
723
+ extensionLinks = this.query(listManageableExtensions)
721
724
 
722
725
  /**
723
726
  * Updates an extension link with a patch operation.
@@ -13,6 +13,7 @@ import { workspaceAiClient } from './workspace-ai'
13
13
 
14
14
  const AGENT_DEFAULT_SLUG = 'stk_flex'
15
15
  const listAgentsV3AgentsWithoutAuthorization = removeAuthorizationParam(listAgentsV3AgentsGet)
16
+ const listToolkitsAuthorization = removeAuthorizationParam(listToolkitsV2ToolkitsGet)
16
17
 
17
18
  class AgentToolsClient extends ReactQueryNetworkClient {
18
19
  constructor() {
@@ -150,7 +151,7 @@ class AgentToolsClient extends ReactQueryNetworkClient {
150
151
  /**
151
152
  * Get list of Toolkits V2
152
153
  */
153
- toolkitsV2 = this.query(removeAuthorizationParam(listToolkitsV2ToolkitsGet))
154
+ toolkitsV2 = this.infiniteQuery(listToolkitsAuthorization, { accumulator: 'items' })
154
155
  /**
155
156
  * Lists all tools of an MCP toolkit.
156
157
  */