@stack-spot/portal-network 0.208.0 → 0.208.1

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.
@@ -102,7 +102,7 @@ import {
102
102
  isCreatedScmCredentials1,
103
103
  listAccountMemberFavorites,
104
104
  listExtensionLinks,
105
- listExtensions,
105
+
106
106
  listExtensionVersions,
107
107
  listMemberFavoritesByResource,
108
108
  listScmCredentials1,
@@ -145,8 +145,12 @@ import { DefaultAPIError } from '../error/DefaultAPIError'
145
145
  import { accountDictionary } from '../error/dictionary/account'
146
146
  import { StackspotAPIError } from '../error/StackspotAPIError'
147
147
  import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
148
+ import { removeAuthorizationParam } from '../utils/remove-authorization-param'
148
149
  import { CreateSCMRequest, SCMStatus, UpdateSCMRequest } from './types'
149
150
 
151
+ const listAllResourcesOfGroup = removeAuthorizationParam(getGroupResources)
152
+ const getsListAllResourcesOfGroup = removeAuthorizationParam(getResources)
153
+
150
154
  class AccountClient extends ReactQueryNetworkClient {
151
155
  constructor() {
152
156
  super(getApiAddresses().account.url, defaults)
@@ -324,9 +328,9 @@ class AccountClient extends ReactQueryNetworkClient {
324
328
  */
325
329
  removeRoleFromGroup = this.mutation(deleteRole)
326
330
  /**
327
- * Gets all resources of a group (paginated).
331
+ * Get all resources by groups with pagination.
328
332
  */
329
- groupResources = this.infiniteQuery(getGroupResources)
333
+ allResourcesByGroupWithPagination = this.infiniteQuery(listAllResourcesOfGroup, { accumulator: 'items' })
330
334
  /**
331
335
  * Adds several resources to a group.
332
336
  */
@@ -393,7 +397,7 @@ class AccountClient extends ReactQueryNetworkClient {
393
397
  /**
394
398
  * Gets all resources (paginated)
395
399
  */
396
- allResources = this.infiniteQuery(getResources)
400
+ allResources = this.infiniteQuery(getsListAllResourcesOfGroup, { accumulator: 'items' })
397
401
  /**
398
402
  * Gets all resource types (paginated)
399
403
  */
@@ -649,9 +653,9 @@ class AccountClient extends ReactQueryNetworkClient {
649
653
  */
650
654
  allRolesByGroupWithPagination = this.query(getRoles5)
651
655
  /**
652
- * Get all resources by groups with pagination
656
+ * Gets all resources of a group (paginated)
653
657
  */
654
- allResourcesByGroupWithPagination = this.query(getGroupResources1)
658
+ groupResources = this.query(getGroupResources1)
655
659
  /**
656
660
  * Get all roles account with pagination
657
661
  */
@@ -687,7 +691,7 @@ class AccountClient extends ReactQueryNetworkClient {
687
691
  /**
688
692
  * Lists all extensions.
689
693
  */
690
- extensions = this.query(listExtensions)
694
+ extensions = this.query(listExtensionLinks)
691
695
 
692
696
  /**
693
697
  * Lists all versions of an extension.
@@ -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
  */