@stack-spot/portal-network 0.218.2 → 0.219.0
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 +14 -0
- package/dist/api/agent-tools.d.ts +752 -164
- package/dist/api/agent-tools.d.ts.map +1 -1
- package/dist/api/agent-tools.js +203 -43
- package/dist/api/agent-tools.js.map +1 -1
- package/dist/api/ai.d.ts +3 -2
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +1 -2
- package/dist/api/ai.js.map +1 -1
- package/dist/api/genAiInference.d.ts +5 -1
- package/dist/api/genAiInference.d.ts.map +1 -1
- package/dist/api/genAiInference.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/client/agent-tools.d.ts +130 -3
- package/dist/client/agent-tools.d.ts.map +1 -1
- package/dist/client/agent-tools.js +105 -2
- package/dist/client/agent-tools.js.map +1 -1
- package/dist/client/ai.d.ts +0 -1
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/discover.d.ts +4 -4
- package/dist/client/discover.d.ts.map +1 -1
- package/dist/client/discover.js +143 -134
- package/dist/client/discover.js.map +1 -1
- package/dist/client/types.d.ts +1 -0
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/workspace-ai.d.ts +13 -3
- package/dist/client/workspace-ai.d.ts.map +1 -1
- package/dist/client/workspace-ai.js +15 -1
- package/dist/client/workspace-ai.js.map +1 -1
- package/package.json +1 -1
- package/src/api/agent-tools.ts +1259 -472
- package/src/api/ai.ts +3 -3
- package/src/api/genAiInference.ts +5 -1
- package/src/api/workspace-ai.ts +83 -0
- package/src/client/agent-tools.ts +55 -2
- package/src/client/discover.ts +143 -135
- package/src/client/types.ts +1 -0
- package/src/client/workspace-ai.ts +18 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
2
|
import { getApiAddresses } from '../api-addresses'
|
|
3
|
-
import { AgentResponse } from '../api/agent'
|
|
4
3
|
import { CustomToolkitResponse } from '../api/agent-tools'
|
|
5
4
|
import { GetAiStackResponse, QuickCommandResponse } from '../api/ai'
|
|
6
5
|
import { KnowledgeSourceItemResponse } from '../api/dataIntegration'
|
|
7
6
|
import {
|
|
8
7
|
addContentV1WorkspacesWorkspaceIdContentTypePost,
|
|
8
|
+
addContentV2WorkspacesWorkspaceIdContentTypePost,
|
|
9
9
|
addFavoriteV1WorkspacesWorkspaceIdFavoritePost,
|
|
10
10
|
addPermissionV1ResourceTypeResourceTypeResourcesResourceIdentifierPatch,
|
|
11
11
|
addPermissionV1WorkspacesWorkspaceIdPermissionsPatch,
|
|
@@ -31,7 +31,7 @@ import { wksAiDictionary } from '../error/dictionary/workspace-ai'
|
|
|
31
31
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
32
32
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
33
33
|
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
34
|
-
import { FixedAddResourceToWorkspaceAi, FixedWorkspaceAiPermissions, ReplaceResult } from './types'
|
|
34
|
+
import { AgentResponseWithBuiltIn, FixedAddResourceToWorkspaceAi, FixedWorkspaceAiPermissions, ReplaceResult } from './types'
|
|
35
35
|
|
|
36
36
|
class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
37
37
|
constructor() {
|
|
@@ -49,6 +49,7 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
49
49
|
deleteWorkspaceAi = this.mutation(removeAuthorizationParam(deleteWorkspaceV1WorkspacesWorkspaceIdDelete))
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
+
* @deprecated
|
|
52
53
|
* Adds a resource to the Spot.
|
|
53
54
|
*/
|
|
54
55
|
addResourceTypeToWorkspaceAi = this.mutation({
|
|
@@ -62,6 +63,20 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
62
63
|
permission: this.createPermissionFunctionFor(addContentV1WorkspacesWorkspaceIdContentTypePost),
|
|
63
64
|
})
|
|
64
65
|
|
|
66
|
+
/**
|
|
67
|
+
* V2 for adding a resource to the Spot.
|
|
68
|
+
*/
|
|
69
|
+
addResourceTypeV2ToSpot = this.mutation({
|
|
70
|
+
name: 'addResourceTypeToWorkspaceAi',
|
|
71
|
+
request: (
|
|
72
|
+
signal,
|
|
73
|
+
variables: Omit<Parameters<typeof addContentV2WorkspacesWorkspaceIdContentTypePost>[0], 'authorization'>,
|
|
74
|
+
) =>
|
|
75
|
+
addContentV2WorkspacesWorkspaceIdContentTypePost({ ...variables, authorization: '' },
|
|
76
|
+
{ signal }) as unknown as Promise<FixedAddResourceToWorkspaceAi>,
|
|
77
|
+
permission: this.createPermissionFunctionFor(addContentV2WorkspacesWorkspaceIdContentTypePost),
|
|
78
|
+
})
|
|
79
|
+
|
|
65
80
|
/**
|
|
66
81
|
* Lists all the knowledge sources in a Spot.
|
|
67
82
|
*/
|
|
@@ -118,7 +133,7 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
118
133
|
'authorization' | 'contentType'>,
|
|
119
134
|
) =>
|
|
120
135
|
listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet({ ...variables, contentType: 'agent', authorization: '' },
|
|
121
|
-
{ signal }) as unknown as Promise<
|
|
136
|
+
{ signal }) as unknown as Promise<AgentResponseWithBuiltIn[]>,
|
|
122
137
|
permission: this.createPermissionFunctionFor(listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet),
|
|
123
138
|
})
|
|
124
139
|
|