@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,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
|
+
}
|
|
@@ -134,6 +134,9 @@ export type UpdateLlmModelRequest = {
|
|
|
134
134
|
};
|
|
135
135
|
resources: LlmModelResourceRequest[];
|
|
136
136
|
};
|
|
137
|
+
export type GetModelByIdsRequest = {
|
|
138
|
+
model_ids: string[];
|
|
139
|
+
};
|
|
137
140
|
export type UpdateLlmModelResourceRequest = {
|
|
138
141
|
name: string;
|
|
139
142
|
is_default?: boolean;
|
|
@@ -239,6 +242,8 @@ export type ChatCompletion = {
|
|
|
239
242
|
function_call?: string | {
|
|
240
243
|
[key: string]: string;
|
|
241
244
|
} | null;
|
|
245
|
+
/** ID of an alternative model for chat completion. It should be present on available_model_ids agent attr. */
|
|
246
|
+
selected_model_id?: string | null;
|
|
242
247
|
};
|
|
243
248
|
export type ChatRequest = {
|
|
244
249
|
streaming: boolean;
|
|
@@ -246,6 +251,8 @@ export type ChatRequest = {
|
|
|
246
251
|
stackspot_knowledge?: boolean;
|
|
247
252
|
return_ks_in_response?: boolean;
|
|
248
253
|
upload_ids?: string[];
|
|
254
|
+
execution_id?: string | null;
|
|
255
|
+
selected_model?: string | null;
|
|
249
256
|
};
|
|
250
257
|
/**
|
|
251
258
|
* Health Check
|
|
@@ -469,6 +476,32 @@ export function deleteV1LlmModelsModelIdDelete({ modelId, xAccountId, authorizat
|
|
|
469
476
|
})
|
|
470
477
|
}));
|
|
471
478
|
}
|
|
479
|
+
/**
|
|
480
|
+
* Get Models List
|
|
481
|
+
*/
|
|
482
|
+
export function getModelsListV1LlmModelsListPost({ xAccountId, authorization, getModelByIdsRequest }: {
|
|
483
|
+
xAccountId?: string | null;
|
|
484
|
+
authorization: string;
|
|
485
|
+
getModelByIdsRequest: GetModelByIdsRequest;
|
|
486
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
487
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
488
|
+
status: 200;
|
|
489
|
+
data: LlmModelsResponse[];
|
|
490
|
+
} | {
|
|
491
|
+
status: 404;
|
|
492
|
+
} | {
|
|
493
|
+
status: 422;
|
|
494
|
+
data: HttpValidationError;
|
|
495
|
+
}>("/v1/llm/models-list", oazapfts.json({
|
|
496
|
+
...opts,
|
|
497
|
+
method: "POST",
|
|
498
|
+
body: getModelByIdsRequest,
|
|
499
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
500
|
+
"x-account-id": xAccountId,
|
|
501
|
+
authorization
|
|
502
|
+
})
|
|
503
|
+
})));
|
|
504
|
+
}
|
|
472
505
|
/**
|
|
473
506
|
* Save Or Update Model Resources
|
|
474
507
|
*/
|
|
@@ -549,10 +582,15 @@ export function listLlmProvidersV1LlmProvidersGet({ acceptsSelfHosted, xAccountI
|
|
|
549
582
|
/**
|
|
550
583
|
* Handle completions requests
|
|
551
584
|
*/
|
|
552
|
-
export function createCompletionsV1ChatCompletionsPost({ xRequestOrigin,
|
|
553
|
-
xRequestOrigin?: string | null;
|
|
585
|
+
export function createCompletionsV1ChatCompletionsPost({ xAccountId, authorization, xRequestOrigin, xConversationId, xMessageId, xQcExecutionId, xQcSlug, xPlatformVersion, chatCompletion }: {
|
|
554
586
|
xAccountId?: string | null;
|
|
555
587
|
authorization: string;
|
|
588
|
+
xRequestOrigin?: string | null;
|
|
589
|
+
xConversationId?: string | null;
|
|
590
|
+
xMessageId?: string | null;
|
|
591
|
+
xQcExecutionId?: string | null;
|
|
592
|
+
xQcSlug?: string | null;
|
|
593
|
+
xPlatformVersion?: string | null;
|
|
556
594
|
chatCompletion: ChatCompletion;
|
|
557
595
|
}, opts?: Oazapfts.RequestOpts) {
|
|
558
596
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
@@ -568,9 +606,14 @@ export function createCompletionsV1ChatCompletionsPost({ xRequestOrigin, xAccoun
|
|
|
568
606
|
method: "POST",
|
|
569
607
|
body: chatCompletion,
|
|
570
608
|
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
571
|
-
"x-request-origin": xRequestOrigin,
|
|
572
609
|
"x-account-id": xAccountId,
|
|
573
|
-
authorization
|
|
610
|
+
authorization,
|
|
611
|
+
"x-request-origin": xRequestOrigin,
|
|
612
|
+
"x-conversation-id": xConversationId,
|
|
613
|
+
"x-message-id": xMessageId,
|
|
614
|
+
"x-qc-execution-id": xQcExecutionId,
|
|
615
|
+
"x-qc-slug": xQcSlug,
|
|
616
|
+
"x-platform-version": xPlatformVersion
|
|
574
617
|
})
|
|
575
618
|
})));
|
|
576
619
|
}
|