@stack-spot/portal-network 1.0.0-betaadp.2 → 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.
- 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 +243 -149
- package/dist/api/agent-tools.d.ts.map +1 -1
- package/dist/api/agent-tools.js +77 -5
- 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 +487 -98
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +427 -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 +380 -0
- package/dist/api/discover.d.ts.map +1 -0
- package/dist/api/discover.js +256 -0
- package/dist/api/discover.js.map +1 -0
- 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/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 +18 -2
- 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 +166 -119
- package/dist/client/agent-tools.d.ts.map +1 -1
- package/dist/client/agent-tools.js +62 -11
- 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 +266 -79
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +262 -20
- 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 +84 -0
- package/dist/client/discover.d.ts.map +1 -0
- package/dist/client/discover.js +359 -0
- package/dist/client/discover.js.map +1 -0
- 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 +53 -53
- package/dist/client/workspace-ai.d.ts.map +1 -1
- package/dist/client/workspace-ai.js +3 -7
- 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 +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- 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 +332 -151
- 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 +601 -0
- package/src/api/edpBfa.ts +472 -0
- package/src/api/genAiInference.ts +47 -4
- package/src/api/workflows.ts +100 -5
- 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 +18 -2
- package/src/client/account-asset-manager.ts +100 -0
- package/src/client/account.ts +71 -40
- package/src/client/agent-tools.ts +57 -17
- package/src/client/ai.ts +232 -20
- 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 +319 -0
- 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 +19 -23
- 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 +7 -4
- package/src/network/NetworkClient.ts +18 -6
- package/src/network/types.ts +3 -0
- package/src/utils/StreamedJson.tsx +19 -4
- package/dist/api/discovery.d.ts +0 -494
- package/dist/api/discovery.d.ts.map +0 -1
- package/dist/api/discovery.js +0 -205
- package/dist/api/discovery.js.map +0 -1
- package/dist/client/adp-mock.d.ts +0 -89
- package/dist/client/adp-mock.d.ts.map +0 -1
- package/dist/client/adp-mock.js +0 -246
- package/dist/client/adp-mock.js.map +0 -1
- package/dist/client/discovery.d.ts +0 -110
- package/dist/client/discovery.d.ts.map +0 -1
- package/dist/client/discovery.js +0 -133
- package/dist/client/discovery.js.map +0 -1
- package/src/api/discovery.ts +0 -729
- package/src/client/adp-mock.ts +0 -244
- package/src/client/discovery.ts +0 -73
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { findLast, last } from 'lodash';
|
|
2
|
+
import { getApiAddresses } from '../api-addresses.js';
|
|
3
|
+
import { create, create1, create2, defaults, deleteById, deleteById1, deleteById2, fetchInsights, getAll, getAll1, getAll2, getAllByHypothesis, getById, getById1, getById2, getInsightById, refreshInsights } from '../api/discover.js';
|
|
4
|
+
import { DefaultAPIError } from '../error/DefaultAPIError.js';
|
|
5
|
+
import { StreamedJson } from '../utils/StreamedJson.js';
|
|
6
|
+
import { baseDictionary } from '../error/dictionary/base.js';
|
|
7
|
+
import { formatJson } from '../utils/string.js';
|
|
8
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
9
|
+
import { aiClient } from './ai.js';
|
|
10
|
+
import { agentToolsClient } from './agent-tools.js';
|
|
11
|
+
class DiscoverClient extends ReactQueryNetworkClient {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(getApiAddresses().discover.url, defaults);
|
|
14
|
+
Object.defineProperty(this, "opportunities", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
configurable: true,
|
|
17
|
+
writable: true,
|
|
18
|
+
value: this.query(getAll)
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(this, "opportunity", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
configurable: true,
|
|
23
|
+
writable: true,
|
|
24
|
+
value: this.query(getById)
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(this, "hypotheses", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
value: this.query(getAll1)
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(this, "hypothesisById", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
value: this.query(getById1)
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(this, "documents", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
configurable: true,
|
|
41
|
+
writable: true,
|
|
42
|
+
value: this.query(getAllByHypothesis)
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(this, "document", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true,
|
|
48
|
+
value: this.query(getById2)
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(this, "artifacts", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
configurable: true,
|
|
53
|
+
writable: true,
|
|
54
|
+
value: this.query(getAll2)
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(this, "createOpportunity", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true,
|
|
59
|
+
writable: true,
|
|
60
|
+
value: this.mutation(create)
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(this, "createHypothesis", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
configurable: true,
|
|
65
|
+
writable: true,
|
|
66
|
+
value: this.mutation(create1)
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(this, "createDocument", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
configurable: true,
|
|
71
|
+
writable: true,
|
|
72
|
+
value: this.mutation(create2)
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(this, "deleteOpportunity", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
configurable: true,
|
|
77
|
+
writable: true,
|
|
78
|
+
value: this.mutation(deleteById)
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(this, "deleteHypothesis", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
configurable: true,
|
|
83
|
+
writable: true,
|
|
84
|
+
value: this.mutation(deleteById1)
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(this, "deleteDocument", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
configurable: true,
|
|
89
|
+
writable: true,
|
|
90
|
+
value: this.mutation(deleteById2)
|
|
91
|
+
});
|
|
92
|
+
/**
|
|
93
|
+
* Fetch insights
|
|
94
|
+
*/
|
|
95
|
+
Object.defineProperty(this, "insights", {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
configurable: true,
|
|
98
|
+
writable: true,
|
|
99
|
+
value: this.query(fetchInsights)
|
|
100
|
+
});
|
|
101
|
+
/**
|
|
102
|
+
* Refresh insights
|
|
103
|
+
*/
|
|
104
|
+
Object.defineProperty(this, "refreshInsights", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
configurable: true,
|
|
107
|
+
writable: true,
|
|
108
|
+
value: this.mutation(refreshInsights)
|
|
109
|
+
});
|
|
110
|
+
/**
|
|
111
|
+
* Get Insight by Id
|
|
112
|
+
*/
|
|
113
|
+
Object.defineProperty(this, "insightById", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
configurable: true,
|
|
116
|
+
writable: true,
|
|
117
|
+
value: this.query(getInsightById)
|
|
118
|
+
});
|
|
119
|
+
Object.defineProperty(this, "chats", {
|
|
120
|
+
enumerable: true,
|
|
121
|
+
configurable: true,
|
|
122
|
+
writable: true,
|
|
123
|
+
value: this.query({
|
|
124
|
+
name: 'chats',
|
|
125
|
+
request: async (_signal, variables) => {
|
|
126
|
+
const opportunities = await this.opportunities.query({});
|
|
127
|
+
const opportunitiesByChatId = opportunities.content.reduce((acc, opp) => {
|
|
128
|
+
if (opp.chatId) {
|
|
129
|
+
acc[opp.chatId] = opp;
|
|
130
|
+
}
|
|
131
|
+
return acc;
|
|
132
|
+
}, {});
|
|
133
|
+
const chatsHistory = await aiClient.chats.query({ ...variables, page: variables.page, size: variables.size ?? 40 });
|
|
134
|
+
const filteredItems = variables.filter
|
|
135
|
+
? chatsHistory.filter((chat) => chat.title.toLowerCase().includes(variables.filter.toLowerCase()))
|
|
136
|
+
: chatsHistory;
|
|
137
|
+
const enrichedChats = filteredItems?.map(chat => {
|
|
138
|
+
const relatedOpportunity = opportunitiesByChatId[chat.id];
|
|
139
|
+
return {
|
|
140
|
+
...chat,
|
|
141
|
+
opportunityName: relatedOpportunity?.title ?? null,
|
|
142
|
+
hypothesisCount: relatedOpportunity?.hypotheses?.length ?? 0,
|
|
143
|
+
};
|
|
144
|
+
});
|
|
145
|
+
return enrichedChats;
|
|
146
|
+
},
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
buildStackSpotError(error) {
|
|
151
|
+
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers);
|
|
152
|
+
}
|
|
153
|
+
static async toolsOfAgent(agentId) {
|
|
154
|
+
try {
|
|
155
|
+
const agent = agentId ? await agentToolsClient.agent.query({ agentId }) : undefined;
|
|
156
|
+
if (!agent)
|
|
157
|
+
return [];
|
|
158
|
+
const tools = [];
|
|
159
|
+
agent.toolkits?.builtin_toolkits?.forEach(kit => kit.tools?.forEach(({ id, name, description }) => {
|
|
160
|
+
if (id)
|
|
161
|
+
tools.push({ image: kit.image_url, id, name: name || id, description });
|
|
162
|
+
}));
|
|
163
|
+
agent.toolkits?.custom_toolkits?.forEach(kit => kit.tools?.forEach(({ id, name, description }) => {
|
|
164
|
+
if (id)
|
|
165
|
+
tools.push({ image: kit.avatar ?? undefined, id, name: name || id, description });
|
|
166
|
+
}));
|
|
167
|
+
return tools;
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
return [];
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
sendChatMessage(request, minChangeIntervalMS) {
|
|
174
|
+
const abortController = new AbortController();
|
|
175
|
+
const headers = {
|
|
176
|
+
'Content-Type': 'application/json',
|
|
177
|
+
'Accept': 'text/event-stream',
|
|
178
|
+
};
|
|
179
|
+
const events = this.stream(this.resolveURL('/v2/ai/chat'), { method: 'post', body: JSON.stringify(request), headers, signal: abortController.signal });
|
|
180
|
+
/**
|
|
181
|
+
* This function treats events in the streaming that deals with the execution of tools. Since these events are not concatenated like
|
|
182
|
+
* normal streamings of data, we need this separate function to deal with them. It transforms the internal data model of the
|
|
183
|
+
* StreamedJson object whenever an event is triggered.
|
|
184
|
+
*/
|
|
185
|
+
async function transform(event, data) {
|
|
186
|
+
const info = event.agent_info;
|
|
187
|
+
if (!info)
|
|
188
|
+
return;
|
|
189
|
+
const tools = await DiscoverClient.toolsOfAgent(request.agentId);
|
|
190
|
+
data.steps = data.steps ? [...data.steps] : [];
|
|
191
|
+
if (info.type === 'planning' && info.action === 'end') {
|
|
192
|
+
data.steps.push({
|
|
193
|
+
id: 'planning',
|
|
194
|
+
type: 'planning',
|
|
195
|
+
status: 'success',
|
|
196
|
+
duration: info.duration || 0,
|
|
197
|
+
steps: info.data?.steps?.map(s => s.goal) ?? [],
|
|
198
|
+
goal: info.data?.plan_goal ?? '',
|
|
199
|
+
});
|
|
200
|
+
info.data?.steps.forEach(s => data.steps?.push({
|
|
201
|
+
id: s.id,
|
|
202
|
+
type: 'step',
|
|
203
|
+
status: 'pending',
|
|
204
|
+
input: s.goal,
|
|
205
|
+
attempts: [{
|
|
206
|
+
tools: s.tools?.map(t => ({
|
|
207
|
+
...(tools.find(({ id }) => id === t.tool_id) ?? { id: t.tool_id, name: t.tool_id }),
|
|
208
|
+
executionId: t.tool_execution_id,
|
|
209
|
+
goal: t.goal,
|
|
210
|
+
})),
|
|
211
|
+
}],
|
|
212
|
+
}));
|
|
213
|
+
data.steps.push({ id: 'answer', type: 'answer', status: 'pending' });
|
|
214
|
+
}
|
|
215
|
+
if (info.type === 'planning' && info.action === 'awaiting_approval') {
|
|
216
|
+
data.steps.push({
|
|
217
|
+
id: 'planning',
|
|
218
|
+
type: 'planning',
|
|
219
|
+
status: 'awaiting_approval',
|
|
220
|
+
user_question: info.data?.user_question,
|
|
221
|
+
duration: info.duration || 0,
|
|
222
|
+
steps: info.data?.steps?.map(s => s.goal) ?? [],
|
|
223
|
+
goal: info.data?.plan_goal ?? '',
|
|
224
|
+
});
|
|
225
|
+
info.data?.steps.forEach(s => data.steps?.push({
|
|
226
|
+
id: s.id,
|
|
227
|
+
type: 'step',
|
|
228
|
+
status: 'pending',
|
|
229
|
+
input: s.goal,
|
|
230
|
+
attempts: [{
|
|
231
|
+
tools: s.tools?.map(t => ({
|
|
232
|
+
...(tools.find(({ id }) => id === t.tool_id) ?? { id: t.tool_id, name: t.tool_id }),
|
|
233
|
+
executionId: t.tool_execution_id,
|
|
234
|
+
goal: t.goal,
|
|
235
|
+
})),
|
|
236
|
+
}],
|
|
237
|
+
}));
|
|
238
|
+
data.steps.push({ id: 'answer', type: 'answer', status: 'pending' });
|
|
239
|
+
}
|
|
240
|
+
if (info.type === 'step' && info.action === 'start') {
|
|
241
|
+
const step = data.steps.find(s => s.id === info.id);
|
|
242
|
+
if (step)
|
|
243
|
+
step.status = 'running';
|
|
244
|
+
}
|
|
245
|
+
if (info.type === 'step' && info.action === 'end') {
|
|
246
|
+
const step = data.steps.find(s => s.id === info.id);
|
|
247
|
+
if (step) {
|
|
248
|
+
step.status = 'success';
|
|
249
|
+
step.duration = info.duration;
|
|
250
|
+
const lastToolId = last(step.attempts[0].tools)?.id;
|
|
251
|
+
const lastAttemptOfLastTool = findLast(step.attempts.map(a => a.tools).flat(), t => t?.id === lastToolId);
|
|
252
|
+
step.output = lastAttemptOfLastTool?.output;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
if (info.type === 'tool' && info.action === 'awaiting_approval') {
|
|
256
|
+
const tool = tools.find(({ id }) => id === info.data?.tool_id);
|
|
257
|
+
data.steps.push({
|
|
258
|
+
id: info.id,
|
|
259
|
+
type: 'tool',
|
|
260
|
+
status: 'awaiting_approval',
|
|
261
|
+
duration: info.duration || 0,
|
|
262
|
+
input: info.data?.input,
|
|
263
|
+
user_question: info.data?.user_question,
|
|
264
|
+
attempts: [{
|
|
265
|
+
tools: [{
|
|
266
|
+
executionId: info.id,
|
|
267
|
+
id: info.data?.tool_id ?? '',
|
|
268
|
+
name: tool?.name ?? '',
|
|
269
|
+
goal: tool?.goal,
|
|
270
|
+
...tool,
|
|
271
|
+
}],
|
|
272
|
+
}],
|
|
273
|
+
});
|
|
274
|
+
data.steps.push({ id: 'answer', type: 'answer', status: 'pending' });
|
|
275
|
+
}
|
|
276
|
+
if (info.type === 'tool' && info.action === 'start') {
|
|
277
|
+
const currentStep = data.steps.find(s => s.status === 'running');
|
|
278
|
+
if (!info.data)
|
|
279
|
+
return;
|
|
280
|
+
//There might be a tool with status awaiting_approval, so we want to inform tool has already started
|
|
281
|
+
if (!currentStep || !currentStep.attempts[0].tools) {
|
|
282
|
+
const input = formatJson(info.data.input);
|
|
283
|
+
const tool = tools.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id };
|
|
284
|
+
data.steps.push({
|
|
285
|
+
id: info.id,
|
|
286
|
+
type: 'tool',
|
|
287
|
+
status: 'running',
|
|
288
|
+
duration: info.duration || 0,
|
|
289
|
+
input: info.data?.input,
|
|
290
|
+
user_question: info.data?.user_question,
|
|
291
|
+
attempts: [{
|
|
292
|
+
tools: [{ ...tool, executionId: info.id, input }],
|
|
293
|
+
}],
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
const toolInFirstAttempt = currentStep.attempts[0].tools?.find(t => t.executionId === info.id);
|
|
298
|
+
//One step might have multiple tools. When in an approval mode, we might not have all the tools in the array yet.
|
|
299
|
+
//So we make sure to add any tools that are not in there.
|
|
300
|
+
if (!toolInFirstAttempt) {
|
|
301
|
+
const input = formatJson(info.data.input);
|
|
302
|
+
const tool = tools?.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id };
|
|
303
|
+
currentStep.attempts[info.data.attempt - 1].tools?.push({
|
|
304
|
+
...tool,
|
|
305
|
+
executionId: info.id,
|
|
306
|
+
input,
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
const input = formatJson(info.data.input);
|
|
311
|
+
if (info.data.attempt === 1) {
|
|
312
|
+
toolInFirstAttempt.input = input;
|
|
313
|
+
}
|
|
314
|
+
else {
|
|
315
|
+
const tool = tools.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id };
|
|
316
|
+
currentStep.attempts[info.data.attempt - 1] ??= { tools: [] };
|
|
317
|
+
currentStep.attempts[info.data.attempt - 1].tools?.push({
|
|
318
|
+
...tool,
|
|
319
|
+
executionId: info.id,
|
|
320
|
+
input,
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
if (info.type === 'tool' && info.action === 'end') {
|
|
327
|
+
const currentStep = data.steps.find(s => s.status === 'running');
|
|
328
|
+
if (!currentStep || !info.data)
|
|
329
|
+
return;
|
|
330
|
+
const tool = currentStep.attempts[info.data.attempt - 1]?.tools?.find(t => t.executionId === info.id);
|
|
331
|
+
if (tool) {
|
|
332
|
+
tool.output = formatJson(info.data.output);
|
|
333
|
+
tool.duration = info.duration;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
if (info.type === 'final_answer' && info.action === 'start') {
|
|
337
|
+
const answerStep = last(data.steps);
|
|
338
|
+
if (answerStep)
|
|
339
|
+
answerStep.status = 'running';
|
|
340
|
+
}
|
|
341
|
+
if (info.type === 'chat' && info.action === 'end') {
|
|
342
|
+
const answerStep = last(data.steps);
|
|
343
|
+
if (answerStep) {
|
|
344
|
+
answerStep.status = 'success';
|
|
345
|
+
answerStep.duration = info.duration;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
return new StreamedJson({
|
|
350
|
+
eventsPromise: events,
|
|
351
|
+
abortController,
|
|
352
|
+
minChangeIntervalMS,
|
|
353
|
+
ignoreKeys: ['agent_info'],
|
|
354
|
+
transform,
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
export const discoverClient = new DiscoverClient();
|
|
359
|
+
//# sourceMappingURL=discover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/client/discover.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAElD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAyC,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5Q,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAOhD,MAAM,cAAe,SAAQ,uBAAuB;IAClD;QACE,KAAK,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QAOjD;;;;mBAAgB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;WAAA;QAElC;;;;mBAAc,IAAI,CAAC,KAAK,CAAC,OAAO,CAA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CAAC,CAAC,WAAW,KAAK,IAAI,CAAC,EAAE,CAAC,CAAA;gBACrG,IAAI,IAAI,EAAE,CAAC;oBACT,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;oBAC1C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;gBAC/B,CAAC;YACH,CAAC;YAED,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;gBAC5D,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;gBACnC,IAAI,UAAU;oBAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAA;YAC/C,CAAC;YAED,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;gBAClD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;gBACnC,IAAI,UAAU,EAAE,CAAC;oBACf,UAAU,CAAC,MAAM,GAAG,SAAS,CAAA;oBAC7B,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;gBACrC,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,YAAY,CAAC;YACtB,aAAa,EAAE,MAAM;YACrB,eAAe;YACf,mBAAmB;YACnB,UAAU,EAAE,CAAC,YAAY,CAAC;YAC1B,SAAS;SACV,CAAC,CAAA;IACJ,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime';
|
|
2
|
+
import { StackspotAPIError } from '../error/StackspotAPIError.js';
|
|
3
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
4
|
+
declare class EdpBfaClient extends ReactQueryNetworkClient {
|
|
5
|
+
constructor();
|
|
6
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError;
|
|
7
|
+
/**
|
|
8
|
+
* Triggers an workflow to generate code.
|
|
9
|
+
*/
|
|
10
|
+
generateCode: import("../network/types.js").MutationObject<{
|
|
11
|
+
workflowCodeExecutionRequest: import("../api/edpBfa.js").WorkflowCodeExecutionRequest;
|
|
12
|
+
}, import("../api/edpBfa.js").WorkflowExecutionStatus>;
|
|
13
|
+
}
|
|
14
|
+
export declare const edpBfaClient: EdpBfaClient;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=edp-bfa.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edp-bfa.d.ts","sourceRoot":"","sources":["../../src/client/edp-bfa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAK7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAE5E,cAAM,YAAa,SAAQ,uBAAuB;;IAKhD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAIlE;;OAEG;IACH,YAAY;;wDAAqC;CAClD;AAED,eAAO,MAAM,YAAY,cAAqB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getApiAddresses } from '../api-addresses.js';
|
|
2
|
+
import { defaults, executeCodeWorkflow } from '../api/edpBfa.js';
|
|
3
|
+
import { DefaultAPIError } from '../error/DefaultAPIError.js';
|
|
4
|
+
import { baseDictionary } from '../error/dictionary/base.js';
|
|
5
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
6
|
+
class EdpBfaClient extends ReactQueryNetworkClient {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(getApiAddresses().edpBfa.url, defaults);
|
|
9
|
+
/**
|
|
10
|
+
* Triggers an workflow to generate code.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(this, "generateCode", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: this.mutation(executeCodeWorkflow)
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
buildStackSpotError(error) {
|
|
20
|
+
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export const edpBfaClient = new EdpBfaClient();
|
|
24
|
+
//# sourceMappingURL=edp-bfa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edp-bfa.js","sourceRoot":"","sources":["../../src/client/edp-bfa.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAEzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAE5E,MAAM,YAAa,SAAQ,uBAAuB;IAChD;QACE,KAAK,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;QAO/C;;WAEG;QACH;;;;mBAAe,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC;WAAA;IATjD,CAAC;IAES,mBAAmB,CAAC,KAAgB;QAC5C,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACrF,CAAC;CAMF;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-bus.d.ts","sourceRoot":"","sources":["../../src/client/event-bus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAG7C,OAAO,EAAqC,KAAK,IAAI,SAAS,EAAc,MAAM,iBAAiB,CAAA;AAGnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAGxD,eAAO,MAAM,yBAAyB,gBAAgB,CAAA;AAEtD,cAAM,cAAe,SAAQ,aAAa;IACxC,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,QAAQ,CAAoD;IACpE,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,IAAI,CAAQ;;IAQpB,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;YAIpD,OAAO;YAkCP,GAAG;IAajB;;OAEG;IACH,SAAS,
|
|
1
|
+
{"version":3,"file":"event-bus.d.ts","sourceRoot":"","sources":["../../src/client/event-bus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAG7C,OAAO,EAAqC,KAAK,IAAI,SAAS,EAAc,MAAM,iBAAiB,CAAA;AAGnG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAGxD,eAAO,MAAM,yBAAyB,gBAAgB,CAAA;AAEtD,cAAM,cAAe,SAAQ,aAAa;IACxC,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,QAAQ,CAAoD;IACpE,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,IAAI,CAAQ;;IAQpB,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;YAIpD,OAAO;YAkCP,GAAG;IAajB;;OAEG;IACH,SAAS,GAAU,OAAO,SAAS,mBAElC;CACF;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAA"}
|
|
@@ -8,31 +8,31 @@ declare class GenAiInference extends ReactQueryNetworkClient {
|
|
|
8
8
|
* List all models.
|
|
9
9
|
*/
|
|
10
10
|
listModels: import("../network/types.js").QueryObject<Omit<{
|
|
11
|
-
active?: boolean | null
|
|
12
|
-
resource?: string | null
|
|
13
|
-
$default?: boolean | null
|
|
14
|
-
displayName?: string | null
|
|
15
|
-
selfHosted?: boolean | null
|
|
16
|
-
orderBy?: import("../api/genAiInference.js").OrderBy
|
|
17
|
-
orderDir?: import("../api/genAiInference.js").OrderDir
|
|
18
|
-
page?: number
|
|
19
|
-
pageSize?: number
|
|
20
|
-
xAccountId?: string | null
|
|
11
|
+
active?: boolean | null;
|
|
12
|
+
resource?: string | null;
|
|
13
|
+
$default?: boolean | null;
|
|
14
|
+
displayName?: string | null;
|
|
15
|
+
selfHosted?: boolean | null;
|
|
16
|
+
orderBy?: import("../api/genAiInference.js").OrderBy;
|
|
17
|
+
orderDir?: import("../api/genAiInference.js").OrderDir;
|
|
18
|
+
page?: number;
|
|
19
|
+
pageSize?: number;
|
|
20
|
+
xAccountId?: string | null;
|
|
21
21
|
authorization: string;
|
|
22
22
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, import("../api/genAiInference.js").PaginatedResponseLlmModelsResponse>;
|
|
23
23
|
/**
|
|
24
24
|
* List llm providers.
|
|
25
25
|
*/
|
|
26
26
|
listProviders: import("../network/types.js").QueryObject<Omit<{
|
|
27
|
-
acceptsSelfHosted?: boolean
|
|
28
|
-
xAccountId?: string | null
|
|
27
|
+
acceptsSelfHosted?: boolean;
|
|
28
|
+
xAccountId?: string | null;
|
|
29
29
|
authorization: string;
|
|
30
30
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, import("../api/genAiInference.js").LlmSimpleProviderResponse[]>;
|
|
31
31
|
/**
|
|
32
32
|
* Creates LLM self hosted model
|
|
33
33
|
*/
|
|
34
34
|
createModel: import("../network/types.js").MutationObject<Omit<{
|
|
35
|
-
xAccountId?: string | null
|
|
35
|
+
xAccountId?: string | null;
|
|
36
36
|
authorization: string;
|
|
37
37
|
createLlmModelRequest: import("../api/genAiInference.js").CreateLlmModelRequest;
|
|
38
38
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, import("../api/genAiInference.js").LlmModelsResponse>;
|
|
@@ -41,7 +41,7 @@ declare class GenAiInference extends ReactQueryNetworkClient {
|
|
|
41
41
|
*/
|
|
42
42
|
deleteModel: import("../network/types.js").MutationObject<Omit<{
|
|
43
43
|
modelId: string;
|
|
44
|
-
xAccountId?: string | null
|
|
44
|
+
xAccountId?: string | null;
|
|
45
45
|
authorization: string;
|
|
46
46
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, unknown>;
|
|
47
47
|
/**
|
|
@@ -49,7 +49,7 @@ declare class GenAiInference extends ReactQueryNetworkClient {
|
|
|
49
49
|
*/
|
|
50
50
|
getModel: import("../network/types.js").QueryObject<Omit<{
|
|
51
51
|
modelId: string;
|
|
52
|
-
xAccountId?: string | null
|
|
52
|
+
xAccountId?: string | null;
|
|
53
53
|
authorization: string;
|
|
54
54
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, import("../api/genAiInference.js").LlmModelsResponse>;
|
|
55
55
|
/**
|
|
@@ -57,7 +57,7 @@ declare class GenAiInference extends ReactQueryNetworkClient {
|
|
|
57
57
|
*/
|
|
58
58
|
updateModel: import("../network/types.js").MutationObject<Omit<{
|
|
59
59
|
modelId: string;
|
|
60
|
-
xAccountId?: string | null
|
|
60
|
+
xAccountId?: string | null;
|
|
61
61
|
authorization: string;
|
|
62
62
|
updateLlmModelRequest: import("../api/genAiInference.js").UpdateLlmModelRequest;
|
|
63
63
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, import("../api/genAiInference.js").LlmModelsResponse>;
|
|
@@ -66,7 +66,7 @@ declare class GenAiInference extends ReactQueryNetworkClient {
|
|
|
66
66
|
*/
|
|
67
67
|
toggleModelActive: import("../network/types.js").MutationObject<Omit<{
|
|
68
68
|
modelId: string;
|
|
69
|
-
xAccountId?: string | null
|
|
69
|
+
xAccountId?: string | null;
|
|
70
70
|
authorization: string;
|
|
71
71
|
toggleModelStatusRequest: import("../api/genAiInference.js").ToggleModelStatusRequest;
|
|
72
72
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, import("../api/genAiInference.js").LlmModelsResponse>;
|
|
@@ -75,7 +75,7 @@ declare class GenAiInference extends ReactQueryNetworkClient {
|
|
|
75
75
|
*/
|
|
76
76
|
updateModelResource: import("../network/types.js").MutationObject<Omit<{
|
|
77
77
|
modelId: string;
|
|
78
|
-
xAccountId?: string | null
|
|
78
|
+
xAccountId?: string | null;
|
|
79
79
|
authorization: string;
|
|
80
80
|
body: import("../api/genAiInference.js").UpdateLlmModelResourceRequest[];
|
|
81
81
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, any>;
|
|
@@ -84,7 +84,7 @@ declare class GenAiInference extends ReactQueryNetworkClient {
|
|
|
84
84
|
*/
|
|
85
85
|
deleteModelResource: import("../network/types.js").MutationObject<Omit<{
|
|
86
86
|
resourceId: string;
|
|
87
|
-
xAccountId?: string | null
|
|
87
|
+
xAccountId?: string | null;
|
|
88
88
|
authorization: string;
|
|
89
89
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, unknown>;
|
|
90
90
|
/**
|
|
@@ -92,7 +92,7 @@ declare class GenAiInference extends ReactQueryNetworkClient {
|
|
|
92
92
|
*/
|
|
93
93
|
sendAgentMessage: import("../network/types.js").MutationObject<Omit<{
|
|
94
94
|
agentId: string;
|
|
95
|
-
xAccountId?: string | null
|
|
95
|
+
xAccountId?: string | null;
|
|
96
96
|
authorization: string;
|
|
97
97
|
chatRequest: import("../api/genAiInference.js").ChatRequest;
|
|
98
98
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, any>;
|
|
@@ -12,19 +12,19 @@ declare class InsightsClient extends ReactQueryNetworkClient {
|
|
|
12
12
|
startDate: string;
|
|
13
13
|
endDate: string;
|
|
14
14
|
dataset: string;
|
|
15
|
-
stackspotCustomerIp?: string
|
|
15
|
+
stackspotCustomerIp?: string;
|
|
16
16
|
}, string>;
|
|
17
17
|
/**
|
|
18
18
|
* Get data for analysis in account
|
|
19
19
|
*/
|
|
20
20
|
getDashboardAccount: import("../network/types.js").QueryObject<{
|
|
21
21
|
accountSlug: string;
|
|
22
|
-
startDate?: string
|
|
23
|
-
endDate?: string
|
|
24
|
-
panels?: string[]
|
|
25
|
-
page?: number
|
|
26
|
-
size?: number
|
|
27
|
-
stackspotCustomerIp?: string
|
|
22
|
+
startDate?: string;
|
|
23
|
+
endDate?: string;
|
|
24
|
+
panels?: string[];
|
|
25
|
+
page?: number;
|
|
26
|
+
size?: number;
|
|
27
|
+
stackspotCustomerIp?: string;
|
|
28
28
|
}, import("../api/insights.js").DashboardReadResponse>;
|
|
29
29
|
}
|
|
30
30
|
export declare const insightsClient: InsightsClient;
|
|
@@ -8,22 +8,22 @@ declare class NotificationClient extends ReactQueryNetworkClient {
|
|
|
8
8
|
* Gets all notification by tenant
|
|
9
9
|
*/
|
|
10
10
|
notifications: import("../network/types.js").QueryObject<{
|
|
11
|
-
size?: number
|
|
12
|
-
page?: number
|
|
13
|
-
createdSince?: number
|
|
14
|
-
context?: "ACCOUNT" | "
|
|
15
|
-
criticality?: "
|
|
16
|
-
content?: string
|
|
17
|
-
committed?: boolean
|
|
18
|
-
isBanner?: boolean
|
|
19
|
-
audience?: "
|
|
11
|
+
size?: number;
|
|
12
|
+
page?: number;
|
|
13
|
+
createdSince?: number;
|
|
14
|
+
context?: "ACCOUNT" | "STUDIO" | "WORKSPACE" | "AI";
|
|
15
|
+
criticality?: "LOW" | "MEDIUM" | "HIGH";
|
|
16
|
+
content?: string;
|
|
17
|
+
committed?: boolean;
|
|
18
|
+
isBanner?: boolean;
|
|
19
|
+
audience?: "AI" | "EDP" | "ACCOUNT";
|
|
20
20
|
tenantId: string;
|
|
21
21
|
}, import("../api/notification.js").PagingResponseModelGetTenantNotificationsResponse>;
|
|
22
22
|
/**
|
|
23
23
|
* Gets all committed notifications by tenant
|
|
24
24
|
*/
|
|
25
25
|
committedNotifications: import("../network/types.js").QueryObject<{
|
|
26
|
-
audience?: "
|
|
26
|
+
audience?: "AI" | "EDP" | "ACCOUNT";
|
|
27
27
|
tenantId: string;
|
|
28
28
|
}, import("../api/notification.js").GetCommittedNotificationsResponse>;
|
|
29
29
|
/**
|
|
@@ -33,6 +33,13 @@ declare class NotificationClient extends ReactQueryNetworkClient {
|
|
|
33
33
|
notificationId: string;
|
|
34
34
|
tenantId: string;
|
|
35
35
|
}, unknown>;
|
|
36
|
+
/**
|
|
37
|
+
* Mark a notification as uncommitted (mark as unread)
|
|
38
|
+
*/
|
|
39
|
+
uncommit: import("../network/types.js").MutationObject<{
|
|
40
|
+
notificationId: string;
|
|
41
|
+
tenantId: string;
|
|
42
|
+
}, unknown>;
|
|
36
43
|
}
|
|
37
44
|
export declare const notificationClient: NotificationClient;
|
|
38
45
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../src/client/notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAI7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAG5E,cAAM,kBAAmB,SAAQ,uBAAuB;;IAMtD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAGlE;;OAEG;IACH,aAAa;;;;;;;;;;;wFAAsB;IACnC;;OAEG;IACH,sBAAsB;;;wEAAqC;IAC3D;;OAEG;IACH,MAAM;;;gBAAwB;
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../src/client/notification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAI7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAG5E,cAAM,kBAAmB,SAAQ,uBAAuB;;IAMtD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAGlE;;OAEG;IACH,aAAa;;;;;;;;;;;wFAAsB;IACnC;;OAEG;IACH,sBAAsB;;;wEAAqC;IAC3D;;OAEG;IACH,MAAM;;;gBAAwB;IAC9B;;OAEG;IACH,QAAQ;;;gBAA0B;CAEnC;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { commit, committedNotifications, defaults, findAll } from '../api/notification.js';
|
|
1
|
+
import { commit, committedNotifications, defaults, findAll, uncommit } from '../api/notification.js';
|
|
2
2
|
import { DefaultAPIError } from '../error/DefaultAPIError.js';
|
|
3
3
|
import { baseDictionary } from '../error/dictionary/base.js';
|
|
4
4
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
@@ -33,6 +33,15 @@ class NotificationClient extends ReactQueryNetworkClient {
|
|
|
33
33
|
writable: true,
|
|
34
34
|
value: this.mutation(commit)
|
|
35
35
|
});
|
|
36
|
+
/**
|
|
37
|
+
* Mark a notification as uncommitted (mark as unread)
|
|
38
|
+
*/
|
|
39
|
+
Object.defineProperty(this, "uncommit", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
writable: true,
|
|
43
|
+
value: this.mutation(uncommit)
|
|
44
|
+
});
|
|
36
45
|
}
|
|
37
46
|
buildStackSpotError(error) {
|
|
38
47
|
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers);
|