@stack-spot/portal-network 1.0.0-betaadp.3 → 1.0.0-dev.1768422812092

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.
Files changed (215) hide show
  1. package/CHANGELOG.md +633 -0
  2. package/dist/api/account.d.ts +413 -277
  3. package/dist/api/account.d.ts.map +1 -1
  4. package/dist/api/account.js +261 -176
  5. package/dist/api/account.js.map +1 -1
  6. package/dist/api/accountAssetManager.d.ts +309 -0
  7. package/dist/api/accountAssetManager.d.ts.map +1 -0
  8. package/dist/api/accountAssetManager.js +169 -0
  9. package/dist/api/accountAssetManager.js.map +1 -0
  10. package/dist/api/agent-tools.d.ts +243 -149
  11. package/dist/api/agent-tools.d.ts.map +1 -1
  12. package/dist/api/agent-tools.js +77 -5
  13. package/dist/api/agent-tools.js.map +1 -1
  14. package/dist/api/agent.d.ts +55 -55
  15. package/dist/api/agent.d.ts.map +1 -1
  16. package/dist/api/ai.d.ts +487 -98
  17. package/dist/api/ai.d.ts.map +1 -1
  18. package/dist/api/ai.js +427 -146
  19. package/dist/api/ai.js.map +1 -1
  20. package/dist/api/cloudPlatform.d.ts +374 -221
  21. package/dist/api/cloudPlatform.d.ts.map +1 -1
  22. package/dist/api/cloudPlatform.js +299 -93
  23. package/dist/api/cloudPlatform.js.map +1 -1
  24. package/dist/api/cloudPlatformHorizon.d.ts +178 -9
  25. package/dist/api/cloudPlatformHorizon.d.ts.map +1 -1
  26. package/dist/api/cloudPlatformHorizon.js +69 -1
  27. package/dist/api/cloudPlatformHorizon.js.map +1 -1
  28. package/dist/api/codeShift.d.ts +1125 -83
  29. package/dist/api/codeShift.d.ts.map +1 -1
  30. package/dist/api/codeShift.js +538 -16
  31. package/dist/api/codeShift.js.map +1 -1
  32. package/dist/api/dataIntegration.d.ts +291 -1
  33. package/dist/api/dataIntegration.d.ts.map +1 -1
  34. package/dist/api/dataIntegration.js +254 -0
  35. package/dist/api/dataIntegration.js.map +1 -1
  36. package/dist/api/discover.d.ts +98 -12
  37. package/dist/api/discover.d.ts.map +1 -1
  38. package/dist/api/discover.js +78 -2
  39. package/dist/api/discover.js.map +1 -1
  40. package/dist/api/edpBfa.d.ts +215 -0
  41. package/dist/api/edpBfa.d.ts.map +1 -0
  42. package/dist/api/edpBfa.js +87 -0
  43. package/dist/api/edpBfa.js.map +1 -0
  44. package/dist/api/genAiInference.d.ts +22 -2
  45. package/dist/api/genAiInference.d.ts.map +1 -1
  46. package/dist/api/genAiInference.js +22 -3
  47. package/dist/api/genAiInference.js.map +1 -1
  48. package/dist/api/workflows.d.ts +68 -5
  49. package/dist/api/workflows.d.ts.map +1 -1
  50. package/dist/api/workflows.js +16 -0
  51. package/dist/api/workflows.js.map +1 -1
  52. package/dist/api/workspaceManager.d.ts +16 -10
  53. package/dist/api/workspaceManager.d.ts.map +1 -1
  54. package/dist/api/workspaceManager.js +10 -0
  55. package/dist/api/workspaceManager.js.map +1 -1
  56. package/dist/api-addresses.d.ts +20 -18
  57. package/dist/api-addresses.d.ts.map +1 -1
  58. package/dist/api-addresses.js +81 -21
  59. package/dist/api-addresses.js.map +1 -1
  60. package/dist/apis-itau.json +241 -0
  61. package/dist/apis.json +17 -1
  62. package/dist/client/account-asset-manager.d.ts +112 -0
  63. package/dist/client/account-asset-manager.d.ts.map +1 -0
  64. package/dist/client/account-asset-manager.js +160 -0
  65. package/dist/client/account-asset-manager.js.map +1 -0
  66. package/dist/client/account.d.ts +265 -242
  67. package/dist/client/account.d.ts.map +1 -1
  68. package/dist/client/account.js +80 -34
  69. package/dist/client/account.js.map +1 -1
  70. package/dist/client/agent-tools.d.ts +166 -119
  71. package/dist/client/agent-tools.d.ts.map +1 -1
  72. package/dist/client/agent-tools.js +62 -11
  73. package/dist/client/agent-tools.js.map +1 -1
  74. package/dist/client/agent.d.ts +46 -46
  75. package/dist/client/agent.d.ts.map +1 -1
  76. package/dist/client/ai.d.ts +266 -79
  77. package/dist/client/ai.d.ts.map +1 -1
  78. package/dist/client/ai.js +262 -20
  79. package/dist/client/ai.js.map +1 -1
  80. package/dist/client/api-management.d.ts +10 -1
  81. package/dist/client/api-management.d.ts.map +1 -1
  82. package/dist/client/api-management.js +11 -2
  83. package/dist/client/api-management.js.map +1 -1
  84. package/dist/client/cloud-account.d.ts +13 -13
  85. package/dist/client/cloud-platform-horizon.d.ts +38 -19
  86. package/dist/client/cloud-platform-horizon.d.ts.map +1 -1
  87. package/dist/client/cloud-platform-horizon.js +19 -1
  88. package/dist/client/cloud-platform-horizon.js.map +1 -1
  89. package/dist/client/cloud-platform.d.ts +213 -46
  90. package/dist/client/cloud-platform.d.ts.map +1 -1
  91. package/dist/client/cloud-platform.js +168 -33
  92. package/dist/client/cloud-platform.js.map +1 -1
  93. package/dist/client/cloud-runtimes.d.ts +4 -4
  94. package/dist/client/cloud-services.d.ts +17 -17
  95. package/dist/client/cloud-services.d.ts.map +1 -1
  96. package/dist/client/code-shift.d.ts +535 -162
  97. package/dist/client/code-shift.d.ts.map +1 -1
  98. package/dist/client/code-shift.js +296 -7
  99. package/dist/client/code-shift.js.map +1 -1
  100. package/dist/client/content.d.ts +127 -132
  101. package/dist/client/content.d.ts.map +1 -1
  102. package/dist/client/data-integration.d.ts +92 -53
  103. package/dist/client/data-integration.d.ts.map +1 -1
  104. package/dist/client/data-integration.js +38 -2
  105. package/dist/client/data-integration.js.map +1 -1
  106. package/dist/client/discover.d.ts +31 -10
  107. package/dist/client/discover.d.ts.map +1 -1
  108. package/dist/client/discover.js +239 -3
  109. package/dist/client/discover.js.map +1 -1
  110. package/dist/client/edp-bfa.d.ts +16 -0
  111. package/dist/client/edp-bfa.d.ts.map +1 -0
  112. package/dist/client/edp-bfa.js +24 -0
  113. package/dist/client/edp-bfa.js.map +1 -0
  114. package/dist/client/event-bus.d.ts.map +1 -1
  115. package/dist/client/gen-ai-inference.d.ts +20 -20
  116. package/dist/client/insights.d.ts +7 -7
  117. package/dist/client/notification.d.ts +17 -10
  118. package/dist/client/notification.d.ts.map +1 -1
  119. package/dist/client/notification.js +10 -1
  120. package/dist/client/notification.js.map +1 -1
  121. package/dist/client/runtime-manager.d.ts +8 -8
  122. package/dist/client/secrets.d.ts.map +1 -1
  123. package/dist/client/secrets.js +1 -1
  124. package/dist/client/secrets.js.map +1 -1
  125. package/dist/client/types.d.ts +50 -7
  126. package/dist/client/types.d.ts.map +1 -1
  127. package/dist/client/workflow.d.ts +10 -10
  128. package/dist/client/workspace-ai.d.ts +53 -53
  129. package/dist/client/workspace-ai.d.ts.map +1 -1
  130. package/dist/client/workspace-ai.js +3 -7
  131. package/dist/client/workspace-ai.js.map +1 -1
  132. package/dist/client/workspace-manager.d.ts +115 -76
  133. package/dist/client/workspace-manager.d.ts.map +1 -1
  134. package/dist/client/workspace-manager.js +47 -2
  135. package/dist/client/workspace-manager.js.map +1 -1
  136. package/dist/client/workspace-search.d.ts +2 -2
  137. package/dist/client/workspace.d.ts +58 -105
  138. package/dist/client/workspace.d.ts.map +1 -1
  139. package/dist/error/DefaultAPIError.d.ts.map +1 -1
  140. package/dist/error/DefaultAPIError.js.map +1 -1
  141. package/dist/error/StackspotAPIError.d.ts +3 -4
  142. package/dist/error/StackspotAPIError.d.ts.map +1 -1
  143. package/dist/error/StackspotAPIError.js +3 -3
  144. package/dist/error/StackspotAPIError.js.map +1 -1
  145. package/dist/error/dictionary/accountAssetManager.d.ts +11 -0
  146. package/dist/error/dictionary/accountAssetManager.d.ts.map +1 -0
  147. package/dist/error/dictionary/accountAssetManager.js +11 -0
  148. package/dist/error/dictionary/accountAssetManager.js.map +1 -0
  149. package/dist/error/dictionary/cloud-platform.d.ts +76 -8
  150. package/dist/error/dictionary/cloud-platform.d.ts.map +1 -1
  151. package/dist/error/dictionary/cloud-platform.js +80 -12
  152. package/dist/error/dictionary/cloud-platform.js.map +1 -1
  153. package/dist/error/dictionary/workspace-ai.d.ts +9 -0
  154. package/dist/error/dictionary/workspace-ai.d.ts.map +1 -0
  155. package/dist/error/dictionary/workspace-ai.js +9 -0
  156. package/dist/error/dictionary/workspace-ai.js.map +1 -0
  157. package/dist/index.d.ts +5 -3
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +4 -2
  160. package/dist/index.js.map +1 -1
  161. package/dist/network/NetworkClient.d.ts +4 -2
  162. package/dist/network/NetworkClient.d.ts.map +1 -1
  163. package/dist/network/NetworkClient.js +16 -4
  164. package/dist/network/NetworkClient.js.map +1 -1
  165. package/dist/network/types.d.ts +2 -0
  166. package/dist/network/types.d.ts.map +1 -1
  167. package/dist/utils/StreamedJson.d.ts +3 -1
  168. package/dist/utils/StreamedJson.d.ts.map +1 -1
  169. package/dist/utils/StreamedJson.js +23 -3
  170. package/dist/utils/StreamedJson.js.map +1 -1
  171. package/package.dev.json +3 -0
  172. package/package.json +10 -9
  173. package/package.stg.json +3 -0
  174. package/readme.md +40 -1
  175. package/src/api/account.ts +701 -540
  176. package/src/api/accountAssetManager.ts +771 -0
  177. package/src/api/agent-tools.ts +332 -151
  178. package/src/api/ai.ts +891 -170
  179. package/src/api/cloudPlatform.ts +667 -298
  180. package/src/api/cloudPlatformHorizon.ts +412 -9
  181. package/src/api/codeShift.ts +2088 -97
  182. package/src/api/dataIntegration.ts +635 -1
  183. package/src/api/discover.ts +180 -14
  184. package/src/api/edpBfa.ts +472 -0
  185. package/src/api/genAiInference.ts +47 -4
  186. package/src/api/workflows.ts +100 -5
  187. package/src/api/workspaceManager.ts +25 -10
  188. package/src/api-addresses.ts +113 -38
  189. package/src/apis-itau.json +241 -0
  190. package/src/apis.json +17 -1
  191. package/src/client/account-asset-manager.ts +100 -0
  192. package/src/client/account.ts +71 -40
  193. package/src/client/agent-tools.ts +57 -17
  194. package/src/client/ai.ts +232 -20
  195. package/src/client/api-management.ts +7 -2
  196. package/src/client/cloud-platform-horizon.ts +12 -4
  197. package/src/client/cloud-platform.ts +101 -27
  198. package/src/client/code-shift.ts +196 -8
  199. package/src/client/data-integration.ts +28 -1
  200. package/src/client/discover.ts +238 -5
  201. package/src/client/edp-bfa.ts +24 -0
  202. package/src/client/notification.ts +6 -1
  203. package/src/client/secrets.ts +1 -1
  204. package/src/client/types.ts +55 -9
  205. package/src/client/workspace-ai.ts +19 -23
  206. package/src/client/workspace-manager.ts +31 -2
  207. package/src/error/DefaultAPIError.ts +5 -5
  208. package/src/error/StackspotAPIError.ts +4 -4
  209. package/src/error/dictionary/accountAssetManager.ts +12 -0
  210. package/src/error/dictionary/cloud-platform.ts +80 -12
  211. package/src/error/dictionary/workspace-ai.ts +10 -0
  212. package/src/index.ts +6 -3
  213. package/src/network/NetworkClient.ts +18 -6
  214. package/src/network/types.ts +3 -0
  215. package/src/utils/StreamedJson.tsx +19 -4
@@ -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
- findSecrets1,
45
+ findSecrets,
45
46
  getAccess,
46
47
  getAccount1,
47
48
  getAccountMembers,
48
- getAccountMembers2,
49
+ getAccountMembers1,
49
50
  getAccountRateLimit,
50
- getAccounts1,
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
- getResources1,
80
+ getResources,
79
81
  getResources2,
80
- getResourcesAndActionsWithStatus1,
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, getRoles5,
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
- listScmCredentials,
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(getAccountMembers2)
233
+ allMembers = this.infiniteQuery(getAccountMembers)
226
234
  /**
227
235
  * Gets member Groups (paginated).
228
236
  */
229
- memberGroups = this.infiniteQuery(getMemberGroups1)
237
+ memberGroups = this.infiniteQuery(getMemberGroups)
230
238
  /**
231
239
  * Gets member roles (paginated).
232
240
  */
233
- memberRoles = this.infiniteQuery(getRoles4)
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(getGroups1)
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(getMembers1)
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(getRoles5)
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
- * Gets all resources of a group (paginated).
331
+ * Get all resources by groups with pagination.
324
332
  */
325
- groupResources = this.infiniteQuery(getGroupResources1)
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(getRoles3)
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 getRoles3({ filterBy: 'id', filterValue: id }, { signal })
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(getRoleMembers1)
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(getRoleGroups1)
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(getResourcesAndActionsWithStatus1)
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(getResources1)
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(listScmCredentials2)
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(listScmCredentials)
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(getAccountMembers)
634
+ allMembersWithPagination = this.query(getAccountMembers1)
627
635
  /**
628
636
  * Get Members Groups By Profile
629
637
  */
630
- allMembersGroupsByProfileWithPagination = this.query(getMemberGroups)
638
+ allMembersGroupsByProfileWithPagination = this.query(getMemberGroups1)
631
639
  /**
632
640
  * Get Members Roles By Profile
633
641
  */
634
- allMembersRolesByProfileWithPagination = this.query(getRoles1)
642
+ allMembersRolesByProfileWithPagination = this.query(getRoles4)
635
643
  /**
636
644
  * Get all account groups with pagination
637
645
  */
638
- allGroupsWithPagination = this.query(getGroups)
646
+ allGroupsWithPagination = this.query(getGroups1)
639
647
  /**
640
648
  * Get all members by group with pagination
641
649
  */
642
- allMembersByGroupWithPagination = this.query(getMembers)
650
+ allMembersByGroupWithPagination = this.query(getMembers1)
643
651
  /**
644
652
  * Get all roles by groups with pagination
645
653
  */
646
- allRolesByGroupWithPagination = this.query(getRoles2)
654
+ allRolesByGroupWithPagination = this.query(getRoles5)
647
655
  /**
648
- * Get all resources by groups with pagination
656
+ * Gets all resources of a group (paginated)
649
657
  */
650
- allResourcesByGroupWithPagination = this.query(getGroupResources)
658
+ groupResources = this.query(getGroupResources1)
651
659
  /**
652
660
  * Get all roles account with pagination
653
661
  */
654
- allRolesWithPagination = this.query(getRoles)
662
+ allRolesWithPagination = this.query(getRoles3)
655
663
  /**
656
664
  * Get all members by role with pagination
657
665
  */
658
- allMembersByRoleWithPagination = this.query(getRoleMembers)
666
+ allMembersByRoleWithPagination = this.query(getRoleMembers1)
659
667
  /**
660
668
  * Get all groups by roles with pagination
661
669
  */
662
- allGroupsByRoleWithPagination = this.query(getRoleGroups)
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(listExtensions)
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(findSecrets1)
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(getAccounts1)
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, searchAgentsV1AgentsSearchPost, shareV1AgentsAgentIdSharePost, updateAgentV1AgentsAgentIdPatch, updateToolkitV1ToolkitsToolkitIdPatch, VisibilityLevelEnum } from '../api/agent-tools'
3
+ import { addFavoriteV1AgentsAgentIdFavoritePost, AgentVisibilityLevelEnum, createAgentV1AgentsPost, createToolkitToolsV1ToolkitsToolkitIdToolsPost, createToolkitV1ToolkitsPost, defaults, deleteAgentV1AgentsAgentIdDelete, deleteFavoriteV1AgentsAgentIdFavoriteDelete, deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete, deleteToolkitV1ToolkitsToolkitIdDelete, editToolkitToolV1ToolkitsToolkitIdToolsToolIdPut, forkAgentV1AgentsAgentIdForkPost, forkToolkitV1ToolkitsToolkitIdForkPost, getAgentV1AgentsAgentIdGet, getPublicToolKitsV1BuiltinToolkitGet, getToolkitToolV1ToolkitsToolkitIdToolsToolIdGet, getToolkitV1ToolkitsToolkitIdGet, listAgentsUsingToolsV1ToolkitsToolkitIdToolsAgentsPost, listAgentsV1AgentsGet, listAgentsV3AgentsGet, listMcpToolsV1McpToolsToolkitIdGet, listMultiAgentsV1AgentsMultiAgentsGet, listToolkitsV1ToolkitsGet, listToolkitsV2ToolkitsGet, publishAgentV1AgentsAgentIdPublishPost, searchAgentsV1AgentsSearchPost, shareV1AgentsAgentIdSharePost, updateAgentV1AgentsAgentIdPatch, 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,8 @@ 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 listToolkitsAuthorization = removeAuthorizationParam(listToolkitsV2ToolkitsGet)
15
17
 
16
18
  class AgentToolsClient extends ReactQueryNetworkClient {
17
19
  constructor() {
@@ -22,6 +24,9 @@ class AgentToolsClient extends ReactQueryNetworkClient {
22
24
  return new DefaultAPIError(error.data, error.status, agentToolsDictionary, error.headers)
23
25
  }
24
26
 
27
+ /**
28
+ * Lists all public toolkits.
29
+ */
25
30
  tools = this.query(removeAuthorizationParam(getPublicToolKitsV1BuiltinToolkitGet))
26
31
 
27
32
  /**
@@ -54,6 +59,19 @@ class AgentToolsClient extends ReactQueryNetworkClient {
54
59
  */
55
60
  agents = this.infiniteQuery(removeAuthorizationParam(listAgentsV1AgentsGet))
56
61
 
62
+ /**
63
+ * List agents with support for multiple filters
64
+ */
65
+ agentsMultipleFilters = this.infiniteQuery(listAgentsV3AgentsWithoutAuthorization, {
66
+ pageParamName: 'filters.page',
67
+ accumulator: 'items',
68
+ getNextPageParam: ({ variables, lastPage, lastPageParam }) => {
69
+ const size = variables.filters.size ?? 1
70
+ const parsedLastPageParam = (lastPageParam as number) ?? variables.filters.page ?? 1
71
+ return lastPage.items && lastPage.items.length < size ? undefined : parsedLastPageParam + 1
72
+ },
73
+ })
74
+
57
75
  /**
58
76
  * List agents available to be added to other agents
59
77
  */
@@ -80,11 +98,11 @@ class AgentToolsClient extends ReactQueryNetworkClient {
80
98
  agentDefault = this.query({
81
99
  name: 'agentDefault',
82
100
  request: async (signal) => {
83
- const agentDefault = await listAgentsV1AgentsGet(
84
- { visibility: 'built_in', slug: this.agentDefaultSlug, authorization: '' }, { signal },
101
+ const agentDefault = await listAgentsV3AgentsGet(
102
+ { filters: { visibility_list: ['built_in'], slug: this.agentDefaultSlug }, authorization: '' }, { signal },
85
103
  )
86
104
 
87
- const agentId = agentDefault?.find((agent) => agent.slug === this.agentDefaultSlug)?.id
105
+ const agentId = agentDefault?.items?.find((agent) => agent.slug === this.agentDefaultSlug)?.id
88
106
  const agent = agentId ? await this.agent.query({ agentId }) : undefined
89
107
  return agent
90
108
  },
@@ -95,40 +113,61 @@ class AgentToolsClient extends ReactQueryNetworkClient {
95
113
  */
96
114
  allAgents = this.query({
97
115
  name: 'allAgents',
98
- request: async (signal, variables: { visibilities: (AgentVisibilityLevel | 'all')[] }) => {
116
+ request: async (signal, variables: { visibilities: (AgentVisibilityLevel | 'all')[], filter?: string }) => {
99
117
  const allVisibilities = ['account', 'built_in', 'recently_used', 'favorite', 'personal', 'shared', 'workspace'] as const
100
- const visibilities = variables.visibilities.includes('all')
118
+ const visibilities = !variables.visibilities || variables.visibilities?.includes('all')
101
119
  ? allVisibilities
102
120
  : variables.visibilities as Array<AgentVisibilityLevelEnum | VisibilityLevelEnum>
103
-
104
121
  const shouldFetchWorkspaceAgents = visibilities.includes('workspace')
105
-
122
+
106
123
  const workspaceAgentsPromise = shouldFetchWorkspaceAgents
107
124
  ? workspaceAiClient.workspacesContentsByType.query({ contentType: 'agent' })
108
125
  : Promise.resolve([])
109
126
 
110
- const [workspaceAgents, ...agentsByVisibility] = await Promise.all([
127
+ const listAgentsVisibilities = visibilities.filter((visibility) => visibility!=='workspace')
128
+ const listAgentsPromise = listAgentsVisibilities.length
129
+ ? listAgentsV3AgentsGet({ filters: {
130
+ visibility_list: listAgentsVisibilities as (AgentVisibilityLevelEnum | VisibilityLevelEnum)[],
131
+ name: variables.filter,
132
+ },
133
+ authorization: '' }, { signal })
134
+ : Promise.resolve({ items: [] })
135
+
136
+ const [workspaceAgents, agentsByVisibility] = await Promise.all([
111
137
  workspaceAgentsPromise,
112
- ...visibilities.map((visibility) => listAgentsV1AgentsGet({ visibility, authorization: '' }, { signal })),
138
+ listAgentsPromise,
113
139
  ])
114
140
 
115
141
  const workspaceAgentsWithSpaceName = workspaceAgents.flatMap(({ agents, space_name }) =>
116
142
  agents?.map((agent) => ({ ...agent, spaceName: space_name, builtIn: false }))) as AgentResponseWithBuiltIn[]
117
-
118
- const allAgents: AgentResponseWithBuiltIn[] = workspaceAgentsWithSpaceName ?? []
119
-
120
- agentsByVisibility.forEach(agents => allAgents.push(...agents.map(agent => ({
143
+
144
+ const filteredWorkspaceAgents = variables.filter ? workspaceAgentsWithSpaceName.filter((agent) =>
145
+ agent.name.toLowerCase().includes(variables.filter!)) :
146
+ workspaceAgentsWithSpaceName
147
+
148
+ const allAgents: AgentResponseWithBuiltIn[] = filteredWorkspaceAgents ?? []
149
+
150
+ agentsByVisibility.items?.forEach(agent => allAgents.push(({
121
151
  ...agent,
122
152
  builtIn: agent?.visibility_level === 'built_in',
123
- }))))
153
+ })))
124
154
 
125
155
  return allAgents
126
156
  },
127
157
  })
128
158
 
129
- /* Get list of Toolkits
130
- */
159
+ /**
160
+ * Lists all custom toolkits.
161
+ */
131
162
  toolkits = this.query(removeAuthorizationParam(listToolkitsV1ToolkitsGet))
163
+ /**
164
+ * Get list of Toolkits V2
165
+ */
166
+ toolkitsV2 = this.infiniteQuery(listToolkitsAuthorization, { accumulator: 'items' })
167
+ /**
168
+ * Lists all tools of an MCP toolkit.
169
+ */
170
+ mcpTools = this.query(removeAuthorizationParam(listMcpToolsV1McpToolsToolkitIdGet))
132
171
  /**
133
172
  * Get a toolkit by Id
134
173
  */
@@ -161,6 +200,7 @@ class AgentToolsClient extends ReactQueryNetworkClient {
161
200
  * Delete tool from Toolkit
162
201
  */
163
202
  deleteToolFromToolkit = this.mutation(removeAuthorizationParam(deleteToolkitToolsV1ToolkitsToolkitIdToolsDelete))
203
+
164
204
  /**
165
205
  * Previews an uploaded open api file as a stream where each array item is an OpenAPI operation.
166
206
  */