@stack-spot/portal-network 1.0.0-betaadp.3 → 1.0.0-dev.1768423147036
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 +633 -0
- package/dist/api/account.d.ts +413 -277
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js +261 -176
- package/dist/api/account.js.map +1 -1
- package/dist/api/accountAssetManager.d.ts +309 -0
- package/dist/api/accountAssetManager.d.ts.map +1 -0
- package/dist/api/accountAssetManager.js +169 -0
- package/dist/api/accountAssetManager.js.map +1 -0
- package/dist/api/agent-tools.d.ts +818 -261
- package/dist/api/agent-tools.d.ts.map +1 -1
- package/dist/api/agent-tools.js +245 -50
- package/dist/api/agent-tools.js.map +1 -1
- package/dist/api/agent.d.ts +55 -55
- package/dist/api/agent.d.ts.map +1 -1
- package/dist/api/ai.d.ts +488 -98
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +426 -146
- package/dist/api/ai.js.map +1 -1
- package/dist/api/cloudPlatform.d.ts +374 -221
- package/dist/api/cloudPlatform.d.ts.map +1 -1
- package/dist/api/cloudPlatform.js +299 -93
- package/dist/api/cloudPlatform.js.map +1 -1
- package/dist/api/cloudPlatformHorizon.d.ts +178 -9
- package/dist/api/cloudPlatformHorizon.d.ts.map +1 -1
- package/dist/api/cloudPlatformHorizon.js +69 -1
- package/dist/api/cloudPlatformHorizon.js.map +1 -1
- package/dist/api/codeShift.d.ts +1125 -83
- package/dist/api/codeShift.d.ts.map +1 -1
- package/dist/api/codeShift.js +538 -16
- package/dist/api/codeShift.js.map +1 -1
- package/dist/api/dataIntegration.d.ts +291 -1
- package/dist/api/dataIntegration.d.ts.map +1 -1
- package/dist/api/dataIntegration.js +254 -0
- package/dist/api/dataIntegration.js.map +1 -1
- package/dist/api/discover.d.ts +98 -12
- package/dist/api/discover.d.ts.map +1 -1
- package/dist/api/discover.js +78 -2
- package/dist/api/discover.js.map +1 -1
- package/dist/api/edpBfa.d.ts +215 -0
- package/dist/api/edpBfa.d.ts.map +1 -0
- package/dist/api/edpBfa.js +87 -0
- package/dist/api/edpBfa.js.map +1 -0
- package/dist/api/genAiInference.d.ts +22 -2
- package/dist/api/genAiInference.d.ts.map +1 -1
- package/dist/api/genAiInference.js +22 -3
- package/dist/api/genAiInference.js.map +1 -1
- package/dist/api/workflows.d.ts +68 -5
- package/dist/api/workflows.d.ts.map +1 -1
- package/dist/api/workflows.js +16 -0
- package/dist/api/workflows.js.map +1 -1
- package/dist/api/workspace-ai.d.ts +41 -0
- package/dist/api/workspace-ai.d.ts.map +1 -1
- package/dist/api/workspace-ai.js +34 -0
- package/dist/api/workspace-ai.js.map +1 -1
- package/dist/api/workspaceManager.d.ts +16 -10
- package/dist/api/workspaceManager.d.ts.map +1 -1
- package/dist/api/workspaceManager.js +10 -0
- package/dist/api/workspaceManager.js.map +1 -1
- package/dist/api-addresses.d.ts +20 -18
- package/dist/api-addresses.d.ts.map +1 -1
- package/dist/api-addresses.js +81 -21
- package/dist/api-addresses.js.map +1 -1
- package/dist/apis-itau.json +241 -0
- package/dist/apis.json +17 -1
- package/dist/client/account-asset-manager.d.ts +112 -0
- package/dist/client/account-asset-manager.d.ts.map +1 -0
- package/dist/client/account-asset-manager.js +160 -0
- package/dist/client/account-asset-manager.js.map +1 -0
- package/dist/client/account.d.ts +265 -242
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +80 -34
- package/dist/client/account.js.map +1 -1
- package/dist/client/agent-tools.d.ts +295 -121
- package/dist/client/agent-tools.d.ts.map +1 -1
- package/dist/client/agent-tools.js +166 -12
- package/dist/client/agent-tools.js.map +1 -1
- package/dist/client/agent.d.ts +46 -46
- package/dist/client/agent.d.ts.map +1 -1
- package/dist/client/ai.d.ts +265 -79
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +268 -24
- package/dist/client/ai.js.map +1 -1
- package/dist/client/api-management.d.ts +10 -1
- package/dist/client/api-management.d.ts.map +1 -1
- package/dist/client/api-management.js +11 -2
- package/dist/client/api-management.js.map +1 -1
- package/dist/client/cloud-account.d.ts +13 -13
- package/dist/client/cloud-platform-horizon.d.ts +38 -19
- package/dist/client/cloud-platform-horizon.d.ts.map +1 -1
- package/dist/client/cloud-platform-horizon.js +19 -1
- package/dist/client/cloud-platform-horizon.js.map +1 -1
- package/dist/client/cloud-platform.d.ts +213 -46
- package/dist/client/cloud-platform.d.ts.map +1 -1
- package/dist/client/cloud-platform.js +168 -33
- package/dist/client/cloud-platform.js.map +1 -1
- package/dist/client/cloud-runtimes.d.ts +4 -4
- package/dist/client/cloud-services.d.ts +17 -17
- package/dist/client/cloud-services.d.ts.map +1 -1
- package/dist/client/code-shift.d.ts +535 -162
- package/dist/client/code-shift.d.ts.map +1 -1
- package/dist/client/code-shift.js +296 -7
- package/dist/client/code-shift.js.map +1 -1
- package/dist/client/content.d.ts +127 -132
- package/dist/client/content.d.ts.map +1 -1
- package/dist/client/data-integration.d.ts +92 -53
- package/dist/client/data-integration.d.ts.map +1 -1
- package/dist/client/data-integration.js +38 -2
- package/dist/client/data-integration.js.map +1 -1
- package/dist/client/discover.d.ts +31 -10
- package/dist/client/discover.d.ts.map +1 -1
- package/dist/client/discover.js +239 -3
- package/dist/client/discover.js.map +1 -1
- package/dist/client/edp-bfa.d.ts +16 -0
- package/dist/client/edp-bfa.d.ts.map +1 -0
- package/dist/client/edp-bfa.js +24 -0
- package/dist/client/edp-bfa.js.map +1 -0
- package/dist/client/event-bus.d.ts.map +1 -1
- package/dist/client/gen-ai-inference.d.ts +20 -20
- package/dist/client/insights.d.ts +7 -7
- package/dist/client/notification.d.ts +17 -10
- package/dist/client/notification.d.ts.map +1 -1
- package/dist/client/notification.js +10 -1
- package/dist/client/notification.js.map +1 -1
- package/dist/client/runtime-manager.d.ts +8 -8
- package/dist/client/secrets.d.ts.map +1 -1
- package/dist/client/secrets.js +1 -1
- package/dist/client/secrets.js.map +1 -1
- package/dist/client/types.d.ts +50 -7
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/workflow.d.ts +10 -10
- package/dist/client/workspace-ai.d.ts +65 -55
- package/dist/client/workspace-ai.d.ts.map +1 -1
- package/dist/client/workspace-ai.js +19 -9
- package/dist/client/workspace-ai.js.map +1 -1
- package/dist/client/workspace-manager.d.ts +115 -76
- package/dist/client/workspace-manager.d.ts.map +1 -1
- package/dist/client/workspace-manager.js +47 -2
- package/dist/client/workspace-manager.js.map +1 -1
- package/dist/client/workspace-search.d.ts +2 -2
- package/dist/client/workspace.d.ts +58 -105
- package/dist/client/workspace.d.ts.map +1 -1
- package/dist/error/DefaultAPIError.d.ts.map +1 -1
- package/dist/error/DefaultAPIError.js.map +1 -1
- package/dist/error/StackspotAPIError.d.ts +3 -4
- package/dist/error/StackspotAPIError.d.ts.map +1 -1
- package/dist/error/StackspotAPIError.js +3 -3
- package/dist/error/StackspotAPIError.js.map +1 -1
- package/dist/error/dictionary/accountAssetManager.d.ts +11 -0
- package/dist/error/dictionary/accountAssetManager.d.ts.map +1 -0
- package/dist/error/dictionary/accountAssetManager.js +11 -0
- package/dist/error/dictionary/accountAssetManager.js.map +1 -0
- package/dist/error/dictionary/cloud-platform.d.ts +76 -8
- package/dist/error/dictionary/cloud-platform.d.ts.map +1 -1
- package/dist/error/dictionary/cloud-platform.js +80 -12
- package/dist/error/dictionary/cloud-platform.js.map +1 -1
- package/dist/error/dictionary/workspace-ai.d.ts +9 -0
- package/dist/error/dictionary/workspace-ai.d.ts.map +1 -0
- package/dist/error/dictionary/workspace-ai.js +9 -0
- package/dist/error/dictionary/workspace-ai.js.map +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/network/NetworkClient.d.ts +4 -2
- package/dist/network/NetworkClient.d.ts.map +1 -1
- package/dist/network/NetworkClient.js +16 -4
- package/dist/network/NetworkClient.js.map +1 -1
- package/dist/network/types.d.ts +2 -0
- package/dist/network/types.d.ts.map +1 -1
- package/dist/utils/StreamedJson.d.ts +3 -1
- package/dist/utils/StreamedJson.d.ts.map +1 -1
- package/dist/utils/StreamedJson.js +23 -3
- package/dist/utils/StreamedJson.js.map +1 -1
- package/package.dev.json +3 -0
- package/package.json +10 -9
- package/package.stg.json +3 -0
- package/readme.md +40 -1
- package/src/api/account.ts +701 -540
- package/src/api/accountAssetManager.ts +771 -0
- package/src/api/agent-tools.ts +1354 -556
- package/src/api/ai.ts +891 -170
- package/src/api/cloudPlatform.ts +667 -298
- package/src/api/cloudPlatformHorizon.ts +412 -9
- package/src/api/codeShift.ts +2088 -97
- package/src/api/dataIntegration.ts +635 -1
- package/src/api/discover.ts +180 -14
- package/src/api/edpBfa.ts +472 -0
- package/src/api/genAiInference.ts +47 -4
- package/src/api/workflows.ts +100 -5
- package/src/api/workspace-ai.ts +83 -0
- package/src/api/workspaceManager.ts +25 -10
- package/src/api-addresses.ts +113 -38
- package/src/apis-itau.json +241 -0
- package/src/apis.json +17 -1
- package/src/client/account-asset-manager.ts +100 -0
- package/src/client/account.ts +71 -40
- package/src/client/agent-tools.ts +111 -18
- package/src/client/ai.ts +237 -24
- package/src/client/api-management.ts +7 -2
- package/src/client/cloud-platform-horizon.ts +12 -4
- package/src/client/cloud-platform.ts +101 -27
- package/src/client/code-shift.ts +196 -8
- package/src/client/data-integration.ts +28 -1
- package/src/client/discover.ts +238 -5
- package/src/client/edp-bfa.ts +24 -0
- package/src/client/notification.ts +6 -1
- package/src/client/secrets.ts +1 -1
- package/src/client/types.ts +55 -9
- package/src/client/workspace-ai.ts +37 -26
- package/src/client/workspace-manager.ts +31 -2
- package/src/error/DefaultAPIError.ts +5 -5
- package/src/error/StackspotAPIError.ts +4 -4
- package/src/error/dictionary/accountAssetManager.ts +12 -0
- package/src/error/dictionary/cloud-platform.ts +80 -12
- package/src/error/dictionary/workspace-ai.ts +10 -0
- package/src/index.ts +6 -3
- package/src/network/NetworkClient.ts +18 -6
- package/src/network/types.ts +3 -0
- package/src/utils/StreamedJson.tsx +19 -4
package/src/client/account.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
bindRoles,
|
|
12
12
|
bindToGroups,
|
|
13
13
|
bindToRoles,
|
|
14
|
+
cancelSecretDelete,
|
|
14
15
|
create,
|
|
15
16
|
create1,
|
|
16
17
|
createAccountRole, createExtension, createExtensionLink,
|
|
@@ -41,13 +42,13 @@ import {
|
|
|
41
42
|
enableSecret,
|
|
42
43
|
enterpriseContact,
|
|
43
44
|
findAssociations,
|
|
44
|
-
|
|
45
|
+
findSecrets,
|
|
45
46
|
getAccess,
|
|
46
47
|
getAccount1,
|
|
47
48
|
getAccountMembers,
|
|
48
|
-
|
|
49
|
+
getAccountMembers1,
|
|
49
50
|
getAccountRateLimit,
|
|
50
|
-
|
|
51
|
+
getAccounts,
|
|
51
52
|
getAccountSso,
|
|
52
53
|
getActiveExtensionVersion,
|
|
53
54
|
getAllAccountSso,
|
|
@@ -74,10 +75,11 @@ import {
|
|
|
74
75
|
getMembers1,
|
|
75
76
|
getPartnerAccount, getPartnersSharingAllowed,
|
|
76
77
|
getPersonalAccountDetails,
|
|
78
|
+
getPersonalAccountExpirationData,
|
|
77
79
|
getPersonalClientCredentials,
|
|
78
|
-
|
|
80
|
+
getResources,
|
|
79
81
|
getResources2,
|
|
80
|
-
|
|
82
|
+
getResourcesAndActionsWithStatus,
|
|
81
83
|
getResourceTypes1,
|
|
82
84
|
getRoleGroups,
|
|
83
85
|
getRoleGroups1,
|
|
@@ -87,7 +89,8 @@ import {
|
|
|
87
89
|
getRoles1,
|
|
88
90
|
getRoles2,
|
|
89
91
|
getRoles3,
|
|
90
|
-
getRoles4,
|
|
92
|
+
getRoles4,
|
|
93
|
+
getRoles5,
|
|
91
94
|
getScmProvider,
|
|
92
95
|
getServiceCredential,
|
|
93
96
|
getServiceCredentialByIdRateLimit,
|
|
@@ -99,12 +102,13 @@ import {
|
|
|
99
102
|
isCreatedScmCredentials1,
|
|
100
103
|
listAccountMemberFavorites,
|
|
101
104
|
listExtensionLinks,
|
|
102
|
-
listExtensions,
|
|
103
105
|
listExtensionVersions,
|
|
106
|
+
listManageableExtensions,
|
|
104
107
|
listMemberFavoritesByResource,
|
|
105
|
-
|
|
108
|
+
listScmCredentials1,
|
|
106
109
|
listScmCredentials2, partialUpdateSso, personalAccessTokenAuthorization,
|
|
107
110
|
personalContact,
|
|
111
|
+
reactivateTrialAccount,
|
|
108
112
|
removeRoleFromMember,
|
|
109
113
|
removeTrialAccount,
|
|
110
114
|
resetOtp,
|
|
@@ -141,8 +145,12 @@ import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
|
141
145
|
import { accountDictionary } from '../error/dictionary/account'
|
|
142
146
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
143
147
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
148
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
144
149
|
import { CreateSCMRequest, SCMStatus, UpdateSCMRequest } from './types'
|
|
145
150
|
|
|
151
|
+
const listAllResourcesOfGroup = removeAuthorizationParam(getGroupResources)
|
|
152
|
+
const getsListAllResourcesOfGroup = removeAuthorizationParam(getResources)
|
|
153
|
+
|
|
146
154
|
class AccountClient extends ReactQueryNetworkClient {
|
|
147
155
|
constructor() {
|
|
148
156
|
super(getApiAddresses().account.url, defaults)
|
|
@@ -222,15 +230,15 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
222
230
|
/**
|
|
223
231
|
* Gets all members (paginated).
|
|
224
232
|
*/
|
|
225
|
-
allMembers = this.infiniteQuery(
|
|
233
|
+
allMembers = this.infiniteQuery(getAccountMembers)
|
|
226
234
|
/**
|
|
227
235
|
* Gets member Groups (paginated).
|
|
228
236
|
*/
|
|
229
|
-
memberGroups = this.infiniteQuery(
|
|
237
|
+
memberGroups = this.infiniteQuery(getMemberGroups)
|
|
230
238
|
/**
|
|
231
239
|
* Gets member roles (paginated).
|
|
232
240
|
*/
|
|
233
|
-
memberRoles = this.infiniteQuery(
|
|
241
|
+
memberRoles = this.infiniteQuery(getRoles1)
|
|
234
242
|
/**
|
|
235
243
|
* Gets member resources.
|
|
236
244
|
*/
|
|
@@ -282,7 +290,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
282
290
|
/**
|
|
283
291
|
* Get all groups (paginated).
|
|
284
292
|
*/
|
|
285
|
-
allGroups = this.infiniteQuery(
|
|
293
|
+
allGroups = this.infiniteQuery(getGroups)
|
|
286
294
|
/**
|
|
287
295
|
* Creates a group.
|
|
288
296
|
*/
|
|
@@ -298,7 +306,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
298
306
|
/**
|
|
299
307
|
* Gets all members in a group (paginated).
|
|
300
308
|
*/
|
|
301
|
-
groupMembers = this.infiniteQuery(
|
|
309
|
+
groupMembers = this.infiniteQuery(getMembers)
|
|
302
310
|
/**
|
|
303
311
|
* Adds several members to a group
|
|
304
312
|
*/
|
|
@@ -310,7 +318,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
310
318
|
/**
|
|
311
319
|
* Gets all roles of a group.
|
|
312
320
|
*/
|
|
313
|
-
groupRoles = this.infiniteQuery(
|
|
321
|
+
groupRoles = this.infiniteQuery(getRoles2)
|
|
314
322
|
/**
|
|
315
323
|
* Adds several roles to a group.
|
|
316
324
|
*/
|
|
@@ -320,9 +328,9 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
320
328
|
*/
|
|
321
329
|
removeRoleFromGroup = this.mutation(deleteRole)
|
|
322
330
|
/**
|
|
323
|
-
*
|
|
331
|
+
* Get all resources by groups with pagination.
|
|
324
332
|
*/
|
|
325
|
-
|
|
333
|
+
allResourcesByGroupWithPagination = this.infiniteQuery(listAllResourcesOfGroup, { accumulator: 'items' })
|
|
326
334
|
/**
|
|
327
335
|
* Adds several resources to a group.
|
|
328
336
|
*/
|
|
@@ -334,14 +342,14 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
334
342
|
/**
|
|
335
343
|
* Gets all roles in the account (paginated)
|
|
336
344
|
*/
|
|
337
|
-
allRoles = this.infiniteQuery(
|
|
345
|
+
allRoles = this.infiniteQuery(getRoles)
|
|
338
346
|
/**
|
|
339
347
|
* Get a role by id
|
|
340
348
|
*/
|
|
341
349
|
role = this.query({
|
|
342
350
|
name: 'account.role',
|
|
343
351
|
request: async (signal, { id }: { id: string }) => {
|
|
344
|
-
const roles = await
|
|
352
|
+
const roles = await getRoles({ filterBy: 'id', filterValue: id }, { signal })
|
|
345
353
|
if (!roles.length) throw new StackspotAPIError({ status: 404 })
|
|
346
354
|
return roles[0]
|
|
347
355
|
},
|
|
@@ -349,7 +357,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
349
357
|
/**
|
|
350
358
|
* Gets all members with the provided role (paginated)
|
|
351
359
|
*/
|
|
352
|
-
roleMembers = this.infiniteQuery(
|
|
360
|
+
roleMembers = this.infiniteQuery(getRoleMembers)
|
|
353
361
|
/**
|
|
354
362
|
* Creates a role
|
|
355
363
|
*/
|
|
@@ -369,7 +377,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
369
377
|
/**
|
|
370
378
|
* Gets all groups with the provided role (paginated)
|
|
371
379
|
*/
|
|
372
|
-
roleGroups = this.infiniteQuery(
|
|
380
|
+
roleGroups = this.infiniteQuery(getRoleGroups)
|
|
373
381
|
/**
|
|
374
382
|
* Adds a role to several groups
|
|
375
383
|
*/
|
|
@@ -377,7 +385,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
377
385
|
/**
|
|
378
386
|
* Get the actions a role is allowed to perform
|
|
379
387
|
*/
|
|
380
|
-
rolePermissions = this.infiniteQuery(
|
|
388
|
+
rolePermissions = this.infiniteQuery(getResourcesAndActionsWithStatus)
|
|
381
389
|
/**
|
|
382
390
|
* Updates a role with new list of permissions
|
|
383
391
|
*/
|
|
@@ -389,7 +397,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
389
397
|
/**
|
|
390
398
|
* Gets all resources (paginated)
|
|
391
399
|
*/
|
|
392
|
-
allResources = this.infiniteQuery(
|
|
400
|
+
allResources = this.infiniteQuery(getsListAllResourcesOfGroup, { accumulator: 'items' })
|
|
393
401
|
/**
|
|
394
402
|
* Gets all resource types (paginated)
|
|
395
403
|
*/
|
|
@@ -409,7 +417,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
409
417
|
/**
|
|
410
418
|
* Gets all SCM credentials (account level).
|
|
411
419
|
*/
|
|
412
|
-
allSCMCredentials = this.query(
|
|
420
|
+
allSCMCredentials = this.query(listScmCredentials1)
|
|
413
421
|
/**
|
|
414
422
|
* Gets the status for the SCM credential.
|
|
415
423
|
*
|
|
@@ -485,7 +493,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
485
493
|
/**
|
|
486
494
|
* Gets all SCM credentials for the user currently logged in.
|
|
487
495
|
*/
|
|
488
|
-
allUserSCMCredentials = this.query(
|
|
496
|
+
allUserSCMCredentials = this.query(listScmCredentials2)
|
|
489
497
|
/**
|
|
490
498
|
* Gets the SCM provider.
|
|
491
499
|
*/
|
|
@@ -623,43 +631,43 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
623
631
|
/**
|
|
624
632
|
* Get all account members with pagination
|
|
625
633
|
*/
|
|
626
|
-
allMembersWithPagination = this.query(
|
|
634
|
+
allMembersWithPagination = this.query(getAccountMembers1)
|
|
627
635
|
/**
|
|
628
636
|
* Get Members Groups By Profile
|
|
629
637
|
*/
|
|
630
|
-
allMembersGroupsByProfileWithPagination = this.query(
|
|
638
|
+
allMembersGroupsByProfileWithPagination = this.query(getMemberGroups1)
|
|
631
639
|
/**
|
|
632
640
|
* Get Members Roles By Profile
|
|
633
641
|
*/
|
|
634
|
-
allMembersRolesByProfileWithPagination = this.query(
|
|
642
|
+
allMembersRolesByProfileWithPagination = this.query(getRoles4)
|
|
635
643
|
/**
|
|
636
644
|
* Get all account groups with pagination
|
|
637
645
|
*/
|
|
638
|
-
allGroupsWithPagination = this.query(
|
|
646
|
+
allGroupsWithPagination = this.query(getGroups1)
|
|
639
647
|
/**
|
|
640
648
|
* Get all members by group with pagination
|
|
641
649
|
*/
|
|
642
|
-
allMembersByGroupWithPagination = this.query(
|
|
650
|
+
allMembersByGroupWithPagination = this.query(getMembers1)
|
|
643
651
|
/**
|
|
644
652
|
* Get all roles by groups with pagination
|
|
645
653
|
*/
|
|
646
|
-
allRolesByGroupWithPagination = this.query(
|
|
654
|
+
allRolesByGroupWithPagination = this.query(getRoles5)
|
|
647
655
|
/**
|
|
648
|
-
*
|
|
656
|
+
* Gets all resources of a group (paginated)
|
|
649
657
|
*/
|
|
650
|
-
|
|
658
|
+
groupResources = this.query(getGroupResources1)
|
|
651
659
|
/**
|
|
652
660
|
* Get all roles account with pagination
|
|
653
661
|
*/
|
|
654
|
-
allRolesWithPagination = this.query(
|
|
662
|
+
allRolesWithPagination = this.query(getRoles3)
|
|
655
663
|
/**
|
|
656
664
|
* Get all members by role with pagination
|
|
657
665
|
*/
|
|
658
|
-
allMembersByRoleWithPagination = this.query(
|
|
666
|
+
allMembersByRoleWithPagination = this.query(getRoleMembers1)
|
|
659
667
|
/**
|
|
660
668
|
* Get all groups by roles with pagination
|
|
661
669
|
*/
|
|
662
|
-
allGroupsByRoleWithPagination = this.query(
|
|
670
|
+
allGroupsByRoleWithPagination = this.query(getRoleGroups1)
|
|
663
671
|
/**
|
|
664
672
|
* Get Service Credentials
|
|
665
673
|
*/
|
|
@@ -683,7 +691,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
683
691
|
/**
|
|
684
692
|
* Lists all extensions.
|
|
685
693
|
*/
|
|
686
|
-
extensions = this.query(
|
|
694
|
+
extensions = this.query(listManageableExtensions)
|
|
687
695
|
|
|
688
696
|
/**
|
|
689
697
|
* Lists all versions of an extension.
|
|
@@ -738,7 +746,18 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
738
746
|
/**
|
|
739
747
|
* Get secrets
|
|
740
748
|
*/
|
|
741
|
-
getSecrets = this.query(
|
|
749
|
+
getSecrets = this.query(findSecrets)
|
|
750
|
+
/**
|
|
751
|
+
* Get workspace and spot secrets
|
|
752
|
+
*/
|
|
753
|
+
getWorkspaceAndSpotSecrets = this.query({
|
|
754
|
+
name: 'account.getWorkspaceAndSpotSecrets',
|
|
755
|
+
request: async (signal) => {
|
|
756
|
+
const workspaceSecrets = await findSecrets({ filterByScope: 'SCOPED', filterByScopedBy: 'WORKSPACE', size: 1500 }, { signal })
|
|
757
|
+
const spotSecrets = await findSecrets({ filterByScope: 'SCOPED', filterByScopedBy: 'SPOT', size: 1500 }, { signal })
|
|
758
|
+
return { workspaces: workspaceSecrets?.items, spots: spotSecrets?.items }
|
|
759
|
+
},
|
|
760
|
+
})
|
|
742
761
|
/**
|
|
743
762
|
* Get secret by id
|
|
744
763
|
*/
|
|
@@ -748,10 +767,10 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
748
767
|
*/
|
|
749
768
|
getSecretsByIds = this.query({
|
|
750
769
|
name: 'getSecretsByIds',
|
|
751
|
-
request: (signal, variables: { ids: string[]
|
|
770
|
+
request: (signal, variables: { ids: string[] }) => {
|
|
752
771
|
const requests = variables?.ids?.map((secretId) => getById({ secretId }, { signal }))
|
|
753
772
|
return Promise.all(requests)
|
|
754
|
-
}
|
|
773
|
+
},
|
|
755
774
|
})
|
|
756
775
|
|
|
757
776
|
/**
|
|
@@ -774,6 +793,10 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
774
793
|
* Disable secret
|
|
775
794
|
*/
|
|
776
795
|
disableSecret = this.mutation(disableSecret)
|
|
796
|
+
/**
|
|
797
|
+
* Cancel Secret delete
|
|
798
|
+
*/
|
|
799
|
+
cancelSecretDelete = this.mutation(cancelSecretDelete)
|
|
777
800
|
|
|
778
801
|
// TRIAL
|
|
779
802
|
/**
|
|
@@ -872,7 +895,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
872
895
|
/**
|
|
873
896
|
* Lists enterprise accounts
|
|
874
897
|
*/
|
|
875
|
-
getEnterpriseAccounts = this.query(
|
|
898
|
+
getEnterpriseAccounts = this.query(getAccounts)
|
|
876
899
|
/**
|
|
877
900
|
* Get an enterprise account
|
|
878
901
|
*/
|
|
@@ -897,6 +920,14 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
897
920
|
* Find Secret Associations
|
|
898
921
|
*/
|
|
899
922
|
findSecretAssociations = this.infiniteQuery(findAssociations, { accumulator: 'items' })
|
|
923
|
+
/**
|
|
924
|
+
* Get expiration data
|
|
925
|
+
*/
|
|
926
|
+
getExpirationData = this.query(getPersonalAccountExpirationData)
|
|
927
|
+
/**
|
|
928
|
+
* Reactive trial account
|
|
929
|
+
*/
|
|
930
|
+
reactivateTrialAccount = this.mutation(reactivateTrialAccount)
|
|
900
931
|
}
|
|
901
932
|
|
|
902
933
|
export const accountClient = new AccountClient()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
2
|
import { getApiAddresses } from '../api-addresses'
|
|
3
|
-
import { addFavoriteV1AgentsAgentIdFavoritePost, AgentVisibilityLevelEnum, createAgentV1AgentsPost, createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, defaults, deleteAgentV1AgentsAgentIdDelete, deleteFavoriteV1AgentsAgentIdFavoriteDelete, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, forkAgentV1AgentsAgentIdForkPost, forkToolkitV1ToolkitsToolkitIdForkPost, getAgentV1AgentsAgentIdGet, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listAgentsV1AgentsGet, listMultiAgentsV1AgentsMultiAgentsGet, listToolkitsV1ToolkitsGet, publishAgentV1AgentsAgentIdPublishPost,
|
|
3
|
+
import { addFavoriteV1AgentsAgentIdFavoritePost, AgentVisibilityLevelEnum, createAgentV1AgentsPost, createAgentV2AgentsPost, createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, createVersionV1AgentsAgentCoreIdVersionsPost, defaults, deleteAgentV1AgentsAgentIdDelete, deleteFavoriteV1AgentsAgentIdFavoriteDelete, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, deleteVersionV1AgentsAgentCoreIdVersionsVersionNumberDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, findByAgentCoreIdV2AgentsAgentCoreIdGet, forkAgentV1AgentsAgentIdForkPost, forkAgentVersionV1AgentsAgentCoreIdVersionsVersionNumberForkPost, forkToolkitV1ToolkitsToolkitIdForkPost, getAgentV1AgentsAgentIdGet, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listAgentsV1AgentsGet, listAgentsV3AgentsGet, listAgentsV4AgentsGet, listMcpToolsV1McpToolsToolkitIdGet, listMultiAgentsV1AgentsMultiAgentsGet, listToolkitsV1ToolkitsGet, listToolkitsV2ToolkitsGet, listVersionsOfAgentCoreV1AgentsAgentCoreIdVersionsGet, patchVersionRecommendedV1AgentsAgentCoreIdVersionsVersionNumberPatch, publishAgentV1AgentsAgentIdPublishPost, searchAgentsByIdsV1AgentsSearchPost, searchAgentsV2AgentsSearchPost, shareV1AgentsAgentIdSharePost, updateAgentV1AgentsAgentIdPatch, updateAgentV2AgentsAgentIdPatch, updateToolkitV1ToolkitsToolkitIdPatch, VisibilityLevelEnum } from '../api/agent-tools'
|
|
4
4
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
5
5
|
import { agentToolsDictionary } from '../error/dictionary/agent-tools'
|
|
6
6
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
@@ -12,6 +12,9 @@ import { AgentResponseWithBuiltIn, AgentToolsOpenAPIPreview, AgentVisibilityLeve
|
|
|
12
12
|
import { workspaceAiClient } from './workspace-ai'
|
|
13
13
|
|
|
14
14
|
const AGENT_DEFAULT_SLUG = 'stk_flex'
|
|
15
|
+
const listAgentsV3AgentsWithoutAuthorization = removeAuthorizationParam(listAgentsV3AgentsGet)
|
|
16
|
+
const listAgentsV4 = removeAuthorizationParam(listAgentsV4AgentsGet)
|
|
17
|
+
const listToolkitsAuthorization = removeAuthorizationParam(listToolkitsV2ToolkitsGet)
|
|
15
18
|
|
|
16
19
|
class AgentToolsClient extends ReactQueryNetworkClient {
|
|
17
20
|
constructor() {
|
|
@@ -22,9 +25,13 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
22
25
|
return new DefaultAPIError(error.data, error.status, agentToolsDictionary, error.headers)
|
|
23
26
|
}
|
|
24
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Lists all public toolkits.
|
|
30
|
+
*/
|
|
25
31
|
tools = this.query(removeAuthorizationParam(getPublicToolKitsV1BuiltinToolkitGet))
|
|
26
32
|
|
|
27
33
|
/**
|
|
34
|
+
* @deprecated
|
|
28
35
|
* Create agent
|
|
29
36
|
*/
|
|
30
37
|
createAgent = this.mutation(removeAuthorizationParam(createAgentV1AgentsPost))
|
|
@@ -35,6 +42,7 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
35
42
|
deleteAgent = this.mutation(removeAuthorizationParam(deleteAgentV1AgentsAgentIdDelete))
|
|
36
43
|
|
|
37
44
|
/**
|
|
45
|
+
* @deprecated
|
|
38
46
|
* Updates an agent
|
|
39
47
|
*/
|
|
40
48
|
updateAgent = this.mutation(removeAuthorizationParam(updateAgentV1AgentsAgentIdPatch))
|
|
@@ -54,20 +62,35 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
54
62
|
*/
|
|
55
63
|
agents = this.infiniteQuery(removeAuthorizationParam(listAgentsV1AgentsGet))
|
|
56
64
|
|
|
65
|
+
/**
|
|
66
|
+
* List agents with support for multiple filters
|
|
67
|
+
*/
|
|
68
|
+
agentsMultipleFilters = this.infiniteQuery(listAgentsV3AgentsWithoutAuthorization, {
|
|
69
|
+
pageParamName: 'filters.page',
|
|
70
|
+
accumulator: 'items',
|
|
71
|
+
getNextPageParam: ({ variables, lastPage, lastPageParam }) => {
|
|
72
|
+
const size = variables.filters.size ?? 1
|
|
73
|
+
const parsedLastPageParam = (lastPageParam as number) ?? variables.filters.page ?? 1
|
|
74
|
+
return lastPage.items && lastPage.items.length < size ? undefined : parsedLastPageParam + 1
|
|
75
|
+
},
|
|
76
|
+
})
|
|
77
|
+
|
|
57
78
|
/**
|
|
58
79
|
* List agents available to be added to other agents
|
|
59
80
|
*/
|
|
60
81
|
availableAgentsForMultiAgentAddition = this.query(removeAuthorizationParam(listMultiAgentsV1AgentsMultiAgentsGet))
|
|
61
82
|
|
|
62
83
|
/**
|
|
84
|
+
* @deprecated
|
|
63
85
|
* Gets agent by id
|
|
64
86
|
*/
|
|
65
87
|
agent = this.query(removeAuthorizationParam(getAgentV1AgentsAgentIdGet))
|
|
66
88
|
|
|
67
89
|
/**
|
|
90
|
+
* @deprecated
|
|
68
91
|
* Gets agents by ids
|
|
69
92
|
*/
|
|
70
|
-
agentsByIds = this.query(removeAuthorizationParam(
|
|
93
|
+
agentsByIds = this.query(removeAuthorizationParam(searchAgentsByIdsV1AgentsSearchPost))
|
|
71
94
|
|
|
72
95
|
/**
|
|
73
96
|
* Gets the default agent slug
|
|
@@ -80,11 +103,11 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
80
103
|
agentDefault = this.query({
|
|
81
104
|
name: 'agentDefault',
|
|
82
105
|
request: async (signal) => {
|
|
83
|
-
const agentDefault = await
|
|
84
|
-
{
|
|
106
|
+
const agentDefault = await listAgentsV3AgentsGet(
|
|
107
|
+
{ filters: { visibility_list: ['built_in'], slug: this.agentDefaultSlug }, authorization: '' }, { signal },
|
|
85
108
|
)
|
|
86
109
|
|
|
87
|
-
const agentId = agentDefault?.find((agent) => agent.slug === this.agentDefaultSlug)?.id
|
|
110
|
+
const agentId = agentDefault?.items?.find((agent) => agent.slug === this.agentDefaultSlug)?.id
|
|
88
111
|
const agent = agentId ? await this.agent.query({ agentId }) : undefined
|
|
89
112
|
return agent
|
|
90
113
|
},
|
|
@@ -95,40 +118,61 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
95
118
|
*/
|
|
96
119
|
allAgents = this.query({
|
|
97
120
|
name: 'allAgents',
|
|
98
|
-
request: async (signal, variables: { visibilities: (AgentVisibilityLevel | 'all')[] }) => {
|
|
121
|
+
request: async (signal, variables: { visibilities: (AgentVisibilityLevel | 'all')[], filter?: string }) => {
|
|
99
122
|
const allVisibilities = ['account', 'built_in', 'recently_used', 'favorite', 'personal', 'shared', 'workspace'] as const
|
|
100
|
-
const visibilities = variables.visibilities.includes('all')
|
|
123
|
+
const visibilities = !variables.visibilities || variables.visibilities?.includes('all')
|
|
101
124
|
? allVisibilities
|
|
102
125
|
: variables.visibilities as Array<AgentVisibilityLevelEnum | VisibilityLevelEnum>
|
|
103
|
-
|
|
104
126
|
const shouldFetchWorkspaceAgents = visibilities.includes('workspace')
|
|
105
|
-
|
|
127
|
+
|
|
106
128
|
const workspaceAgentsPromise = shouldFetchWorkspaceAgents
|
|
107
129
|
? workspaceAiClient.workspacesContentsByType.query({ contentType: 'agent' })
|
|
108
130
|
: Promise.resolve([])
|
|
109
131
|
|
|
110
|
-
const
|
|
132
|
+
const listAgentsVisibilities = visibilities.filter((visibility) => visibility!=='workspace')
|
|
133
|
+
const listAgentsPromise = listAgentsVisibilities.length
|
|
134
|
+
? listAgentsV3AgentsGet({ filters: {
|
|
135
|
+
visibility_list: listAgentsVisibilities as (AgentVisibilityLevelEnum | VisibilityLevelEnum)[],
|
|
136
|
+
name: variables.filter,
|
|
137
|
+
},
|
|
138
|
+
authorization: '' }, { signal })
|
|
139
|
+
: Promise.resolve({ items: [] })
|
|
140
|
+
|
|
141
|
+
const [workspaceAgents, agentsByVisibility] = await Promise.all([
|
|
111
142
|
workspaceAgentsPromise,
|
|
112
|
-
|
|
143
|
+
listAgentsPromise,
|
|
113
144
|
])
|
|
114
145
|
|
|
115
146
|
const workspaceAgentsWithSpaceName = workspaceAgents.flatMap(({ agents, space_name }) =>
|
|
116
147
|
agents?.map((agent) => ({ ...agent, spaceName: space_name, builtIn: false }))) as AgentResponseWithBuiltIn[]
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
|
|
120
|
-
|
|
148
|
+
|
|
149
|
+
const filteredWorkspaceAgents = variables.filter ? workspaceAgentsWithSpaceName.filter((agent) =>
|
|
150
|
+
agent.name.toLowerCase().includes(variables.filter!)) :
|
|
151
|
+
workspaceAgentsWithSpaceName
|
|
152
|
+
|
|
153
|
+
const allAgents: AgentResponseWithBuiltIn[] = filteredWorkspaceAgents ?? []
|
|
154
|
+
|
|
155
|
+
agentsByVisibility.items?.forEach(agent => allAgents.push(({
|
|
121
156
|
...agent,
|
|
122
157
|
builtIn: agent?.visibility_level === 'built_in',
|
|
123
|
-
})))
|
|
158
|
+
})))
|
|
124
159
|
|
|
125
160
|
return allAgents
|
|
126
161
|
},
|
|
127
162
|
})
|
|
128
163
|
|
|
129
|
-
|
|
130
|
-
|
|
164
|
+
/**
|
|
165
|
+
* Lists all custom toolkits.
|
|
166
|
+
*/
|
|
131
167
|
toolkits = this.query(removeAuthorizationParam(listToolkitsV1ToolkitsGet))
|
|
168
|
+
/**
|
|
169
|
+
* Get list of Toolkits V2
|
|
170
|
+
*/
|
|
171
|
+
toolkitsV2 = this.infiniteQuery(listToolkitsAuthorization, { accumulator: 'items' })
|
|
172
|
+
/**
|
|
173
|
+
* Lists all tools of an MCP toolkit.
|
|
174
|
+
*/
|
|
175
|
+
mcpTools = this.query(removeAuthorizationParam(listMcpToolsV1McpToolsToolkitIdGet))
|
|
132
176
|
/**
|
|
133
177
|
* Get a toolkit by Id
|
|
134
178
|
*/
|
|
@@ -161,6 +205,7 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
161
205
|
* Delete tool from Toolkit
|
|
162
206
|
*/
|
|
163
207
|
deleteToolFromToolkit = this.mutation(removeAuthorizationParam(deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete))
|
|
208
|
+
|
|
164
209
|
/**
|
|
165
210
|
* Previews an uploaded open api file as a stream where each array item is an OpenAPI operation.
|
|
166
211
|
*/
|
|
@@ -198,6 +243,54 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
198
243
|
* remove an agent from favorites
|
|
199
244
|
*/
|
|
200
245
|
removeFavorite = this.mutation(removeAuthorizationParam(deleteFavoriteV1AgentsAgentIdFavoriteDelete))
|
|
246
|
+
/**
|
|
247
|
+
* Creates an agent version
|
|
248
|
+
*/
|
|
249
|
+
createAgentVersion = this.mutation(removeAuthorizationParam(createVersionV1AgentsAgentCoreIdVersionsPost))
|
|
250
|
+
/**
|
|
251
|
+
* V2 of agent creation
|
|
252
|
+
*/
|
|
253
|
+
createAgentV2 = this.mutation(removeAuthorizationParam(createAgentV2AgentsPost))
|
|
254
|
+
/**
|
|
255
|
+
* V2 of agent update
|
|
256
|
+
*/
|
|
257
|
+
updateAgentV2 = this.mutation(removeAuthorizationParam(updateAgentV2AgentsAgentIdPatch))
|
|
258
|
+
/**
|
|
259
|
+
* Update agent recommended version
|
|
260
|
+
*/
|
|
261
|
+
updateRecommendedVersion = this.mutation(removeAuthorizationParam(patchVersionRecommendedV1AgentsAgentCoreIdVersionsVersionNumberPatch))
|
|
262
|
+
/**
|
|
263
|
+
* V2 of get agent by id
|
|
264
|
+
*/
|
|
265
|
+
agentV2 = this.query(removeAuthorizationParam(findByAgentCoreIdV2AgentsAgentCoreIdGet))
|
|
266
|
+
/**
|
|
267
|
+
* Deletes an agent version
|
|
268
|
+
*/
|
|
269
|
+
deleteVersion = this.mutation(removeAuthorizationParam(deleteVersionV1AgentsAgentCoreIdVersionsVersionNumberDelete))
|
|
270
|
+
/**
|
|
271
|
+
* Gets agent versions
|
|
272
|
+
*/
|
|
273
|
+
listAgentVersions = this.query(removeAuthorizationParam(listVersionsOfAgentCoreV1AgentsAgentCoreIdVersionsGet))
|
|
274
|
+
/**
|
|
275
|
+
* Get agents by list of ids using api v2
|
|
276
|
+
*/
|
|
277
|
+
agentsByIdsV2 = this.query(removeAuthorizationParam(searchAgentsV2AgentsSearchPost))
|
|
278
|
+
/**
|
|
279
|
+
* Deletes an agent version
|
|
280
|
+
*/
|
|
281
|
+
forkAgentVersion = this.mutation(removeAuthorizationParam(forkAgentVersionV1AgentsAgentCoreIdVersionsVersionNumberForkPost))
|
|
282
|
+
/**
|
|
283
|
+
* Get agents v4
|
|
284
|
+
*/
|
|
285
|
+
agentsV4 = this.infiniteQuery(listAgentsV4, {
|
|
286
|
+
pageParamName: 'filters.page',
|
|
287
|
+
accumulator: 'items',
|
|
288
|
+
getNextPageParam: ({ variables, lastPage, lastPageParam }) => {
|
|
289
|
+
const size = variables.filters.size ?? 1
|
|
290
|
+
const parsedLastPageParam = (lastPageParam as number) ?? variables.filters.page ?? 1
|
|
291
|
+
return lastPage.items && lastPage.items.length < size ? undefined : parsedLastPageParam + 1
|
|
292
|
+
},
|
|
293
|
+
})
|
|
201
294
|
}
|
|
202
295
|
|
|
203
296
|
export const agentToolsClient = new AgentToolsClient()
|