@stack-spot/portal-network 1.0.0-dev.1770385994291 → 1.0.0-dev.1770819406507

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.
@@ -1,6 +1,6 @@
1
1
  import { HttpError } from '@oazapfts/runtime'
2
2
  import { getApiAddresses } from '../api-addresses'
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'
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, 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,7 +12,6 @@ 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
15
  const listAgentsV4 = removeAuthorizationParam(listAgentsV4AgentsGet)
17
16
  const listToolkitsAuthorization = removeAuthorizationParam(listToolkitsV2ToolkitsGet)
18
17
 
@@ -58,6 +57,7 @@ class AgentToolsClient extends ReactQueryNetworkClient {
58
57
  publishAgent = this.mutation(removeAuthorizationParam(publishAgentV1AgentsAgentIdPublishPost))
59
58
 
60
59
  /**
60
+ * @default
61
61
  * List agents
62
62
  */
63
63
  agents = this.infiniteQuery(removeAuthorizationParam(listAgentsV1AgentsGet))
@@ -65,7 +65,7 @@ class AgentToolsClient extends ReactQueryNetworkClient {
65
65
  /**
66
66
  * List agents with support for multiple filters
67
67
  */
68
- agentsMultipleFilters = this.infiniteQuery(listAgentsV3AgentsWithoutAuthorization, {
68
+ agentsMultipleFilters = this.infiniteQuery(listAgentsV4, {
69
69
  pageParamName: 'filters.page',
70
70
  accumulator: 'items',
71
71
  getNextPageParam: ({ variables, lastPage, lastPageParam }) => {
@@ -103,12 +103,12 @@ class AgentToolsClient extends ReactQueryNetworkClient {
103
103
  agentDefault = this.query({
104
104
  name: 'agentDefault',
105
105
  request: async (signal) => {
106
- const agentDefault = await listAgentsV3AgentsGet(
107
- { filters: { visibility_list: ['built_in'], slug: this.agentDefaultSlug }, authorization: '' }, { signal },
106
+ const agentDefault = await listAgentsV4(
107
+ { filters: { visibility_list: ['built_in'], slug: this.agentDefaultSlug } }, { signal },
108
108
  )
109
109
 
110
110
  const agentId = agentDefault?.items?.find((agent) => agent.slug === this.agentDefaultSlug)?.id
111
- const agent = agentId ? await this.agent.query({ agentId }) : undefined
111
+ const agent = agentId ? await this.agentV2.query({ agentCoreId: agentId }) : undefined
112
112
  return agent
113
113
  },
114
114
  })
@@ -131,11 +131,10 @@ class AgentToolsClient extends ReactQueryNetworkClient {
131
131
 
132
132
  const listAgentsVisibilities = visibilities.filter((visibility) => visibility!=='workspace')
133
133
  const listAgentsPromise = listAgentsVisibilities.length
134
- ? listAgentsV3AgentsGet({ filters: {
134
+ ? listAgentsV4({ filters: {
135
135
  visibility_list: listAgentsVisibilities as (AgentVisibilityLevelEnum | VisibilityLevelEnum)[],
136
136
  name: variables.filter,
137
- },
138
- authorization: '' }, { signal })
137
+ } }, { signal })
139
138
  : Promise.resolve({ items: [] })
140
139
 
141
140
  const [workspaceAgents, agentsByVisibility] = await Promise.all([
@@ -279,20 +278,6 @@ class AgentToolsClient extends ReactQueryNetworkClient {
279
278
  * Deletes an agent version
280
279
  */
281
280
  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
- })
294
281
  }
295
282
 
296
283
  export const agentToolsClient = new AgentToolsClient()
297
-
298
-
package/src/client/ai.ts CHANGED
@@ -503,7 +503,7 @@ class AIClient extends ReactQueryNetworkClient {
503
503
  progress?.onStepChange?.({ step: step.slug, ...resultMap, answer: responseData, statusResult: 'END' })
504
504
 
505
505
  resultMap[step.slug] = {
506
- status: response.status,
506
+ status_code: response.status,
507
507
  data: responseData,
508
508
  headers: Object.fromEntries(response.headers.entries()),
509
509
  }
@@ -1,5 +1,7 @@
1
1
  import { HttpError } from '@oazapfts/runtime'
2
2
  import {
3
+ createBoundary,
4
+ createBoundarySso,
3
5
  createCertificate,
4
6
  createCidr,
5
7
  createDnsRecord,
@@ -8,10 +10,10 @@ import {
8
10
  createFoundation,
9
11
  createNetwork,
10
12
  createProject,
11
- createRuntime,
12
- createTenant,
13
13
  createVpn,
14
14
  defaults,
15
+ deleteBoundary,
16
+ deleteBoundarySso,
15
17
  deleteCertificate,
16
18
  deleteCidr,
17
19
  deleteDnsRecord,
@@ -20,6 +22,8 @@ import {
20
22
  deleteNetwork,
21
23
  deleteProject,
22
24
  deleteVpn,
25
+ getBoundary,
26
+ getBoundarySso,
23
27
  getCertificate,
24
28
  getFolder,
25
29
  getFolderTags,
@@ -27,15 +31,21 @@ import {
27
31
  getNetwork,
28
32
  getProject,
29
33
  getVpnConfiguration,
34
+ listBoundary,
35
+ listBoundarySso,
30
36
  listCertificates,
31
37
  listCidr,
32
38
  listDnsRecord,
33
39
  listDnsZone,
34
40
  listFoundations,
35
41
  listNetwork,
36
- listRuntime,
37
- listTenant,
38
42
  listVpns,
43
+ putBoundaryDescription,
44
+ putBoundaryPolicyDocument,
45
+ putBoundarySsoDescription,
46
+ putBoundarySsoPolicyDocument,
47
+ putBoundarySsoTags,
48
+ putBoundaryTags,
39
49
  putCertificateTags,
40
50
  putCidrTags,
41
51
  putDnsZoneTags,
@@ -148,22 +158,6 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
148
158
  */
149
159
  getNetworkById = this.query(removeAuthorizationParam(getNetwork))
150
160
  /**
151
- * Get a list of tenants
152
- */
153
- listTenants = this.query(removeAuthorizationParam(listTenant))
154
- /**
155
- * Create a tenant
156
- */
157
- createTenant = this.mutation(removeAuthorizationParam(createTenant))
158
- /**
159
- * Get a list of runtimes
160
- */
161
- listRuntimes = this.query(removeAuthorizationParam(listRuntime))
162
- /**
163
- * Create a runtime
164
- */
165
- createRuntime = this.mutation(removeAuthorizationParam(createRuntime))
166
- /**
167
161
  * Get a list of tags in folder
168
162
  */
169
163
  getFolderTags = this.query(removeAuthorizationParam(getFolderTags))
@@ -227,6 +221,62 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
227
221
  * Delete a CIDR
228
222
  */
229
223
  deleteCidr = this.mutation(removeAuthorizationParam(deleteCidr))
224
+ /**
225
+ * Get a list of foundation boundaries
226
+ */
227
+ listBoundaries = this.query(removeAuthorizationParam(listBoundary))
228
+ /**
229
+ * Get a list of foundation sso boundaries
230
+ */
231
+ listSSOBoundaries = this.query(removeAuthorizationParam(listBoundarySso))
232
+ /**
233
+ * Create a boundary
234
+ */
235
+ createBoundary = this.mutation(removeAuthorizationParam(createBoundary))
236
+ /**
237
+ * Create a sso boundary
238
+ */
239
+ createSSOBoundary = this.mutation(removeAuthorizationParam(createBoundarySso))
240
+ /**
241
+ * Get details of a boundary
242
+ */
243
+ getBoundary = this.query(removeAuthorizationParam(getBoundary))
244
+ /**
245
+ * Get details of a sso boundary
246
+ */
247
+ getSSOBoundary = this.query(removeAuthorizationParam(getBoundarySso))
248
+ /**
249
+ * Delete a boundary
250
+ */
251
+ deleteBoundary = this.mutation(removeAuthorizationParam(deleteBoundary))
252
+ /**
253
+ * Delete a sso boundary
254
+ */
255
+ deleteSSOBoundary = this.mutation(removeAuthorizationParam(deleteBoundarySso))
256
+ /**
257
+ * Edit boundary tags
258
+ */
259
+ editBoundaryTags = this.mutation(removeAuthorizationParam(putBoundaryTags))
260
+ /**
261
+ * Edit sso boundary tags
262
+ */
263
+ editSSOBoundaryTags = this.mutation(removeAuthorizationParam(putBoundarySsoTags))
264
+ /**
265
+ * Edit boundary policy document
266
+ */
267
+ editBoundaryPolicyDocument = this.mutation(removeAuthorizationParam(putBoundaryPolicyDocument))
268
+ /**
269
+ * Edit sso boundary policy document
270
+ */
271
+ editSSOBoundaryPolicyDocument = this.mutation(removeAuthorizationParam(putBoundarySsoPolicyDocument))
272
+ /**
273
+ * Edit boundary description
274
+ */
275
+ editBoundaryDescription = this.mutation(removeAuthorizationParam(putBoundaryDescription))
276
+ /**
277
+ * Edit sso boundary description
278
+ */
279
+ editSSOBoundaryDescription = this.mutation(removeAuthorizationParam(putBoundarySsoDescription))
230
280
  }
231
281
 
232
282
  export const cloudPlatformClient = new CloudPlatformClient()
@@ -1,12 +1,12 @@
1
1
  import { RequestOpts } from '@oazapfts/runtime'
2
2
  import { AccountScmInfoSaveRequest, AccountScmInfoUpdateRequest, AccountScmStatusResponse, GroupsFromResourceResponse, MembersFromResourceResponse } from '../api/account'
3
- import { AgentVisibilityLevelEnum, HttpMethod, ListAgentResponse, VisibilityLevelEnum } from '../api/agent-tools'
3
+ import { AgentVisibilityLevelEnum, HttpMethod, ListAgentCoreResponse, VisibilityLevelEnum } from '../api/agent-tools'
4
4
  import { ChatResponse3, ContentDependencyResponse, ConversationHistoryResponse, ConversationResponse, DependencyResponse, QuickCommandResponse, QuickCommandStepResult, SourceKnowledgeSource, SourceProjectFile3, SourceStackAi } from '../api/ai'
5
5
  import { ConnectAccountRequestV2, ManagedAccountProvisionRequest } from '../api/cloudAccount'
6
6
  import { AllocationCostRequest, AllocationCostResponse, ChargePeriod, getAllocationCostFilters, ManagedService, ServiceResource } from '../api/cloudServices'
7
+ import { ChatRequest } from '../api/genAiInference'
7
8
  import { Action } from '../api/workspace-ai'
8
9
  import { ActivityResponse, FullInputContextResponse, InputConditionResponse, InputValuesContextResponse, PaginatedActivityResponse, PluginForAppCreationV2Response, PluginInputValuesInConsolidatedContextResponse, ValueByEnvResponse, WorkflowForCreationResponse } from '../api/workspaceManager'
9
- import { ChatRequest } from '../api/genAiInference'
10
10
 
11
11
  interface BaseSMCStatus {
12
12
  /**
@@ -405,7 +405,7 @@ export type FixVariables<
405
405
 
406
406
  export type ReplaceResult<T extends (...args: any[]) => Promise<any>, Fix> = (...args: Parameters<T>) => Promise<Fix>
407
407
 
408
- export interface AgentResponseWithBuiltIn extends Omit<ListAgentResponse, 'conversation_starter' | 'avatar'> {
408
+ export interface AgentResponseWithBuiltIn extends Omit<ListAgentCoreResponse, 'conversation_starter' | 'avatar'> {
409
409
  builtIn?: boolean,
410
410
  spaceName?: string,
411
411
  conversation_starter?: string[] | null,