@stack-spot/portal-network 0.207.0 → 0.208.1
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 +19 -0
- package/dist/api/account.d.ts +331 -89
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js +203 -46
- package/dist/api/account.js.map +1 -1
- package/dist/api/discover.d.ts +7 -4
- package/dist/api/discover.d.ts.map +1 -1
- package/dist/api/discover.js +5 -5
- package/dist/api/discover.js.map +1 -1
- package/dist/api/edpBfa.d.ts +215 -0
- package/dist/api/edpBfa.d.ts.map +1 -0
- package/dist/api/edpBfa.js +87 -0
- package/dist/api/edpBfa.js.map +1 -0
- package/dist/apis-itau.json +8 -0
- package/dist/apis.json +8 -0
- package/dist/client/account.d.ts +14 -9
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +11 -8
- package/dist/client/account.js.map +1 -1
- package/dist/client/agent-tools.d.ts +2 -2
- package/dist/client/agent-tools.d.ts.map +1 -1
- package/dist/client/agent-tools.js +2 -1
- package/dist/client/agent-tools.js.map +1 -1
- package/dist/client/discover.d.ts +2 -2
- package/dist/client/discover.d.ts.map +1 -1
- package/dist/client/discover.js.map +1 -1
- package/dist/client/edp-bfa.d.ts +16 -0
- package/dist/client/edp-bfa.d.ts.map +1 -0
- package/dist/client/edp-bfa.js +24 -0
- package/dist/client/edp-bfa.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/account.ts +579 -163
- package/src/api/discover.ts +8 -8
- package/src/api/edpBfa.ts +472 -0
- package/src/apis-itau.json +8 -0
- package/src/apis.json +8 -0
- package/src/client/account.ts +11 -7
- package/src/client/agent-tools.ts +2 -1
- package/src/client/discover.ts +2 -2
- package/src/client/edp-bfa.ts +24 -0
- package/src/index.ts +2 -0
package/src/api/discover.ts
CHANGED
|
@@ -192,7 +192,7 @@ export type CreateDocumentResponse = {
|
|
|
192
192
|
updatedAt?: string;
|
|
193
193
|
chatId: string;
|
|
194
194
|
};
|
|
195
|
-
export type
|
|
195
|
+
export type AiChatRequest = {
|
|
196
196
|
prompt: string;
|
|
197
197
|
conversationId: string;
|
|
198
198
|
};
|
|
@@ -216,6 +216,7 @@ export type AdminAgentResponse = {
|
|
|
216
216
|
export type GetInsightResponse = {
|
|
217
217
|
id: string;
|
|
218
218
|
title: string;
|
|
219
|
+
summary: string;
|
|
219
220
|
content: string;
|
|
220
221
|
chartUrl?: string;
|
|
221
222
|
};
|
|
@@ -470,9 +471,11 @@ export function create2({ createDocumentRequest }: {
|
|
|
470
471
|
body: createDocumentRequest
|
|
471
472
|
})));
|
|
472
473
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
474
|
+
/**
|
|
475
|
+
* Send a message to AI chat
|
|
476
|
+
*/
|
|
477
|
+
export function chat({ aiChatRequest }: {
|
|
478
|
+
aiChatRequest: AiChatRequest;
|
|
476
479
|
}, opts?: Oazapfts.RequestOpts) {
|
|
477
480
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
478
481
|
status: 200;
|
|
@@ -480,10 +483,7 @@ export function chat({ authorization, messageRequest }: {
|
|
|
480
483
|
}>("/v2/ai/chat", oazapfts.json({
|
|
481
484
|
...opts,
|
|
482
485
|
method: "POST",
|
|
483
|
-
body:
|
|
484
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
485
|
-
Authorization: authorization
|
|
486
|
-
})
|
|
486
|
+
body: aiChatRequest
|
|
487
487
|
})));
|
|
488
488
|
}
|
|
489
489
|
export function createAgent({ adminAgentCreateRequest }: {
|
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EDP Backend for Agent
|
|
3
|
+
* 0.0.1
|
|
4
|
+
* DO NOT MODIFY - This file has been generated using oazapfts.
|
|
5
|
+
* See https://www.npmjs.com/package/oazapfts
|
|
6
|
+
*/
|
|
7
|
+
import * as Oazapfts from "@oazapfts/runtime";
|
|
8
|
+
import * as QS from "@oazapfts/runtime/query";
|
|
9
|
+
export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
|
|
10
|
+
headers: {},
|
|
11
|
+
baseUrl: "https://adp-development-edp-bfa.prd.stackspot.com",
|
|
12
|
+
};
|
|
13
|
+
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
|
+
export const servers = {
|
|
15
|
+
generatedServerUrl: "https://adp-development-edp-bfa.prd.stackspot.com"
|
|
16
|
+
};
|
|
17
|
+
export type WorkflowExecutionRequestV2 = {
|
|
18
|
+
/** Nome do app/infra a ser criado */
|
|
19
|
+
name: string;
|
|
20
|
+
/** Descrição do app/infra a ser criado */
|
|
21
|
+
description: string;
|
|
22
|
+
/** Valores dos inputs definidos pelo workflow */
|
|
23
|
+
inputs: string;
|
|
24
|
+
};
|
|
25
|
+
export type CreateWorkflowExecutionResponse = {
|
|
26
|
+
/** ID da execução. Use esse id para obter o status da execução do workflow. */
|
|
27
|
+
executionId: string;
|
|
28
|
+
/** ID do app/infra criado no portal do EDP */
|
|
29
|
+
targetId: string;
|
|
30
|
+
/** URL para acompanhamento da execução do workflow no portal do EDP. */
|
|
31
|
+
portalUrl: string;
|
|
32
|
+
};
|
|
33
|
+
export type ErrorDetail = {
|
|
34
|
+
status: string;
|
|
35
|
+
code: string;
|
|
36
|
+
details: string;
|
|
37
|
+
};
|
|
38
|
+
export type ValidationDetail = {
|
|
39
|
+
code: string;
|
|
40
|
+
values: string[];
|
|
41
|
+
};
|
|
42
|
+
export type ErrorBody = {
|
|
43
|
+
code: string;
|
|
44
|
+
details: string;
|
|
45
|
+
status: string;
|
|
46
|
+
validationDetails?: ValidationDetail[];
|
|
47
|
+
};
|
|
48
|
+
export type SpecWorkflowInputs = {
|
|
49
|
+
/** Caminho do repositório */
|
|
50
|
+
repositoryPath: string;
|
|
51
|
+
/** Branch de origem */
|
|
52
|
+
sourceBranch?: string;
|
|
53
|
+
/** Branch de destino */
|
|
54
|
+
targetBranch?: string;
|
|
55
|
+
/** Constitution */
|
|
56
|
+
constitution: string;
|
|
57
|
+
/** Functional */
|
|
58
|
+
functional: string;
|
|
59
|
+
/** Technical */
|
|
60
|
+
technical: string;
|
|
61
|
+
};
|
|
62
|
+
export type WorkflowSpecExecutionRequest = {
|
|
63
|
+
/** Valores dos inputs definidos pelo workflow no formato string */
|
|
64
|
+
inputs: SpecWorkflowInputs;
|
|
65
|
+
};
|
|
66
|
+
export type WorkflowExecutionStatus = {
|
|
67
|
+
/** ID da execução */
|
|
68
|
+
executionId: string;
|
|
69
|
+
/** Status da execução */
|
|
70
|
+
status: "pending" | "in_progress" | "completed" | "suspended";
|
|
71
|
+
/** Data/hora de início */
|
|
72
|
+
startedAt?: string;
|
|
73
|
+
/** Data/hora de término */
|
|
74
|
+
endedAt?: string;
|
|
75
|
+
/** Resultado final da execução */
|
|
76
|
+
conclusion?: "error" | "success" | "skipped" | "cancelled";
|
|
77
|
+
/** URL para acompanhamento da execução do workflow no portal do EDP. */
|
|
78
|
+
webUrl?: string;
|
|
79
|
+
};
|
|
80
|
+
export type CodeWorkflowInputs = {
|
|
81
|
+
/** Caminho do repositório */
|
|
82
|
+
repositoryPath: string;
|
|
83
|
+
/** Branch de origem */
|
|
84
|
+
sourceBranch?: string;
|
|
85
|
+
/** Branch de destino */
|
|
86
|
+
targetBranch?: string;
|
|
87
|
+
};
|
|
88
|
+
export type WorkflowCodeExecutionRequest = {
|
|
89
|
+
/** Valores dos inputs definidos pelo workflow no formato string */
|
|
90
|
+
inputs: CodeWorkflowInputs;
|
|
91
|
+
};
|
|
92
|
+
export type Workspace = {
|
|
93
|
+
/** ID do workspace */
|
|
94
|
+
id: string;
|
|
95
|
+
/** Nome do workspace */
|
|
96
|
+
name: string;
|
|
97
|
+
/** Descrição do workspace */
|
|
98
|
+
description: string;
|
|
99
|
+
};
|
|
100
|
+
export type WorkspacesPage = {
|
|
101
|
+
/** Lista de resultados */
|
|
102
|
+
items: Workspace[];
|
|
103
|
+
/** Número da página */
|
|
104
|
+
page: number;
|
|
105
|
+
/** Quantidade de itens por página */
|
|
106
|
+
pageSize: number;
|
|
107
|
+
/** Indica se é a última página */
|
|
108
|
+
isLastPage: boolean;
|
|
109
|
+
};
|
|
110
|
+
export type Value = {
|
|
111
|
+
/** Valor do input. Pode ser string, número, booleano, etc. */
|
|
112
|
+
value: any;
|
|
113
|
+
/** Indica se o valor é mandatório. Se for o valor não poderá ser alterado, então não adianta perguntá-lo ao usuário. Se não for mandatório é uma sugestão de valor inicial que poderá ser alterada. */
|
|
114
|
+
mandatory: boolean;
|
|
115
|
+
};
|
|
116
|
+
export type EnvValue = {
|
|
117
|
+
/** Nome do ambiente (ex: dev, prod). Se não informado, é valor padrão. */
|
|
118
|
+
env?: string;
|
|
119
|
+
/** Indica o valor atual e se é mandatório para o ambiente. */
|
|
120
|
+
value: Value;
|
|
121
|
+
};
|
|
122
|
+
export type Condition = {
|
|
123
|
+
/** Nome da variável a ser avaliada na condição. */
|
|
124
|
+
variable?: string;
|
|
125
|
+
/** Operador lógico da condição (ex: ==, !=, >, <). */
|
|
126
|
+
operator?: string;
|
|
127
|
+
/** Valor esperado para a condição ser verdadeira. */
|
|
128
|
+
value?: string;
|
|
129
|
+
};
|
|
130
|
+
export type WorkflowInput = {
|
|
131
|
+
/** Nome do input */
|
|
132
|
+
name?: string;
|
|
133
|
+
/** Descrição do input */
|
|
134
|
+
label: string;
|
|
135
|
+
/** Tipo do input */
|
|
136
|
+
"type": "text" | "bool" | "int" | "select" | "multiselect" | "list" | "object";
|
|
137
|
+
/** Lista de opções para campos dos tipos select e multiselect. */
|
|
138
|
+
items?: string[];
|
|
139
|
+
/** Se true ou não presente, o campo é obrigatório, caso contrário opcional. */
|
|
140
|
+
required?: boolean;
|
|
141
|
+
/** Expressão regular para validação do valor do input (usado em campos do tipo text). */
|
|
142
|
+
pattern?: string;
|
|
143
|
+
/** Dica ou instrução adicional para o usuário */
|
|
144
|
+
help?: string;
|
|
145
|
+
/** Valores do input por ambiente, incluindo se é mandatório. */
|
|
146
|
+
values?: EnvValue[];
|
|
147
|
+
/** Pergunta exibida ao usuário para adicionar novos itens em campos do tipo lista. */
|
|
148
|
+
addQuestion?: string;
|
|
149
|
+
/** Definição do schema para cada item de uma lista (usado em campos do tipo list). */
|
|
150
|
+
input?: any;
|
|
151
|
+
/** Lista de inputs agrupados (usado em campos do tipo object). */
|
|
152
|
+
inputs?: any;
|
|
153
|
+
/** Condição para exibir ou habilitar o input, baseada em outros valores. */
|
|
154
|
+
condition?: Condition;
|
|
155
|
+
/** Escopo do input (ex: default, hidden, env, deploy). */
|
|
156
|
+
scope?: string;
|
|
157
|
+
};
|
|
158
|
+
export type Workflow = {
|
|
159
|
+
/** ID do workflow */
|
|
160
|
+
id: string;
|
|
161
|
+
/** Nome do workflow */
|
|
162
|
+
name: string;
|
|
163
|
+
/** Descrição do workflow */
|
|
164
|
+
description: string;
|
|
165
|
+
/** Inputs do workflow */
|
|
166
|
+
inputs: WorkflowInput[];
|
|
167
|
+
};
|
|
168
|
+
export type WorkflowList = {
|
|
169
|
+
/** Lista de workflows */
|
|
170
|
+
items: Workflow[];
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Dispara a execução de um workflow em um workspace
|
|
174
|
+
*/
|
|
175
|
+
export function executeWorkflow({ workspaceId, workflowId, workflowExecutionRequestV2 }: {
|
|
176
|
+
workspaceId: string;
|
|
177
|
+
workflowId: string;
|
|
178
|
+
workflowExecutionRequestV2: WorkflowExecutionRequestV2;
|
|
179
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
180
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
181
|
+
status: 201;
|
|
182
|
+
data: CreateWorkflowExecutionResponse;
|
|
183
|
+
} | {
|
|
184
|
+
status: 400;
|
|
185
|
+
data: ErrorDetail;
|
|
186
|
+
} | {
|
|
187
|
+
status: 401;
|
|
188
|
+
data: ErrorDetail;
|
|
189
|
+
} | {
|
|
190
|
+
status: 403;
|
|
191
|
+
data: ErrorDetail;
|
|
192
|
+
} | {
|
|
193
|
+
status: 404;
|
|
194
|
+
data: ErrorDetail;
|
|
195
|
+
} | {
|
|
196
|
+
status: 409;
|
|
197
|
+
data: ErrorBody;
|
|
198
|
+
} | {
|
|
199
|
+
status: 422;
|
|
200
|
+
data: ErrorBody;
|
|
201
|
+
} | {
|
|
202
|
+
status: 500;
|
|
203
|
+
data: ErrorDetail;
|
|
204
|
+
} | {
|
|
205
|
+
status: 503;
|
|
206
|
+
data: ErrorBody;
|
|
207
|
+
}>(`/v2/workspaces/${encodeURIComponent(workspaceId)}/workflows/${encodeURIComponent(workflowId)}/executions`, oazapfts.json({
|
|
208
|
+
...opts,
|
|
209
|
+
method: "POST",
|
|
210
|
+
body: workflowExecutionRequestV2
|
|
211
|
+
})));
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Dispara a execução de um workflow do tipo spec
|
|
215
|
+
*/
|
|
216
|
+
export function executeSpecWorkflow({ workflowSpecExecutionRequest }: {
|
|
217
|
+
workflowSpecExecutionRequest: WorkflowSpecExecutionRequest;
|
|
218
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
219
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
220
|
+
status: 200;
|
|
221
|
+
data: WorkflowExecutionStatus;
|
|
222
|
+
} | {
|
|
223
|
+
status: 400;
|
|
224
|
+
data: ErrorDetail;
|
|
225
|
+
} | {
|
|
226
|
+
status: 401;
|
|
227
|
+
data: ErrorDetail;
|
|
228
|
+
} | {
|
|
229
|
+
status: 403;
|
|
230
|
+
data: ErrorDetail;
|
|
231
|
+
} | {
|
|
232
|
+
status: 404;
|
|
233
|
+
data: ErrorDetail;
|
|
234
|
+
} | {
|
|
235
|
+
status: 409;
|
|
236
|
+
data: ErrorBody;
|
|
237
|
+
} | {
|
|
238
|
+
status: 422;
|
|
239
|
+
data: ErrorBody;
|
|
240
|
+
} | {
|
|
241
|
+
status: 500;
|
|
242
|
+
data: ErrorDetail;
|
|
243
|
+
} | {
|
|
244
|
+
status: 503;
|
|
245
|
+
data: ErrorBody;
|
|
246
|
+
}>("/v1/workflows/executions/spec", oazapfts.json({
|
|
247
|
+
...opts,
|
|
248
|
+
method: "POST",
|
|
249
|
+
body: workflowSpecExecutionRequest
|
|
250
|
+
})));
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Dispara a execução de um workflow de geração de código
|
|
254
|
+
*/
|
|
255
|
+
export function executeCodeWorkflow({ workflowCodeExecutionRequest }: {
|
|
256
|
+
workflowCodeExecutionRequest: WorkflowCodeExecutionRequest;
|
|
257
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
258
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
259
|
+
status: 200;
|
|
260
|
+
data: WorkflowExecutionStatus;
|
|
261
|
+
} | {
|
|
262
|
+
status: 400;
|
|
263
|
+
data: ErrorDetail;
|
|
264
|
+
} | {
|
|
265
|
+
status: 401;
|
|
266
|
+
data: ErrorDetail;
|
|
267
|
+
} | {
|
|
268
|
+
status: 403;
|
|
269
|
+
data: ErrorDetail;
|
|
270
|
+
} | {
|
|
271
|
+
status: 404;
|
|
272
|
+
data: ErrorDetail;
|
|
273
|
+
} | {
|
|
274
|
+
status: 409;
|
|
275
|
+
data: ErrorBody;
|
|
276
|
+
} | {
|
|
277
|
+
status: 422;
|
|
278
|
+
data: ErrorBody;
|
|
279
|
+
} | {
|
|
280
|
+
status: 500;
|
|
281
|
+
data: ErrorDetail;
|
|
282
|
+
} | {
|
|
283
|
+
status: 503;
|
|
284
|
+
data: ErrorBody;
|
|
285
|
+
}>("/v1/workflows/executions/code", oazapfts.json({
|
|
286
|
+
...opts,
|
|
287
|
+
method: "POST",
|
|
288
|
+
body: workflowCodeExecutionRequest
|
|
289
|
+
})));
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Lista os workspaces disponíveis para o usuário autenticado
|
|
293
|
+
*/
|
|
294
|
+
export function listWorkspaces({ page, pageSize }: {
|
|
295
|
+
page?: number;
|
|
296
|
+
pageSize?: number;
|
|
297
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
298
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
299
|
+
status: 200;
|
|
300
|
+
data: WorkspacesPage;
|
|
301
|
+
} | {
|
|
302
|
+
status: 400;
|
|
303
|
+
data: ErrorBody;
|
|
304
|
+
} | {
|
|
305
|
+
status: 401;
|
|
306
|
+
} | {
|
|
307
|
+
status: 403;
|
|
308
|
+
} | {
|
|
309
|
+
status: 404;
|
|
310
|
+
data: ErrorBody | {
|
|
311
|
+
[key: string]: any;
|
|
312
|
+
};
|
|
313
|
+
} | {
|
|
314
|
+
status: 409;
|
|
315
|
+
data: ErrorBody;
|
|
316
|
+
} | {
|
|
317
|
+
status: 422;
|
|
318
|
+
data: ErrorBody;
|
|
319
|
+
} | {
|
|
320
|
+
status: 500;
|
|
321
|
+
} | {
|
|
322
|
+
status: 503;
|
|
323
|
+
data: ErrorBody;
|
|
324
|
+
}>(`/v1/workspaces${QS.query(QS.explode({
|
|
325
|
+
page,
|
|
326
|
+
pageSize
|
|
327
|
+
}))}`, {
|
|
328
|
+
...opts
|
|
329
|
+
}));
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Obtém detalhes de um workspace específico
|
|
333
|
+
*/
|
|
334
|
+
export function getWorkspace({ workspaceId }: {
|
|
335
|
+
workspaceId: string;
|
|
336
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
337
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
338
|
+
status: 200;
|
|
339
|
+
data: Workspace;
|
|
340
|
+
} | {
|
|
341
|
+
status: 400;
|
|
342
|
+
data: ErrorBody;
|
|
343
|
+
} | {
|
|
344
|
+
status: 401;
|
|
345
|
+
} | {
|
|
346
|
+
status: 403;
|
|
347
|
+
} | {
|
|
348
|
+
status: 404;
|
|
349
|
+
} | {
|
|
350
|
+
status: 409;
|
|
351
|
+
data: ErrorBody;
|
|
352
|
+
} | {
|
|
353
|
+
status: 422;
|
|
354
|
+
data: ErrorBody;
|
|
355
|
+
} | {
|
|
356
|
+
status: 500;
|
|
357
|
+
} | {
|
|
358
|
+
status: 503;
|
|
359
|
+
data: ErrorBody;
|
|
360
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}`, {
|
|
361
|
+
...opts
|
|
362
|
+
}));
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Lista workflows do workspace
|
|
366
|
+
*/
|
|
367
|
+
export function listWorkflows({ workspaceId }: {
|
|
368
|
+
workspaceId: string;
|
|
369
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
370
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
371
|
+
status: 200;
|
|
372
|
+
data: WorkflowList;
|
|
373
|
+
} | {
|
|
374
|
+
status: 400;
|
|
375
|
+
data: ErrorBody;
|
|
376
|
+
} | {
|
|
377
|
+
status: 401;
|
|
378
|
+
} | {
|
|
379
|
+
status: 403;
|
|
380
|
+
} | {
|
|
381
|
+
status: 404;
|
|
382
|
+
data: ErrorBody | {
|
|
383
|
+
[key: string]: any;
|
|
384
|
+
};
|
|
385
|
+
} | {
|
|
386
|
+
status: 409;
|
|
387
|
+
data: ErrorBody;
|
|
388
|
+
} | {
|
|
389
|
+
status: 422;
|
|
390
|
+
data: ErrorBody;
|
|
391
|
+
} | {
|
|
392
|
+
status: 500;
|
|
393
|
+
} | {
|
|
394
|
+
status: 503;
|
|
395
|
+
data: ErrorBody;
|
|
396
|
+
}>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/workflows`, {
|
|
397
|
+
...opts
|
|
398
|
+
}));
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Obtém detalhes de uma execução de workflow. Use o executionnId retornado pelo serviço execução do workflow para consultar o status da execução.
|
|
402
|
+
*/
|
|
403
|
+
export function getWorkflowExecution({ executionId }: {
|
|
404
|
+
executionId: string;
|
|
405
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
406
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
407
|
+
status: 200;
|
|
408
|
+
data: WorkflowExecutionStatus;
|
|
409
|
+
} | {
|
|
410
|
+
status: 400;
|
|
411
|
+
data: ErrorBody;
|
|
412
|
+
} | {
|
|
413
|
+
status: 401;
|
|
414
|
+
data: ErrorDetail;
|
|
415
|
+
} | {
|
|
416
|
+
status: 403;
|
|
417
|
+
data: ErrorDetail;
|
|
418
|
+
} | {
|
|
419
|
+
status: 404;
|
|
420
|
+
data: ErrorDetail;
|
|
421
|
+
} | {
|
|
422
|
+
status: 409;
|
|
423
|
+
data: ErrorBody;
|
|
424
|
+
} | {
|
|
425
|
+
status: 422;
|
|
426
|
+
data: ErrorBody;
|
|
427
|
+
} | {
|
|
428
|
+
status: 500;
|
|
429
|
+
data: ErrorDetail;
|
|
430
|
+
} | {
|
|
431
|
+
status: 503;
|
|
432
|
+
data: ErrorBody;
|
|
433
|
+
}>(`/v1/workflows/executions/${encodeURIComponent(executionId)}`, {
|
|
434
|
+
...opts
|
|
435
|
+
}));
|
|
436
|
+
}
|
|
437
|
+
export function healthz(opts?: Oazapfts.RequestOpts) {
|
|
438
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
439
|
+
status: 200;
|
|
440
|
+
data: {
|
|
441
|
+
[key: string]: string;
|
|
442
|
+
};
|
|
443
|
+
} | {
|
|
444
|
+
status: 400;
|
|
445
|
+
data: ErrorBody;
|
|
446
|
+
} | {
|
|
447
|
+
status: 401;
|
|
448
|
+
data: ErrorBody;
|
|
449
|
+
} | {
|
|
450
|
+
status: 403;
|
|
451
|
+
data: ErrorBody;
|
|
452
|
+
} | {
|
|
453
|
+
status: 404;
|
|
454
|
+
data: ErrorBody | {
|
|
455
|
+
[key: string]: any;
|
|
456
|
+
};
|
|
457
|
+
} | {
|
|
458
|
+
status: 409;
|
|
459
|
+
data: ErrorBody;
|
|
460
|
+
} | {
|
|
461
|
+
status: 422;
|
|
462
|
+
data: ErrorBody;
|
|
463
|
+
} | {
|
|
464
|
+
status: 500;
|
|
465
|
+
data: ErrorBody;
|
|
466
|
+
} | {
|
|
467
|
+
status: 503;
|
|
468
|
+
data: ErrorBody;
|
|
469
|
+
}>("/healthz", {
|
|
470
|
+
...opts
|
|
471
|
+
}));
|
|
472
|
+
}
|
package/src/apis-itau.json
CHANGED
|
@@ -221,5 +221,13 @@
|
|
|
221
221
|
"prd": "https://discover-core.stackspot.com"
|
|
222
222
|
},
|
|
223
223
|
"docs": "/v3/api-docs"
|
|
224
|
+
},
|
|
225
|
+
"edpBfa": {
|
|
226
|
+
"url": {
|
|
227
|
+
"dev": "https://adp-development-edp-bfa.dev.stackspot.com",
|
|
228
|
+
"stg": "https://adp-development-edp-bfa.stg.stackspot.com",
|
|
229
|
+
"prd": "https://edp-bfa.stackspot.com"
|
|
230
|
+
},
|
|
231
|
+
"docs": "/openapi.json"
|
|
224
232
|
}
|
|
225
233
|
}
|
package/src/apis.json
CHANGED
|
@@ -221,5 +221,13 @@
|
|
|
221
221
|
"prd": "https://discover-core.stackspot.com"
|
|
222
222
|
},
|
|
223
223
|
"docs": "/v3/api-docs"
|
|
224
|
+
},
|
|
225
|
+
"edpBfa": {
|
|
226
|
+
"url": {
|
|
227
|
+
"dev": "https://adp-development-edp-bfa.dev.stackspot.com",
|
|
228
|
+
"stg": "https://adp-development-edp-bfa.stg.stackspot.com",
|
|
229
|
+
"prd": "https://edp-bfa.stackspot.com"
|
|
230
|
+
},
|
|
231
|
+
"docs": "/openapi.json"
|
|
224
232
|
}
|
|
225
233
|
}
|
package/src/client/account.ts
CHANGED
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
isCreatedScmCredentials1,
|
|
103
103
|
listAccountMemberFavorites,
|
|
104
104
|
listExtensionLinks,
|
|
105
|
-
|
|
105
|
+
|
|
106
106
|
listExtensionVersions,
|
|
107
107
|
listMemberFavoritesByResource,
|
|
108
108
|
listScmCredentials1,
|
|
@@ -145,8 +145,12 @@ import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
|
145
145
|
import { accountDictionary } from '../error/dictionary/account'
|
|
146
146
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
147
147
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
148
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
148
149
|
import { CreateSCMRequest, SCMStatus, UpdateSCMRequest } from './types'
|
|
149
150
|
|
|
151
|
+
const listAllResourcesOfGroup = removeAuthorizationParam(getGroupResources)
|
|
152
|
+
const getsListAllResourcesOfGroup = removeAuthorizationParam(getResources)
|
|
153
|
+
|
|
150
154
|
class AccountClient extends ReactQueryNetworkClient {
|
|
151
155
|
constructor() {
|
|
152
156
|
super(getApiAddresses().account.url, defaults)
|
|
@@ -324,9 +328,9 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
324
328
|
*/
|
|
325
329
|
removeRoleFromGroup = this.mutation(deleteRole)
|
|
326
330
|
/**
|
|
327
|
-
*
|
|
331
|
+
* Get all resources by groups with pagination.
|
|
328
332
|
*/
|
|
329
|
-
|
|
333
|
+
allResourcesByGroupWithPagination = this.infiniteQuery(listAllResourcesOfGroup, { accumulator: 'items' })
|
|
330
334
|
/**
|
|
331
335
|
* Adds several resources to a group.
|
|
332
336
|
*/
|
|
@@ -393,7 +397,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
393
397
|
/**
|
|
394
398
|
* Gets all resources (paginated)
|
|
395
399
|
*/
|
|
396
|
-
allResources = this.infiniteQuery(
|
|
400
|
+
allResources = this.infiniteQuery(getsListAllResourcesOfGroup, { accumulator: 'items' })
|
|
397
401
|
/**
|
|
398
402
|
* Gets all resource types (paginated)
|
|
399
403
|
*/
|
|
@@ -649,9 +653,9 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
649
653
|
*/
|
|
650
654
|
allRolesByGroupWithPagination = this.query(getRoles5)
|
|
651
655
|
/**
|
|
652
|
-
*
|
|
656
|
+
* Gets all resources of a group (paginated)
|
|
653
657
|
*/
|
|
654
|
-
|
|
658
|
+
groupResources = this.query(getGroupResources1)
|
|
655
659
|
/**
|
|
656
660
|
* Get all roles account with pagination
|
|
657
661
|
*/
|
|
@@ -687,7 +691,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
687
691
|
/**
|
|
688
692
|
* Lists all extensions.
|
|
689
693
|
*/
|
|
690
|
-
extensions = this.query(
|
|
694
|
+
extensions = this.query(listExtensionLinks)
|
|
691
695
|
|
|
692
696
|
/**
|
|
693
697
|
* Lists all versions of an extension.
|
|
@@ -13,6 +13,7 @@ import { workspaceAiClient } from './workspace-ai'
|
|
|
13
13
|
|
|
14
14
|
const AGENT_DEFAULT_SLUG = 'stk_flex'
|
|
15
15
|
const listAgentsV3AgentsWithoutAuthorization = removeAuthorizationParam(listAgentsV3AgentsGet)
|
|
16
|
+
const listToolkitsAuthorization = removeAuthorizationParam(listToolkitsV2ToolkitsGet)
|
|
16
17
|
|
|
17
18
|
class AgentToolsClient extends ReactQueryNetworkClient {
|
|
18
19
|
constructor() {
|
|
@@ -150,7 +151,7 @@ class AgentToolsClient extends ReactQueryNetworkClient {
|
|
|
150
151
|
/**
|
|
151
152
|
* Get list of Toolkits V2
|
|
152
153
|
*/
|
|
153
|
-
toolkitsV2 = this.
|
|
154
|
+
toolkitsV2 = this.infiniteQuery(listToolkitsAuthorization, { accumulator: 'items' })
|
|
154
155
|
/**
|
|
155
156
|
* Lists all tools of an MCP toolkit.
|
|
156
157
|
*/
|
package/src/client/discover.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { HttpError } from '@oazapfts/runtime'
|
|
|
2
2
|
import { findLast, last } from 'lodash'
|
|
3
3
|
import { getApiAddresses } from '../api-addresses'
|
|
4
4
|
import { ConversationResponse } from '../api/ai'
|
|
5
|
-
import { create, create1, create2, defaults, deleteById, deleteById1, deleteById2, fetchInsights, getAll, getAll1, getAll2, getAllByHypothesis, getById, getById1, getById2, getInsightById, GetOpportunityResponse,
|
|
5
|
+
import { create, create1, create2, defaults, deleteById, deleteById1, deleteById2, fetchInsights, getAll, getAll1, getAll2, getAllByHypothesis, getById, getById1, getById2, getInsightById, GetOpportunityResponse, AiChatRequest, refreshInsights } from '../api/discover'
|
|
6
6
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
7
7
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
8
8
|
import { StreamedJson } from '../utils/StreamedJson'
|
|
@@ -121,7 +121,7 @@ class DiscoverClient extends ReactQueryNetworkClient {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
|
|
124
|
-
sendChatMessage(request:
|
|
124
|
+
sendChatMessage(request: AiChatRequest & { agentId: string }, minChangeIntervalMS?: number): StreamedJson<ChatResponseWithSteps> {
|
|
125
125
|
const abortController = new AbortController()
|
|
126
126
|
const headers = {
|
|
127
127
|
'Content-Type': 'application/json',
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import { getApiAddresses } from '../api-addresses'
|
|
3
|
+
import { defaults, executeCodeWorkflow } from '../api/edpBfa'
|
|
4
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
5
|
+
import { baseDictionary } from '../error/dictionary/base'
|
|
6
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
7
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
8
|
+
|
|
9
|
+
class EdpBfaClient extends ReactQueryNetworkClient {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(getApiAddresses().edpBfa.url, defaults)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
15
|
+
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Triggers an workflow to generate code.
|
|
20
|
+
*/
|
|
21
|
+
generateCode = this.mutation(executeCodeWorkflow)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const edpBfaClient = new EdpBfaClient()
|
package/src/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ export { contentClient } from './client/content'
|
|
|
15
15
|
export { dataIntegrationClient } from './client/data-integration'
|
|
16
16
|
export * from './client/discover'
|
|
17
17
|
export { discoverClient } from './client/discover'
|
|
18
|
+
export { edpBfaClient } from './client/edp-bfa'
|
|
18
19
|
export { eventBusClient } from './client/event-bus'
|
|
19
20
|
export { genAiInferenceClient } from './client/gen-ai-inference'
|
|
20
21
|
export { insightsClient } from './client/insights'
|
|
@@ -41,3 +42,4 @@ export { StreamedArray } from './utils/StreamedArray'
|
|
|
41
42
|
export { StreamedJson } from './utils/StreamedJson'
|
|
42
43
|
export { useExtendedList } from './utils/use-extended-list'
|
|
43
44
|
export { useStreamedArray } from './utils/use-streamed-array'
|
|
45
|
+
|