@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.
- package/CHANGELOG.md +7 -0
- package/dist/api/account.d.ts +331 -89
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js +203 -46
- package/dist/api/account.js.map +1 -1
- package/dist/client/account.d.ts +14 -9
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +11 -8
- package/dist/client/account.js.map +1 -1
- package/dist/client/agent-tools.d.ts +2 -2
- package/dist/client/agent-tools.d.ts.map +1 -1
- package/dist/client/agent-tools.js +2 -1
- package/dist/client/agent-tools.js.map +1 -1
- package/package.json +1 -1
- package/src/api/account.ts +579 -163
- package/src/client/account.ts +11 -7
- package/src/client/agent-tools.ts +2 -1
package/src/client/account.ts
CHANGED
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
isCreatedScmCredentials1,
|
|
103
103
|
listAccountMemberFavorites,
|
|
104
104
|
listExtensionLinks,
|
|
105
|
-
|
|
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
|
-
*
|
|
331
|
+
* Get all resources by groups with pagination.
|
|
328
332
|
*/
|
|
329
|
-
|
|
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(
|
|
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
|
-
*
|
|
656
|
+
* Gets all resources of a group (paginated)
|
|
653
657
|
*/
|
|
654
|
-
|
|
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(
|
|
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.
|
|
154
|
+
toolkitsV2 = this.infiniteQuery(listToolkitsAuthorization, { accumulator: 'items' })
|
|
154
155
|
/**
|
|
155
156
|
* Lists all tools of an MCP toolkit.
|
|
156
157
|
*/
|